From a24c7fecab78954a14416e8924d60e011b1a7d33 Mon Sep 17 00:00:00 2001 From: Bill Greiman Date: Thu, 3 Oct 2019 06:40:15 -0700 Subject: [PATCH] ChibiOS 19.1.3 with Teensy 4.0 --- README.md | 31 +- doc/MainPage/ChRtMainPage.h | 6 +- doc/html/_ch_rt_8h.html | 102 +- doc/html/_ch_rt_8h_source.html | 84 +- doc/html/_ch_rt_main_page_8h_source.html | 53 +- doc/html/arrowdown.png | Bin 246 -> 0 bytes doc/html/arrowright.png | Bin 229 -> 0 bytes .../dir_68267d1309a1af8e8297ef4c3efbcdba.html | 48 +- .../dir_f1e74b9d244c08400ce0f6c55d14c7e5.html | 50 +- doc/html/doxygen.css | 164 +- doc/html/dynsections.js | 33 +- doc/html/files.html | 50 +- doc/html/globals.html | 60 +- doc/html/globals_defs.html | 57 +- doc/html/globals_func.html | 60 +- doc/html/index.html | 55 +- doc/html/jquery.js | 51 +- doc/html/menu.js | 50 + doc/html/menudata.js | 31 + doc/html/search/all_0.html | 6 +- doc/html/search/all_1.html | 6 +- doc/html/search/all_2.html | 6 +- doc/html/search/all_3.html | 26 - doc/html/search/all_3.js | 4 - doc/html/search/defines_0.html | 6 +- doc/html/search/files_0.html | 6 +- doc/html/search/functions_0.html | 6 +- doc/html/search/functions_1.html | 6 +- doc/html/search/functions_2.html | 6 +- doc/html/search/functions_3.html | 26 - doc/html/search/functions_3.js | 4 - doc/html/search/pages_0.html | 6 +- doc/html/search/search.css | 12 +- doc/html/search/search.js | 25 +- doc/html/search/searchdata.js | 4 +- doc/html/tabs.css | 61 +- examples/chContextTime/chContextTime.ino | 1 + examples/chCoop/chCoop.ino | 5 +- examples/chDataSharing/chDataSharing.ino | 4 +- examples/chEvent/chEvent.ino | 2 +- .../chFifoDataLogger/chFifoDataLogger.ino | 7 +- examples/chIsrSemaphore/chIsrSemaphore.ino | 21 +- examples/chJitter/chJitter.ino | 3 +- examples/chMailbox/chMailbox.ino | 18 +- examples/chMemPool/chMemPool.ino | 10 +- examples/chMutex/chMutex.ino | 4 +- examples/chRoundRobin/chRoundRobin.ino | 11 +- examples/chSemaphore/chSemaphore.ino | 2 +- .../src_org/CMSIS/{include => }/cmsis_armcc.h | 272 +- extra/src_org/CMSIS/cmsis_armclang.h | 1444 ++++ .../cmsis_armcc_V6.h => cmsis_armclang_ltm.h} | 999 +-- extra/src_org/CMSIS/cmsis_compiler.h | 283 + extra/src_org/CMSIS/cmsis_gcc.h | 2168 +++++ extra/src_org/CMSIS/cmsis_iccarm.h | 964 +++ extra/src_org/CMSIS/cmsis_version.h | 39 + extra/src_org/CMSIS/core_armv81mml.h | 2968 +++++++ extra/src_org/CMSIS/core_armv8mbl.h | 1921 +++++ extra/src_org/CMSIS/core_armv8mml.h | 2835 +++++++ .../src_org/CMSIS}/core_cm0.h | 402 +- .../src_org/CMSIS}/core_cm0plus.h | 427 +- extra/src_org/CMSIS/core_cm1.h | 979 +++ extra/src_org/CMSIS/core_cm23.h | 1996 +++++ .../src_org/CMSIS/core_cm3.h | 568 +- extra/src_org/CMSIS/core_cm33.h | 2910 +++++++ extra/src_org/CMSIS/core_cm35p.h | 2910 +++++++ extra/src_org/CMSIS/{include => }/core_cm4.h | 563 +- .../src_org/CMSIS}/core_cm7.h | 753 +- .../src_org/CMSIS/{include => }/core_sc000.h | 349 +- .../{include/core_cm3.h => core_sc300.h} | 539 +- .../src_org/CMSIS/include/arm_common_tables.h | 136 - .../src_org/CMSIS/include/arm_const_structs.h | 79 - extra/src_org/CMSIS/include/arm_math.h | 7154 ----------------- extra/src_org/CMSIS/include/cmsis_gcc.h | 1373 ---- extra/src_org/CMSIS/include/core_cmFunc.h | 87 - extra/src_org/CMSIS/include/core_cmInstr.h | 92 - extra/src_org/CMSIS/include/core_cmSimd.h | 96 - extra/src_org/CMSIS/mpu_armv7.h | 272 + extra/src_org/CMSIS/mpu_armv8.h | 346 + extra/src_org/CMSIS/tz_context.h | 70 + .../src_org/arm/chconf.h | 282 +- extra/src_org/arm/{chcore_arm.h => chcore.h} | 2 +- extra/src_org/arm/chcore_timer.h | 2 +- extra/src_org/arm/chcore_v6m.c | 2 +- extra/src_org/arm/chcore_v6m.h | 20 +- extra/src_org/arm/chcore_v7m.c | 15 +- extra/src_org/arm/chcore_v7m.h | 29 +- extra/src_org/arm/chcoreasm_v6m.S | 2 +- extra/src_org/arm/chcoreasm_v7m.S | 5 +- .../src_org/arm/chtypes.h | 22 +- extra/src_org/arm/mpu.h | 22 +- extra/src_org/avr/chconf.h | 714 ++ .../src_org/avr/chcore.c | 23 +- .../src_org/avr/chcore.h | 12 +- extra/src_org/avr/chcore_timer.h | 124 + .../src_org/avr/chtypes.h | 20 +- extra/src_org/hal/hal_st.c | 131 + extra/src_org/hal/hal_st.h | 97 + extra/src_org/hal/osal.h | 1028 +++ .../rt => extra/src_org/license}/chcustomer.h | 8 +- extra/src_org/{rt => license}/chlicense.h | 6 +- extra/src_org/license/chversion.h | 103 + extra/src_org/license/license.dox | 37 + extra/src_org/license/license.mk | 9 + extra/src_org/oslib/dox/lib.dox | 85 + .../src_org/oslib/include}/chbsem.h | 22 +- extra/src_org/oslib/include/chfactory.h | 553 ++ extra/src_org/oslib/include/chlib.h | 217 + .../src_org/oslib/include}/chmboxes.h | 53 +- .../src_org/oslib/include}/chmemcore.h | 78 +- .../src_org/oslib/include/chmemheaps.h | 22 +- .../{rt => oslib/include}/chmempools.h | 176 +- extra/src_org/oslib/include/chobjfifos.h | 430 + extra/src_org/oslib/include/chpipes.h | 208 + extra/src_org/oslib/oslib.mk | 49 + extra/src_org/oslib/readme.txt | 2 + extra/src_org/oslib/src/chfactory.c | 810 ++ extra/src_org/{rt => oslib/src}/chmboxes.c | 46 +- extra/src_org/{rt => oslib/src}/chmemcore.c | 61 +- .../src_org/oslib/src/chmemheaps.c | 44 +- extra/src_org/{rt => oslib/src}/chmempools.c | 72 +- extra/src_org/oslib/src/chpipes.c | 388 + extra/src_org/rt/chvt.h | 755 -- extra/src_org/rt/{ => include}/ch.h | 70 +- extra/src_org/rt/{ => include}/chalign.h | 7 +- extra/src_org/rt/include/chchecks.h | 263 + {src/rt => extra/src_org/rt/include}/chcond.h | 6 +- extra/src_org/rt/{ => include}/chdebug.h | 4 +- .../src_org/rt/include}/chdynamic.h | 2 +- .../src_org/rt/include}/chevents.h | 25 +- extra/src_org/rt/{ => include}/chmsg.h | 2 +- extra/src_org/rt/{ => include}/chmtx.h | 23 +- extra/src_org/rt/{ => include}/chregistry.h | 2 +- .../{chchecks.h => include/chrestrictions.h} | 23 +- extra/src_org/rt/{ => include}/chschd.h | 27 +- {src/rt => extra/src_org/rt/include}/chsem.h | 8 +- .../rt => extra/src_org/rt/include}/chstats.h | 2 +- extra/src_org/rt/{ => include}/chsys.h | 23 +- .../src_org/rt/include}/chsystypes.h | 13 +- extra/src_org/rt/{ => include}/chthreads.h | 36 +- extra/src_org/rt/include/chtime.h | 492 ++ extra/src_org/rt/{ => include}/chtm.h | 2 +- extra/src_org/rt/{ => include}/chtrace.h | 9 +- extra/src_org/rt/include/chvt.h | 471 ++ {src/rt => extra/src_org/rt/src}/chcond.c | 30 +- extra/src_org/rt/{ => src}/chdebug.c | 6 +- extra/src_org/rt/{ => src}/chdynamic.c | 2 +- extra/src_org/rt/{ => src}/chevents.c | 60 +- {src/rt => extra/src_org/rt/src}/chmsg.c | 6 +- extra/src_org/rt/{ => src}/chmtx.c | 4 +- extra/src_org/rt/{ => src}/chregistry.c | 4 +- extra/src_org/rt/{ => src}/chschd.c | 31 +- {src/rt => extra/src_org/rt/src}/chsem.c | 24 +- extra/src_org/rt/{ => src}/chstats.c | 2 +- extra/src_org/rt/{ => src}/chsys.c | 12 +- {src/rt => extra/src_org/rt/src}/chthreads.c | 32 +- {src/rt => extra/src_org/rt/src}/chtm.c | 2 +- extra/src_org/rt/{ => src}/chtrace.c | 12 +- {src/rt => extra/src_org/rt/src}/chvt.c | 75 +- extra/srcdiff.bat | 6 +- extra/srcdiff.txt | 95 + library.properties | 6 +- src/CMSIS/{include => }/cmsis_armcc.h | 272 +- src/CMSIS/cmsis_armclang.h | 1444 ++++ .../cmsis_armcc_V6.h => cmsis_armclang_ltm.h} | 999 +-- src/CMSIS/cmsis_compiler.h | 283 + src/CMSIS/cmsis_gcc.h | 2168 +++++ src/CMSIS/cmsis_iccarm.h | 964 +++ src/CMSIS/cmsis_version.h | 39 + src/CMSIS/core_armv81mml.h | 2968 +++++++ src/CMSIS/core_armv8mbl.h | 1921 +++++ src/CMSIS/core_armv8mml.h | 2835 +++++++ .../CMSIS/include => src/CMSIS}/core_cm0.h | 402 +- .../include => src/CMSIS}/core_cm0plus.h | 427 +- src/CMSIS/core_cm1.h | 979 +++ src/CMSIS/core_cm23.h | 1996 +++++ .../core_sc300.h => src/CMSIS/core_cm3.h | 568 +- src/CMSIS/core_cm33.h | 2910 +++++++ src/CMSIS/core_cm35p.h | 2910 +++++++ src/CMSIS/{include => }/core_cm4.h | 563 +- .../CMSIS/include => src/CMSIS}/core_cm7.h | 753 +- src/CMSIS/{include => }/core_sc000.h | 349 +- .../{include/core_cm3.h => core_sc300.h} | 539 +- src/CMSIS/include/arm_common_tables.h | 136 - src/CMSIS/include/arm_const_structs.h | 79 - src/CMSIS/include/arm_math.h | 7154 ----------------- src/CMSIS/include/cmsis_gcc.h | 1373 ---- src/CMSIS/include/core_cmFunc.h | 87 - src/CMSIS/include/core_cmInstr.h | 92 - src/CMSIS/include/core_cmSimd.h | 96 - src/CMSIS/mpu_armv7.h | 272 + src/CMSIS/mpu_armv8.h | 346 + src/CMSIS/tz_context.h | 70 + src/ChRt.c | 14 +- src/ChRt.cpp | 19 +- src/ChRt.h | 5 +- src/arm/{chcore_arm.h => chcore.h} | 2 +- src/arm/chcore_timer.h | 2 +- src/arm/chcore_v6m.c | 15 +- src/arm/chcore_v6m.h | 20 +- src/arm/chcore_v7m.c | 27 +- src/arm/chcore_v7m.h | 29 +- src/arm/chcore_v7m_asm.c | 91 - src/arm/chcoreasm_v6m.S | 16 +- src/arm/chcoreasm_v7m.S | 27 +- .../arm/chtypes_arm.h => src/arm/chtypes.h | 20 +- src/arm/cmparams.h | 5 +- src/arm/mpu.h | 22 +- src/avr/chconf_avr.h | 289 +- src/avr/chcore.c | 164 + src/avr/chcore.h | 542 ++ src/avr/chcore_timer.h | 2 +- src/avr/chtypes.h | 98 + src/avr/st_lld_avr.c | 50 +- src/avr/st_lld_avr.h | 162 + src/ch.h | 1 + src/chconf.h | 18 + src/chconf_rt.h | 20 - src/{chcore_rt.h => chcore.h} | 4 +- src/chlib.h | 1 + src/chlicense.h | 1 + src/{chtypes_rt.h => chtypes.h} | 4 +- src/hal/hal.h | 3 + src/hal/hal_st.c | 131 + src/hal/hal_st.h | 97 + src/hal/osal.h | 1028 +++ src/hal_st.h | 1 + src/hal_st_lld.h | 14 + .../src_org/rt => src/license}/chcustomer.h | 8 +- src/{rt => license}/chlicense.h | 6 +- src/license/chversion.h | 103 + src/license/license.dox | 37 + src/license/license.mk | 9 + src/oslib/dox/lib.dox | 85 + .../src_org/rt => src/oslib/include}/chbsem.h | 22 +- src/oslib/include/chfactory.h | 553 ++ src/oslib/include/chlib.h | 217 + .../rt => src/oslib/include}/chmboxes.h | 53 +- .../rt => src/oslib/include}/chmemcore.h | 78 +- .../oslib/include/chmemheaps.h | 22 +- src/{rt => oslib/include}/chmempools.h | 176 +- src/oslib/include/chobjfifos.h | 430 + src/oslib/include/chpipes.h | 208 + src/oslib/oslib.mk | 49 + src/oslib/readme.txt | 2 + src/oslib/src/chfactory.c | 810 ++ src/{rt => oslib/src}/chmboxes.c | 46 +- src/{rt => oslib/src}/chmemcore.c | 63 +- .../rt/chheap.c => src/oslib/src/chmemheaps.c | 44 +- src/{rt => oslib/src}/chmempools.c | 72 +- src/oslib/src/chpipes.c | 388 + src/rt/chvt.h | 755 -- src/rt/{ => include}/ch.h | 72 +- src/rt/{ => include}/chalign.h | 7 +- src/rt/include/chchecks.h | 263 + {extra/src_org/rt => src/rt/include}/chcond.h | 6 +- src/rt/{ => include}/chdebug.h | 4 +- .../src_org/rt => src/rt/include}/chdynamic.h | 2 +- .../src_org/rt => src/rt/include}/chevents.h | 25 +- src/rt/{ => include}/chmsg.h | 2 +- src/rt/{ => include}/chmtx.h | 23 +- src/rt/{ => include}/chregistry.h | 2 +- .../{chchecks.h => include/chrestrictions.h} | 23 +- src/rt/{ => include}/chschd.h | 27 +- {extra/src_org/rt => src/rt/include}/chsem.h | 8 +- .../src_org/rt => src/rt/include}/chstats.h | 2 +- src/rt/{ => include}/chsys.h | 23 +- .../rt => src/rt/include}/chsystypes.h | 13 +- src/rt/{ => include}/chthreads.h | 36 +- src/rt/include/chtime.h | 492 ++ src/rt/{ => include}/chtm.h | 2 +- src/rt/{ => include}/chtrace.h | 9 +- src/rt/include/chvt.h | 471 ++ {extra/src_org/rt => src/rt/src}/chcond.c | 30 +- src/rt/{ => src}/chdebug.c | 6 +- src/rt/{ => src}/chdynamic.c | 2 +- src/rt/{ => src}/chevents.c | 60 +- {extra/src_org/rt => src/rt/src}/chmsg.c | 6 +- src/rt/{ => src}/chmtx.c | 4 +- src/rt/{ => src}/chregistry.c | 4 +- src/rt/{ => src}/chschd.c | 31 +- {extra/src_org/rt => src/rt/src}/chsem.c | 24 +- src/rt/{ => src}/chstats.c | 2 +- src/rt/{ => src}/chsys.c | 12 +- {extra/src_org/rt => src/rt/src}/chthreads.c | 32 +- {extra/src_org/rt => src/rt/src}/chtm.c | 2 +- src/rt/{ => src}/chtrace.c | 12 +- {extra/src_org/rt => src/rt/src}/chvt.c | 75 +- src/sam3x/chconf_sam3x.h | 714 ++ src/sam3x/st_lld_sam3x.c | 7 +- src/samd/chconf_samd.h | 714 ++ src/samd/st_lld_samd.c | 7 +- src/teensy3/chconf_teensy3.h | 714 ++ src/teensy3/cmparams_teensy3.h | 2 +- src/teensy3/st_lld_teensy3.cpp | 29 + src/teensy3/st_lld_teenxy3.c | 33 - src/teensy4/chconf_teensy4.h | 722 ++ src/teensy4/cmparams_teensy4.h | 40 + src/teensy4/st_lld_teensy4.cpp | 80 + src/teensy4/st_lld_teensy4.h | 88 + 299 files changed, 69221 insertions(+), 24905 deletions(-) delete mode 100644 doc/html/arrowdown.png delete mode 100644 doc/html/arrowright.png create mode 100644 doc/html/menu.js create mode 100644 doc/html/menudata.js delete mode 100644 doc/html/search/all_3.html delete mode 100644 doc/html/search/all_3.js delete mode 100644 doc/html/search/functions_3.html delete mode 100644 doc/html/search/functions_3.js rename extra/src_org/CMSIS/{include => }/cmsis_armcc.h (73%) create mode 100644 extra/src_org/CMSIS/cmsis_armclang.h rename extra/src_org/CMSIS/{include/cmsis_armcc_V6.h => cmsis_armclang_ltm.h} (55%) create mode 100644 extra/src_org/CMSIS/cmsis_compiler.h create mode 100644 extra/src_org/CMSIS/cmsis_gcc.h create mode 100644 extra/src_org/CMSIS/cmsis_iccarm.h create mode 100644 extra/src_org/CMSIS/cmsis_version.h create mode 100644 extra/src_org/CMSIS/core_armv81mml.h create mode 100644 extra/src_org/CMSIS/core_armv8mbl.h create mode 100644 extra/src_org/CMSIS/core_armv8mml.h rename {src/CMSIS/include => extra/src_org/CMSIS}/core_cm0.h (71%) rename {src/CMSIS/include => extra/src_org/CMSIS}/core_cm0plus.h (74%) create mode 100644 extra/src_org/CMSIS/core_cm1.h create mode 100644 extra/src_org/CMSIS/core_cm23.h rename src/CMSIS/include/core_sc300.h => extra/src_org/CMSIS/core_cm3.h (81%) create mode 100644 extra/src_org/CMSIS/core_cm33.h create mode 100644 extra/src_org/CMSIS/core_cm35p.h rename extra/src_org/CMSIS/{include => }/core_cm4.h (83%) rename {src/CMSIS/include => extra/src_org/CMSIS}/core_cm7.h (82%) rename extra/src_org/CMSIS/{include => }/core_sc000.h (80%) rename extra/src_org/CMSIS/{include/core_cm3.h => core_sc300.h} (83%) delete mode 100644 extra/src_org/CMSIS/include/arm_common_tables.h delete mode 100644 extra/src_org/CMSIS/include/arm_const_structs.h delete mode 100644 extra/src_org/CMSIS/include/arm_math.h delete mode 100644 extra/src_org/CMSIS/include/cmsis_gcc.h delete mode 100644 extra/src_org/CMSIS/include/core_cmFunc.h delete mode 100644 extra/src_org/CMSIS/include/core_cmInstr.h delete mode 100644 extra/src_org/CMSIS/include/core_cmSimd.h create mode 100644 extra/src_org/CMSIS/mpu_armv7.h create mode 100644 extra/src_org/CMSIS/mpu_armv8.h create mode 100644 extra/src_org/CMSIS/tz_context.h rename src/arm/chconf_arm.h => extra/src_org/arm/chconf.h (72%) rename extra/src_org/arm/{chcore_arm.h => chcore.h} (99%) rename src/arm/chtypes_arm.h => extra/src_org/arm/chtypes.h (87%) create mode 100644 extra/src_org/avr/chconf.h rename src/avr/chcore_avr.c => extra/src_org/avr/chcore.c (93%) rename src/avr/chcore_avr.h => extra/src_org/avr/chcore.h (98%) create mode 100644 extra/src_org/avr/chcore_timer.h rename src/avr/chtypes_avr.h => extra/src_org/avr/chtypes.h (89%) create mode 100644 extra/src_org/hal/hal_st.c create mode 100644 extra/src_org/hal/hal_st.h create mode 100644 extra/src_org/hal/osal.h rename {src/rt => extra/src_org/license}/chcustomer.h (92%) rename extra/src_org/{rt => license}/chlicense.h (97%) create mode 100644 extra/src_org/license/chversion.h create mode 100644 extra/src_org/license/license.dox create mode 100644 extra/src_org/license/license.mk create mode 100644 extra/src_org/oslib/dox/lib.dox rename {src/rt => extra/src_org/oslib/include}/chbsem.h (95%) create mode 100644 extra/src_org/oslib/include/chfactory.h create mode 100644 extra/src_org/oslib/include/chlib.h rename {src/rt => extra/src_org/oslib/include}/chmboxes.h (77%) rename {src/rt => extra/src_org/oslib/include}/chmemcore.h (67%) rename src/rt/chheap.h => extra/src_org/oslib/include/chmemheaps.h (93%) rename extra/src_org/{rt => oslib/include}/chmempools.h (61%) create mode 100644 extra/src_org/oslib/include/chobjfifos.h create mode 100644 extra/src_org/oslib/include/chpipes.h create mode 100644 extra/src_org/oslib/oslib.mk create mode 100644 extra/src_org/oslib/readme.txt create mode 100644 extra/src_org/oslib/src/chfactory.c rename extra/src_org/{rt => oslib/src}/chmboxes.c (92%) rename extra/src_org/{rt => oslib/src}/chmemcore.c (72%) rename src/rt/chheap.c => extra/src_org/oslib/src/chmemheaps.c (90%) rename extra/src_org/{rt => oslib/src}/chmempools.c (83%) create mode 100644 extra/src_org/oslib/src/chpipes.c delete mode 100644 extra/src_org/rt/chvt.h rename extra/src_org/rt/{ => include}/ch.h (63%) rename extra/src_org/rt/{ => include}/chalign.h (96%) create mode 100644 extra/src_org/rt/include/chchecks.h rename {src/rt => extra/src_org/rt/include}/chcond.h (95%) rename extra/src_org/rt/{ => include}/chdebug.h (98%) rename {src/rt => extra/src_org/rt/include}/chdynamic.h (98%) rename {src/rt => extra/src_org/rt/include}/chevents.h (92%) rename extra/src_org/rt/{ => include}/chmsg.h (98%) rename extra/src_org/rt/{ => include}/chmtx.h (92%) rename extra/src_org/rt/{ => include}/chregistry.h (99%) rename extra/src_org/rt/{chchecks.h => include/chrestrictions.h} (87%) rename extra/src_org/rt/{ => include}/chschd.h (97%) rename {src/rt => extra/src_org/rt/include}/chsem.h (95%) rename {src/rt => extra/src_org/rt/include}/chstats.h (98%) rename extra/src_org/rt/{ => include}/chsys.h (96%) rename {src/rt => extra/src_org/rt/include}/chsystypes.h (92%) rename extra/src_org/rt/{ => include}/chthreads.h (92%) create mode 100644 extra/src_org/rt/include/chtime.h rename extra/src_org/rt/{ => include}/chtm.h (98%) rename extra/src_org/rt/{ => include}/chtrace.h (96%) create mode 100644 extra/src_org/rt/include/chvt.h rename {src/rt => extra/src_org/rt/src}/chcond.c (93%) rename extra/src_org/rt/{ => src}/chdebug.c (98%) rename extra/src_org/rt/{ => src}/chdynamic.c (99%) rename extra/src_org/rt/{ => src}/chevents.c (92%) rename {src/rt => extra/src_org/rt/src}/chmsg.c (95%) rename extra/src_org/rt/{ => src}/chmtx.c (99%) rename extra/src_org/rt/{ => src}/chregistry.c (98%) rename extra/src_org/rt/{ => src}/chschd.c (95%) rename {src/rt => extra/src_org/rt/src}/chsem.c (96%) rename extra/src_org/rt/{ => src}/chstats.c (98%) rename extra/src_org/rt/{ => src}/chsys.c (98%) rename {src/rt => extra/src_org/rt/src}/chthreads.c (96%) rename {src/rt => extra/src_org/rt/src}/chtm.c (98%) rename extra/src_org/rt/{ => src}/chtrace.c (94%) rename {src/rt => extra/src_org/rt/src}/chvt.c (80%) create mode 100644 extra/srcdiff.txt rename src/CMSIS/{include => }/cmsis_armcc.h (73%) create mode 100644 src/CMSIS/cmsis_armclang.h rename src/CMSIS/{include/cmsis_armcc_V6.h => cmsis_armclang_ltm.h} (55%) create mode 100644 src/CMSIS/cmsis_compiler.h create mode 100644 src/CMSIS/cmsis_gcc.h create mode 100644 src/CMSIS/cmsis_iccarm.h create mode 100644 src/CMSIS/cmsis_version.h create mode 100644 src/CMSIS/core_armv81mml.h create mode 100644 src/CMSIS/core_armv8mbl.h create mode 100644 src/CMSIS/core_armv8mml.h rename {extra/src_org/CMSIS/include => src/CMSIS}/core_cm0.h (71%) rename {extra/src_org/CMSIS/include => src/CMSIS}/core_cm0plus.h (74%) create mode 100644 src/CMSIS/core_cm1.h create mode 100644 src/CMSIS/core_cm23.h rename extra/src_org/CMSIS/include/core_sc300.h => src/CMSIS/core_cm3.h (81%) create mode 100644 src/CMSIS/core_cm33.h create mode 100644 src/CMSIS/core_cm35p.h rename src/CMSIS/{include => }/core_cm4.h (83%) rename {extra/src_org/CMSIS/include => src/CMSIS}/core_cm7.h (82%) rename src/CMSIS/{include => }/core_sc000.h (80%) rename src/CMSIS/{include/core_cm3.h => core_sc300.h} (83%) delete mode 100644 src/CMSIS/include/arm_common_tables.h delete mode 100644 src/CMSIS/include/arm_const_structs.h delete mode 100644 src/CMSIS/include/arm_math.h delete mode 100644 src/CMSIS/include/cmsis_gcc.h delete mode 100644 src/CMSIS/include/core_cmFunc.h delete mode 100644 src/CMSIS/include/core_cmInstr.h delete mode 100644 src/CMSIS/include/core_cmSimd.h create mode 100644 src/CMSIS/mpu_armv7.h create mode 100644 src/CMSIS/mpu_armv8.h create mode 100644 src/CMSIS/tz_context.h rename src/arm/{chcore_arm.h => chcore.h} (99%) delete mode 100644 src/arm/chcore_v7m_asm.c rename extra/src_org/arm/chtypes_arm.h => src/arm/chtypes.h (89%) create mode 100644 src/avr/chcore.c create mode 100644 src/avr/chcore.h create mode 100644 src/avr/chtypes.h create mode 100644 src/avr/st_lld_avr.h create mode 100644 src/ch.h create mode 100644 src/chconf.h delete mode 100644 src/chconf_rt.h rename src/{chcore_rt.h => chcore.h} (67%) create mode 100644 src/chlib.h create mode 100644 src/chlicense.h rename src/{chtypes_rt.h => chtypes.h} (73%) create mode 100644 src/hal/hal.h create mode 100644 src/hal/hal_st.c create mode 100644 src/hal/hal_st.h create mode 100644 src/hal/osal.h create mode 100644 src/hal_st.h create mode 100644 src/hal_st_lld.h rename {extra/src_org/rt => src/license}/chcustomer.h (92%) rename src/{rt => license}/chlicense.h (97%) create mode 100644 src/license/chversion.h create mode 100644 src/license/license.dox create mode 100644 src/license/license.mk create mode 100644 src/oslib/dox/lib.dox rename {extra/src_org/rt => src/oslib/include}/chbsem.h (95%) create mode 100644 src/oslib/include/chfactory.h create mode 100644 src/oslib/include/chlib.h rename {extra/src_org/rt => src/oslib/include}/chmboxes.h (77%) rename {extra/src_org/rt => src/oslib/include}/chmemcore.h (67%) rename extra/src_org/rt/chheap.h => src/oslib/include/chmemheaps.h (93%) rename src/{rt => oslib/include}/chmempools.h (61%) create mode 100644 src/oslib/include/chobjfifos.h create mode 100644 src/oslib/include/chpipes.h create mode 100644 src/oslib/oslib.mk create mode 100644 src/oslib/readme.txt create mode 100644 src/oslib/src/chfactory.c rename src/{rt => oslib/src}/chmboxes.c (92%) rename src/{rt => oslib/src}/chmemcore.c (72%) rename extra/src_org/rt/chheap.c => src/oslib/src/chmemheaps.c (90%) rename src/{rt => oslib/src}/chmempools.c (83%) create mode 100644 src/oslib/src/chpipes.c delete mode 100644 src/rt/chvt.h rename src/rt/{ => include}/ch.h (62%) rename src/rt/{ => include}/chalign.h (96%) create mode 100644 src/rt/include/chchecks.h rename {extra/src_org/rt => src/rt/include}/chcond.h (95%) rename src/rt/{ => include}/chdebug.h (98%) rename {extra/src_org/rt => src/rt/include}/chdynamic.h (98%) rename {extra/src_org/rt => src/rt/include}/chevents.h (92%) rename src/rt/{ => include}/chmsg.h (98%) rename src/rt/{ => include}/chmtx.h (92%) rename src/rt/{ => include}/chregistry.h (99%) rename src/rt/{chchecks.h => include/chrestrictions.h} (87%) rename src/rt/{ => include}/chschd.h (97%) rename {extra/src_org/rt => src/rt/include}/chsem.h (95%) rename {extra/src_org/rt => src/rt/include}/chstats.h (98%) rename src/rt/{ => include}/chsys.h (96%) rename {extra/src_org/rt => src/rt/include}/chsystypes.h (92%) rename src/rt/{ => include}/chthreads.h (92%) create mode 100644 src/rt/include/chtime.h rename src/rt/{ => include}/chtm.h (98%) rename src/rt/{ => include}/chtrace.h (96%) create mode 100644 src/rt/include/chvt.h rename {extra/src_org/rt => src/rt/src}/chcond.c (93%) rename src/rt/{ => src}/chdebug.c (98%) rename src/rt/{ => src}/chdynamic.c (99%) rename src/rt/{ => src}/chevents.c (92%) rename {extra/src_org/rt => src/rt/src}/chmsg.c (95%) rename src/rt/{ => src}/chmtx.c (99%) rename src/rt/{ => src}/chregistry.c (98%) rename src/rt/{ => src}/chschd.c (95%) rename {extra/src_org/rt => src/rt/src}/chsem.c (96%) rename src/rt/{ => src}/chstats.c (98%) rename src/rt/{ => src}/chsys.c (98%) rename {extra/src_org/rt => src/rt/src}/chthreads.c (96%) rename {extra/src_org/rt => src/rt/src}/chtm.c (98%) rename src/rt/{ => src}/chtrace.c (94%) rename {extra/src_org/rt => src/rt/src}/chvt.c (80%) create mode 100644 src/sam3x/chconf_sam3x.h create mode 100644 src/samd/chconf_samd.h create mode 100644 src/teensy3/chconf_teensy3.h create mode 100644 src/teensy3/st_lld_teensy3.cpp delete mode 100644 src/teensy3/st_lld_teenxy3.c create mode 100644 src/teensy4/chconf_teensy4.h create mode 100644 src/teensy4/cmparams_teensy4.h create mode 100644 src/teensy4/st_lld_teensy4.cpp create mode 100644 src/teensy4/st_lld_teensy4.h diff --git a/README.md b/README.md index c1768c4..e9a6823 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,40 @@ #### ChRt - ChibiOS/RT Arduino Library -This is the initial release of an improved version of ChibiOS-Arduino. +This is a version of ChibiOS for Arduino. I am starting a new repository since this version is not backward -compatible with the previous library. Both AVR and ARM are now in +compatible with the previous libraries. Both AVR and ARM are now in a single library. -I have done some testing with an Uno, Zero, Due, and Teensy 3.6 but -bugs are still likely. +This version adds support for Teensy 4.0. Teensy 4.0 has support for free +running tick-less mode and periodic mode. The default for Teensy 4.0 is +tick-less mode. Edit libraries/ChRt/src/teensy4/chconf_teensy4.h to +select periodic mode or change parameters for Teensy 4. + +See this article about ChibiOS tick-less mode: + +http://www.chibios.org/dokuwiki/doku.php?id=chibios:articles:tickless + +AVR also supports tick-less mode. The default is periodic mode. Edit +libraries/ChRt/src/teensy4/chconf_teensy4.h to select tick-less mode. + +Due, SAMD, and Teensy 3.x are supported in periodic mode. The base code for ChRt was written by Giovanni Di Sirio, the author of ChibiOS/Nil and ChibiOS/RT. +See this site for detailed documentation of ChibiOS/RT 19.1. + http://www.chibios.org/dokuwiki/doku.php -The code is version 4.0.0 of ChibiOS/RT from a recent, 17.6, version of ChibiOS. +The kernel is version 6.0.3 of ChibiOS/RT from ChibiOS release 19.1.3. + +https://osdn.net/projects/chibios/releases -If you are installing from GitHub repo zips, rename the folder ChRt +If you are installing from the GitHub repo zips, rename the folder ChRt before copying it to your Arduino/libraries folder. -Please read doc/ChRt.html for more information. See the Examples section -of the html documentation. +Please read libraries/ChRt/doc/ChRt.html for more information. See the +Examples section of the html documentation. Start with the ChBlink example which is traditional for almost every RTOS. diff --git a/doc/MainPage/ChRtMainPage.h b/doc/MainPage/ChRtMainPage.h index 0d17604..2d4b60f 100644 --- a/doc/MainPage/ChRtMainPage.h +++ b/doc/MainPage/ChRtMainPage.h @@ -1,7 +1,7 @@ /** \mainpage ChibiOS RTOS library
William Greiman
-
1 Aug 2017
+
1 Oct 2019
\section Intro Introduction @@ -16,11 +16,11 @@ MCAL (Microcontroller Abstraction Layer) development team based in the Arzano This package contains a version of the ChbiOS/RT RTOS for AVR Arduinos, SAMD Arduinos, Arduino Due, and Teensy 3.x. -The port is based on ChibiOS 17.6.0. The ChibiOS/RT kernel is version 4.0.0. +The port is based on ChibiOS 19.1.3. The ChibiOS/RT kernel is version 6.0.3. These systems are packaged as the Arduino library ChRt. -The documentation for ChibiOS/RT 4.0.0 is located here: +The documentation for ChibiOS/RT 6.0.3 is located here: http://www.chibios.org/dokuwiki/doku.php?id=chibios:documentation:start diff --git a/doc/html/_ch_rt_8h.html b/doc/html/_ch_rt_8h.html index c82ec1d..92ac58e 100644 --- a/doc/html/_ch_rt_8h.html +++ b/doc/html/_ch_rt_8h.html @@ -3,17 +3,15 @@ - -ChRt: C:/Users/bill/Documents/ArduinoSdFs/libraries/ChRt/src/ChRt.h File Reference + + +ChRt: C:/Users/bill/Documents/ArduinoChRt/libraries/ChRt/src/ChRt.h File Reference - @@ -32,38 +30,22 @@ - + - - + + + +
main ChRt include file. More...

-
#include "rt/ch.h"
+
#include "rt/include/ch.h"
+#include "hal_st.h"

Go to the source code of this file.

@@ -117,13 +100,13 @@ - -
 
void errorBlink (int n)
 
void st_lld_init (void)
 

Detailed Description

main ChRt include file.

Macro Definition Documentation

- + +

◆ HANDLER_STACK_SIZE

+
@@ -137,7 +120,9 @@

Function Documentation

- + +

◆ chBegin()

+
@@ -159,7 +144,9 @@

Function Documentation

- + +

◆ chUnusedHandlerStack()

+
@@ -176,7 +163,9 @@

Function Documentation

- + +

◆ chUnusedMainStack()

+
@@ -193,7 +182,9 @@

Function Documentation

- + +

◆ chUnusedThreadStack()

+
@@ -228,7 +219,9 @@

Function Documentation

- + +

◆ errorBlink()

+
@@ -251,7 +244,9 @@

Function Documentation

- + +

◆ heapEnd()

+
@@ -265,23 +260,6 @@

Function Documentation

Returns
Heap end address. Best if called from the main thread.
-
- - -
-
-
- - - - - - - -
void st_lld_init (void )
-
-

Low level ST driver initialization.

-
@@ -289,7 +267,7 @@

Function Documentation

diff --git a/doc/html/_ch_rt_8h_source.html b/doc/html/_ch_rt_8h_source.html index 4828e3c..113a9d1 100644 --- a/doc/html/_ch_rt_8h_source.html +++ b/doc/html/_ch_rt_8h_source.html @@ -3,17 +3,15 @@ - -ChRt: C:/Users/bill/Documents/ArduinoSdFs/libraries/ChRt/src/ChRt.h Source File + + +ChRt: C:/Users/bill/Documents/ArduinoChRt/libraries/ChRt/src/ChRt.h Source File - @@ -32,38 +30,22 @@
- + - - + + + +
ChRt.h
-Go to the documentation of this file.
1 #ifndef ChRt_h
-
2 #define ChRt_h
-
3 
-
7 #include "rt/ch.h"
-
8 
-
10 #define HANDLER_STACK_SIZE 400
-
11 
-
16 void chBegin(void (*mainThread)());
-
22 size_t chUnusedHandlerStack();
-
28 size_t chUnusedMainStack();
-
39 size_t chUnusedThreadStack(void *wsp, size_t size);
-
40 
-
42 uint8_t* heapEnd();
-
43 #ifdef __cplusplus
-
44 extern "C" {
-
45 #endif
-
46 
-
50  void errorBlink(int n);
-
52  void st_lld_init(void);
-
53 #ifdef __cplusplus
-
54 }
-
55 #endif
-
56 #endif // ChRt_h
-
size_t chUnusedThreadStack(void *wsp, size_t size)
Definition: ChRt.cpp:123
-
void st_lld_init(void)
-
size_t chUnusedMainStack()
Definition: ChRt.cpp:110
+Go to the documentation of this file.
1 #ifndef ChRt_h
2 #define ChRt_h
3 
7 #include "rt/include/ch.h"
8 #include "hal_st.h"
9 
11 #define HANDLER_STACK_SIZE 400
12 
17 void chBegin(void (*mainThread)());
23 size_t chUnusedHandlerStack();
29 size_t chUnusedMainStack();
40 size_t chUnusedThreadStack(void *wsp, size_t size);
41 
43 uint8_t* heapEnd();
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47 
51  void errorBlink(int n);
52 #ifdef __cplusplus
53 }
54 #endif
55 #endif // ChRt_h
size_t chUnusedThreadStack(void *wsp, size_t size)
Definition: ChRt.cpp:134
+
size_t chUnusedMainStack()
Definition: ChRt.cpp:121
uint8_t * heapEnd()
Definition: ChRt.cpp:21
-
void chBegin(void(*mainThread)())
Definition: ChRt.cpp:52
+
void chBegin(void(*mainThread)())
Definition: ChRt.cpp:63
void errorBlink(int n)
-
size_t chUnusedHandlerStack()
Definition: ChRt.cpp:102
+
size_t chUnusedHandlerStack()
Definition: ChRt.cpp:113
diff --git a/doc/html/_ch_rt_main_page_8h_source.html b/doc/html/_ch_rt_main_page_8h_source.html index e4c0332..ddbfd91 100644 --- a/doc/html/_ch_rt_main_page_8h_source.html +++ b/doc/html/_ch_rt_main_page_8h_source.html @@ -3,7 +3,8 @@ - + + ChRt: MainPage/ChRtMainPage.h Source File @@ -11,9 +12,6 @@ - @@ -32,38 +30,22 @@
- + - - + + + +
ChRtMainPage.h
-
1 
-
+
1 
diff --git a/doc/html/arrowdown.png b/doc/html/arrowdown.png deleted file mode 100644 index 0b63f6d38c4b9ec907b820192ebe9724ed6eca22..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 246 zcmVkw!R34#Lv2LOS^S2tZA31X++9RY}n zChwn@Z)Wz*WWHH{)HDtJnq&A2hk$b-y(>?@z0iHr41EKCGp#T5?07*qoM6N<$f(V3Pvj6}9 diff --git a/doc/html/arrowright.png b/doc/html/arrowright.png deleted file mode 100644 index c6ee22f937a07d1dbfc27c669d11f8ed13e2f152..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 229 zcmV^P)R?RzRoKvklcaQ%HF6%rK2&ZgO(-ihJ_C zzrKgp4jgO( fd_(yg|3PpEQb#9`a?Pz_00000NkvXXu0mjftR`5K diff --git a/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html index b9ca6fc..3c105b8 100644 --- a/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html +++ b/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html @@ -3,17 +3,15 @@ - -ChRt: C:/Users/bill/Documents/ArduinoSdFs/libraries/ChRt/src Directory Reference + + +ChRt: C:/Users/bill/Documents/ArduinoChRt/libraries/ChRt/src Directory Reference - @@ -32,32 +30,22 @@ - + - + + + +

Files

-file  ChRt.cpp -  file  ChRt.h [code]  main ChRt include file.
  @@ -96,7 +82,7 @@ diff --git a/doc/html/dir_f1e74b9d244c08400ce0f6c55d14c7e5.html b/doc/html/dir_f1e74b9d244c08400ce0f6c55d14c7e5.html index 133e86e..576929c 100644 --- a/doc/html/dir_f1e74b9d244c08400ce0f6c55d14c7e5.html +++ b/doc/html/dir_f1e74b9d244c08400ce0f6c55d14c7e5.html @@ -3,7 +3,8 @@ - + + ChRt: MainPage Directory Reference @@ -11,9 +12,6 @@ - @@ -32,32 +30,22 @@
- + - + + + +
MainPage Directory Reference
- - - - -

-Files

file  ChRtMainPage.h [code]
 
diff --git a/doc/html/doxygen.css b/doc/html/doxygen.css index b2c94ac..266c8b3 100644 --- a/doc/html/doxygen.css +++ b/doc/html/doxygen.css @@ -1,9 +1,13 @@ -/* The standard CSS for doxygen 1.8.10 */ +/* The standard CSS for doxygen 1.8.14 */ body, table, div, p, dl { font: 400 14px/22px Roboto,sans-serif; } +p.reference, p.definition { + font: 400 14px/22px Roboto,sans-serif; +} + /* @group Heading Levels */ h1.groupheader { @@ -173,7 +177,7 @@ pre.fragment { } div.fragment { - padding: 4px 6px; + padding: 0px; margin: 4px 8px 4px 2px; background-color: #FBFCFD; border: 1px solid #C4CFE5; @@ -206,6 +210,11 @@ div.line { transition-duration: 0.5s; } +div.line:after { + content:"\000A"; + white-space: pre; +} + div.line.glow { background-color: cyan; box-shadow: 0 0 10px cyan; @@ -227,6 +236,15 @@ span.lineno a:hover { background-color: #C8C8C8; } +.lineno { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + div.ah, span.ah { background-color: black; font-weight: bold; @@ -242,7 +260,7 @@ div.ah, span.ah { -webkit-box-shadow: 2px 2px 3px #999; -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); - background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000 110%); } div.classindex ul { @@ -496,6 +514,29 @@ table.memberdecls { /* Styles for detailed member documentation */ +.memtitle { + padding: 8px; + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + border-top-right-radius: 4px; + border-top-left-radius: 4px; + margin-bottom: -1px; + background-image: url('nav_f.png'); + background-repeat: repeat-x; + background-color: #E2E8F2; + line-height: 1.25; + font-weight: 300; + float:left; +} + +.permalink +{ + font-size: 65%; + display: inline-block; + vertical-align: middle; +} + .memtemplate { font-size: 80%; color: #4665A2; @@ -534,7 +575,7 @@ table.memberdecls { } .memname { - font-weight: bold; + font-weight: 400; margin-left: 6px; } @@ -550,24 +591,24 @@ table.memberdecls { color: #253555; font-weight: bold; text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); - background-image:url('nav_f.png'); - background-repeat:repeat-x; - background-color: #E2E8F2; + background-color: #DFE5F1; /* opera specific markup */ box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); border-top-right-radius: 4px; - border-top-left-radius: 4px; /* firefox specific markup */ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; -moz-border-radius-topright: 4px; - -moz-border-radius-topleft: 4px; /* webkit specific markup */ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); -webkit-border-top-right-radius: 4px; - -webkit-border-top-left-radius: 4px; } +.overload { + font-family: "courier new",courier,monospace; + font-size: 65%; +} + .memdoc, dl.reflist dd { border-bottom: 1px solid #A8B8D9; border-left: 1px solid #A8B8D9; @@ -832,6 +873,10 @@ address { color: #2A3D61; } +table.doxtable caption { + caption-side: top; +} + table.doxtable { border-collapse:collapse; margin-top: 4px; @@ -905,6 +950,7 @@ table.fieldtable { padding-bottom: 4px; padding-top: 5px; text-align:left; + font-weight: 400; -moz-border-radius-topleft: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-left-radius: 4px; @@ -997,6 +1043,18 @@ div.summary a white-space: nowrap; } +table.classindex +{ + margin: 10px; + white-space: nowrap; + margin-left: 3%; + margin-right: 3%; + width: 94%; + border: 0; + border-spacing: 0; + padding: 0; +} + div.ingroups { font-size: 8pt; @@ -1157,6 +1215,11 @@ dl.section dd { text-align: center; } +.plantumlgraph +{ + text-align: center; +} + .diagraph { text-align: center; @@ -1196,7 +1259,7 @@ div.toc { border-radius: 7px 7px 7px 7px; float: right; height: auto; - margin: 0 20px 10px 10px; + margin: 0 8px 10px 10px; width: 200px; } @@ -1452,3 +1515,82 @@ tr.heading h2 { } } +/* @group Markdown */ + +/* +table.markdownTable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.markdownTable td, table.markdownTable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.markdownTableHead tr { +} + +table.markdownTableBodyLeft td, table.markdownTable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +th.markdownTableHeadLeft th.markdownTableHeadRight th.markdownTableHeadCenter th.markdownTableHeadNone { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +th.markdownTableHeadLeft { + text-align: left +} + +th.markdownTableHeadRight { + text-align: right +} + +th.markdownTableHeadCenter { + text-align: center +} +*/ + +table.markdownTable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.markdownTable td, table.markdownTable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.markdownTable tr { +} + +th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +th.markdownTableHeadLeft, td.markdownTableBodyLeft { + text-align: left +} + +th.markdownTableHeadRight, td.markdownTableBodyRight { + text-align: right +} + +th.markdownTableHeadCenter, td.markdownTableBodyCenter { + text-align: center +} + + +/* @end */ diff --git a/doc/html/dynsections.js b/doc/html/dynsections.js index 85e1836..c1ce122 100644 --- a/doc/html/dynsections.js +++ b/doc/html/dynsections.js @@ -1,3 +1,26 @@ +/* + @licstart The following is the entire license notice for the + JavaScript code in this file. + + Copyright (C) 1997-2017 by Dimitri van Heesch + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + @licend The above is the entire license notice + for the JavaScript code in this file + */ function toggleVisibility(linkObj) { var base = $(linkObj).attr('id'); @@ -15,7 +38,7 @@ function toggleVisibility(linkObj) summary.hide(); $(linkObj).removeClass('closed').addClass('opened'); $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); - } + } return false; } @@ -37,7 +60,7 @@ function toggleLevel(level) $(this).show(); } else if (l==level+1) { i.removeClass('iconfclosed iconfopen').addClass('iconfclosed'); - a.html('►'); + a.html('▶'); $(this).show(); } else { $(this).hide(); @@ -64,7 +87,7 @@ function toggleFolder(id) // replace down arrow by right arrow for current row var currentRowSpans = currentRow.find("span"); currentRowSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed"); - currentRowSpans.filter(".arrow").html('►'); + currentRowSpans.filter(".arrow").html('▶'); rows.filter("[id^=row_"+id+"]").hide(); // hide all children } else { // we are SHOWING // replace right arrow by down arrow for current row @@ -74,7 +97,7 @@ function toggleFolder(id) // replace down arrows by right arrows for child rows var childRowsSpans = childRows.find("span"); childRowsSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed"); - childRowsSpans.filter(".arrow").html('►'); + childRowsSpans.filter(".arrow").html('▶'); childRows.show(); //show all children } updateStripes(); @@ -94,4 +117,4 @@ function toggleInherit(id) $(img).attr('src',src.substring(0,src.length-10)+'open.png'); } } - +/* @license-end */ diff --git a/doc/html/files.html b/doc/html/files.html index c027732..1c34109 100644 --- a/doc/html/files.html +++ b/doc/html/files.html @@ -3,7 +3,8 @@ - + + ChRt: File List @@ -11,9 +12,6 @@ - @@ -32,38 +30,22 @@ - + - - + + + + - + - - - + + + +
heapEnd() : ChRt.h -
  • st_lld_init() -: ChRt.h -
  • diff --git a/doc/html/globals_defs.html b/doc/html/globals_defs.html index 97d7b11..83e5b58 100644 --- a/doc/html/globals_defs.html +++ b/doc/html/globals_defs.html @@ -3,7 +3,8 @@ - + + ChRt: File Members @@ -11,9 +12,6 @@ - @@ -32,45 +30,22 @@ - + - - - + + + + - + - - - + + + +
    heapEnd() : ChRt.h -
  • st_lld_init() -: ChRt.h -
  • diff --git a/doc/html/index.html b/doc/html/index.html index 7fd881b..ae219b8 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -3,7 +3,8 @@ - + + ChRt: ChibiOS RTOS library @@ -11,9 +12,6 @@ - @@ -32,32 +30,22 @@ - + - + + + +
    ChibiOS RTOS library
    -
    William Greiman
    1 Aug 2017

    +
    William Greiman
    1 Oct 2019

    Introduction

    Giovanni Di Sirio is the author of ChibiOS. Giovanni has over 20 years of experience in the embedded software field.

    Giovanni has been at STMicroelectronics since 2003, currently Software Architect in the AUTOSAR (AUTomotive Open System ARchitecture) MCAL (Microcontroller Abstraction Layer) development team based in the Arzano (Naples), automotive division.

    This package contains a version of the ChbiOS/RT RTOS for AVR Arduinos, SAMD Arduinos, Arduino Due, and Teensy 3.x.

    -

    The port is based on ChibiOS 17.6.0. The ChibiOS/RT kernel is version 4.0.0.

    +

    The port is based on ChibiOS 19.1.3. The ChibiOS/RT kernel is version 6.0.3.

    These systems are packaged as the Arduino library ChRt.

    -

    The documentation for ChibiOS/RT 4.0.0 is located here:

    +

    The documentation for ChibiOS/RT 6.0.3 is located here:

    http://www.chibios.org/dokuwiki/doku.php?id=chibios:documentation:start

    The next two sections, What an RTOS is, and What an RTOS is not, are from Giovanni's ChibiOS book at the above website.

    @@ -138,10 +126,7 @@

    The print thread also checks Serial for input. The print thread will displays stack usage information for each thread.

    An interesting experiment is to observe the non-atomic behavior of incrementing count in loop().

    Comment out noInterrupts() and interrupts() like this:

    -
    // noInterrupts();
    -
    count++;
    -
    // interrupts();
    -

    You will then see occasional large counts when the print thread tries to zero count while the loop() thread is incrementing count.

    +
    // noInterrupts();
    count++;
    // interrupts();

    You will then see occasional large counts when the print thread tries to zero count while the loop() thread is incrementing count.

    Semaphore Context Switch Time

    You need an oscilloscope to run this example. This example is chContextTime.ino.

    @@ -195,7 +180,7 @@

    diff --git a/doc/html/jquery.js b/doc/html/jquery.js index 1f4d0b4..2771c74 100644 --- a/doc/html/jquery.js +++ b/doc/html/jquery.js @@ -1,3 +1,31 @@ +/* + @licstart The following is the entire license notice for the + JavaScript code in this file. + + Copyright (C) 1997-2017 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice + for the JavaScript code in this file + */ /*! * jQuery JavaScript Library v1.7.1 * http://jquery.com/ @@ -53,7 +81,7 @@ (function(b,c){var a=false;b(document).mouseup(function(d){a=false});b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var d=this;this.element.bind("mousedown."+this.widgetName,function(e){return d._mouseDown(e)}).bind("click."+this.widgetName,function(e){if(true===b.data(e.target,d.widgetName+".preventClickEvent")){b.removeData(e.target,d.widgetName+".preventClickEvent");e.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(f){if(a){return}(this._mouseStarted&&this._mouseUp(f));this._mouseDownEvent=f;var e=this,g=(f.which==1),d=(typeof this.options.cancel=="string"&&f.target.nodeName?b(f.target).closest(this.options.cancel).length:false);if(!g||d||!this._mouseCapture(f)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(f)&&this._mouseDelayMet(f)){this._mouseStarted=(this._mouseStart(f)!==false);if(!this._mouseStarted){f.preventDefault();return true}}if(true===b.data(f.target,this.widgetName+".preventClickEvent")){b.removeData(f.target,this.widgetName+".preventClickEvent")}this._mouseMoveDelegate=function(h){return e._mouseMove(h)};this._mouseUpDelegate=function(h){return e._mouseUp(h)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);f.preventDefault();a=true;return true},_mouseMove:function(d){if(b.browser.msie&&!(document.documentMode>=9)&&!d.button){return this._mouseUp(d)}if(this._mouseStarted){this._mouseDrag(d);return d.preventDefault()}if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,d)!==false);(this._mouseStarted?this._mouseDrag(d):this._mouseUp(d))}return !this._mouseStarted},_mouseUp:function(d){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(d.target==this._mouseDownEvent.target){b.data(d.target,this.widgetName+".preventClickEvent",true)}this._mouseStop(d)}return false},_mouseDistanceMet:function(d){return(Math.max(Math.abs(this._mouseDownEvent.pageX-d.pageX),Math.abs(this._mouseDownEvent.pageY-d.pageY))>=this.options.distance)},_mouseDelayMet:function(d){return this.mouseDelayMet},_mouseStart:function(d){},_mouseDrag:function(d){},_mouseStop:function(d){},_mouseCapture:function(d){return true}})})(jQuery);(function(c,d){c.widget("ui.resizable",c.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000},_create:function(){var f=this,k=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(k.aspectRatio),aspectRatio:k.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:k.helper||k.ghost||k.animate?k.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){this.element.wrap(c('
    ').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=k.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var l=this.handles.split(",");this.handles={};for(var g=0;g

    ');if(/sw|se|ne|nw/.test(j)){h.css({zIndex:++k.zIndex})}if("se"==j){h.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[j]=".ui-resizable-"+j;this.element.append(h)}}this._renderAxis=function(q){q=q||this.element;for(var n in this.handles){if(this.handles[n].constructor==String){this.handles[n]=c(this.handles[n],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var o=c(this.handles[n],this.element),p=0;p=/sw|ne|nw|se|n|s/.test(n)?o.outerHeight():o.outerWidth();var m=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join("");q.css(m,p);this._proportionallyResize()}if(!c(this.handles[n]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!f.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}f.axis=i&&i[1]?i[1]:"se"}});if(k.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){if(k.disabled){return}c(this).removeClass("ui-resizable-autohide");f._handles.show()},function(){if(k.disabled){return}if(!f.resizing){c(this).addClass("ui-resizable-autohide");f._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var e=function(g){c(g).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){e(this.element);var f=this.element;f.after(this.originalElement.css({position:f.css("position"),width:f.outerWidth(),height:f.outerHeight(),top:f.css("top"),left:f.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);e(this.originalElement);return this},_mouseCapture:function(f){var g=false;for(var e in this.handles){if(c(this.handles[e])[0]==f.target){g=true}}return !this.options.disabled&&g},_mouseStart:function(g){var j=this.options,f=this.element.position(),e=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(e.is(".ui-draggable")||(/absolute/).test(e.css("position"))){e.css({position:"absolute",top:f.top,left:f.left})}this._renderProxy();var k=b(this.helper.css("left")),h=b(this.helper.css("top"));if(j.containment){k+=c(j.containment).scrollLeft()||0;h+=c(j.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:k,top:h};this.size=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalSize=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalPosition={left:k,top:h};this.sizeDiff={width:e.outerWidth()-e.width(),height:e.outerHeight()-e.height()};this.originalMousePosition={left:g.pageX,top:g.pageY};this.aspectRatio=(typeof j.aspectRatio=="number")?j.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var i=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",i=="auto"?this.axis+"-resize":i);e.addClass("ui-resizable-resizing");this._propagate("start",g);return true},_mouseDrag:function(e){var h=this.helper,g=this.options,m={},q=this,j=this.originalMousePosition,n=this.axis;var r=(e.pageX-j.left)||0,p=(e.pageY-j.top)||0;var i=this._change[n];if(!i){return false}var l=i.apply(this,[e,r,p]),k=c.browser.msie&&c.browser.version<7,f=this.sizeDiff;this._updateVirtualBoundaries(e.shiftKey);if(this._aspectRatio||e.shiftKey){l=this._updateRatio(l,e)}l=this._respectSize(l,e);this._propagate("resize",e);h.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(l);this._trigger("resize",e,this.ui());return false},_mouseStop:function(h){this.resizing=false;var i=this.options,m=this;if(this._helper){var g=this._proportionallyResizeElements,e=g.length&&(/textarea/i).test(g[0].nodeName),f=e&&c.ui.hasScroll(g[0],"left")?0:m.sizeDiff.height,k=e?0:m.sizeDiff.width;var n={width:(m.helper.width()-k),height:(m.helper.height()-f)},j=(parseInt(m.element.css("left"),10)+(m.position.left-m.originalPosition.left))||null,l=(parseInt(m.element.css("top"),10)+(m.position.top-m.originalPosition.top))||null;if(!i.animate){this.element.css(c.extend(n,{top:l,left:j}))}m.helper.height(m.size.height);m.helper.width(m.size.width);if(this._helper&&!i.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",h);if(this._helper){this.helper.remove()}return false},_updateVirtualBoundaries:function(g){var j=this.options,i,h,f,k,e;e={minWidth:a(j.minWidth)?j.minWidth:0,maxWidth:a(j.maxWidth)?j.maxWidth:Infinity,minHeight:a(j.minHeight)?j.minHeight:0,maxHeight:a(j.maxHeight)?j.maxHeight:Infinity};if(this._aspectRatio||g){i=e.minHeight*this.aspectRatio;f=e.minWidth/this.aspectRatio;h=e.maxHeight*this.aspectRatio;k=e.maxWidth/this.aspectRatio;if(i>e.minWidth){e.minWidth=i}if(f>e.minHeight){e.minHeight=f}if(hl.width),s=a(l.height)&&i.minHeight&&(i.minHeight>l.height);if(h){l.width=i.minWidth}if(s){l.height=i.minHeight}if(t){l.width=i.maxWidth}if(m){l.height=i.maxHeight}var f=this.originalPosition.left+this.originalSize.width,p=this.position.top+this.size.height;var k=/sw|nw|w/.test(q),e=/nw|ne|n/.test(q);if(h&&k){l.left=f-i.minWidth}if(t&&k){l.left=f-i.maxWidth}if(s&&e){l.top=p-i.minHeight}if(m&&e){l.top=p-i.maxHeight}var n=!l.width&&!l.height;if(n&&!l.left&&l.top){l.top=null}else{if(n&&!l.top&&l.left){l.left=null}}return l},_proportionallyResize:function(){var k=this.options;if(!this._proportionallyResizeElements.length){return}var g=this.helper||this.element;for(var f=0;f

    ');var e=c.browser.msie&&c.browser.version<7,g=(e?1:0),h=(e?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+h,height:this.element.outerHeight()+h,position:"absolute",left:this.elementOffset.left-g+"px",top:this.elementOffset.top-g+"px",zIndex:++i.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(g,f,e){return{width:this.originalSize.width+f}},w:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{left:i.left+f,width:g.width-f}},n:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{top:i.top+e,height:g.height-e}},s:function(g,f,e){return{height:this.originalSize.height+e}},se:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},sw:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[g,f,e]))},ne:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},nw:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[g,f,e]))}},_propagate:function(f,e){c.ui.plugin.call(this,f,[e,this.ui()]);(f!="resize"&&this._trigger(f,e,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});c.extend(c.ui.resizable,{version:"1.8.18"});c.ui.plugin.add("resizable","alsoResize",{start:function(f,g){var e=c(this).data("resizable"),i=e.options;var h=function(j){c(j).each(function(){var k=c(this);k.data("resizable-alsoresize",{width:parseInt(k.width(),10),height:parseInt(k.height(),10),left:parseInt(k.css("left"),10),top:parseInt(k.css("top"),10)})})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.parentNode){if(i.alsoResize.length){i.alsoResize=i.alsoResize[0];h(i.alsoResize)}else{c.each(i.alsoResize,function(j){h(j)})}}else{h(i.alsoResize)}},resize:function(g,i){var f=c(this).data("resizable"),j=f.options,h=f.originalSize,l=f.originalPosition;var k={height:(f.size.height-h.height)||0,width:(f.size.width-h.width)||0,top:(f.position.top-l.top)||0,left:(f.position.left-l.left)||0},e=function(m,n){c(m).each(function(){var q=c(this),r=c(this).data("resizable-alsoresize"),p={},o=n&&n.length?n:q.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];c.each(o,function(s,u){var t=(r[u]||0)+(k[u]||0);if(t&&t>=0){p[u]=t||null}});q.css(p)})};if(typeof(j.alsoResize)=="object"&&!j.alsoResize.nodeType){c.each(j.alsoResize,function(m,n){e(m,n)})}else{e(j.alsoResize)}},stop:function(e,f){c(this).removeData("resizable-alsoresize")}});c.ui.plugin.add("resizable","animate",{stop:function(i,n){var p=c(this).data("resizable"),j=p.options;var h=p._proportionallyResizeElements,e=h.length&&(/textarea/i).test(h[0].nodeName),f=e&&c.ui.hasScroll(h[0],"left")?0:p.sizeDiff.height,l=e?0:p.sizeDiff.width;var g={width:(p.size.width-l),height:(p.size.height-f)},k=(parseInt(p.element.css("left"),10)+(p.position.left-p.originalPosition.left))||null,m=(parseInt(p.element.css("top"),10)+(p.position.top-p.originalPosition.top))||null;p.element.animate(c.extend(g,m&&k?{top:m,left:k}:{}),{duration:j.animateDuration,easing:j.animateEasing,step:function(){var o={width:parseInt(p.element.css("width"),10),height:parseInt(p.element.css("height"),10),top:parseInt(p.element.css("top"),10),left:parseInt(p.element.css("left"),10)};if(h&&h.length){c(h[0]).css({width:o.width,height:o.height})}p._updateCache(o);p._propagate("resize",i)}})}});c.ui.plugin.add("resizable","containment",{start:function(f,r){var t=c(this).data("resizable"),j=t.options,l=t.element;var g=j.containment,k=(g instanceof c)?g.get(0):(/parent/.test(g))?l.parent().get(0):g;if(!k){return}t.containerElement=c(k);if(/document/.test(g)||g==document){t.containerOffset={left:0,top:0};t.containerPosition={left:0,top:0};t.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var n=c(k),i=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){i[p]=b(n.css("padding"+o))});t.containerOffset=n.offset();t.containerPosition=n.position();t.containerSize={height:(n.innerHeight()-i[3]),width:(n.innerWidth()-i[1])};var q=t.containerOffset,e=t.containerSize.height,m=t.containerSize.width,h=(c.ui.hasScroll(k,"left")?k.scrollWidth:m),s=(c.ui.hasScroll(k)?k.scrollHeight:e);t.parentData={element:k,left:q.left,top:q.top,width:h,height:s}}},resize:function(g,q){var t=c(this).data("resizable"),i=t.options,f=t.containerSize,p=t.containerOffset,m=t.size,n=t.position,r=t._aspectRatio||g.shiftKey,e={top:0,left:0},h=t.containerElement;if(h[0]!=document&&(/static/).test(h.css("position"))){e=p}if(n.left<(t._helper?p.left:0)){t.size.width=t.size.width+(t._helper?(t.position.left-p.left):(t.position.left-e.left));if(r){t.size.height=t.size.width/i.aspectRatio}t.position.left=i.helper?p.left:0}if(n.top<(t._helper?p.top:0)){t.size.height=t.size.height+(t._helper?(t.position.top-p.top):t.position.top);if(r){t.size.width=t.size.height*i.aspectRatio}t.position.top=t._helper?p.top:0}t.offset.left=t.parentData.left+t.position.left;t.offset.top=t.parentData.top+t.position.top;var l=Math.abs((t._helper?t.offset.left-e.left:(t.offset.left-e.left))+t.sizeDiff.width),s=Math.abs((t._helper?t.offset.top-e.top:(t.offset.top-p.top))+t.sizeDiff.height);var k=t.containerElement.get(0)==t.element.parent().get(0),j=/relative|absolute/.test(t.containerElement.css("position"));if(k&&j){l-=t.parentData.left}if(l+t.size.width>=t.parentData.width){t.size.width=t.parentData.width-l;if(r){t.size.height=t.size.width/t.aspectRatio}}if(s+t.size.height>=t.parentData.height){t.size.height=t.parentData.height-s;if(r){t.size.width=t.size.height*t.aspectRatio}}},stop:function(f,n){var q=c(this).data("resizable"),g=q.options,l=q.position,m=q.containerOffset,e=q.containerPosition,i=q.containerElement;var j=c(q.helper),r=j.offset(),p=j.outerWidth()-q.sizeDiff.width,k=j.outerHeight()-q.sizeDiff.height;if(q._helper&&!g.animate&&(/relative/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}if(q._helper&&!g.animate&&(/static/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}}});c.ui.plugin.add("resizable","ghost",{start:function(g,h){var e=c(this).data("resizable"),i=e.options,f=e.size;e.ghost=e.originalElement.clone();e.ghost.css({opacity:0.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof i.ghost=="string"?i.ghost:"");e.ghost.appendTo(e.helper)},resize:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost){e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})}},stop:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost&&e.helper){e.helper.get(0).removeChild(e.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(e,m){var p=c(this).data("resizable"),h=p.options,k=p.size,i=p.originalSize,j=p.originalPosition,n=p.axis,l=h._aspectRatio||e.shiftKey;h.grid=typeof h.grid=="number"?[h.grid,h.grid]:h.grid;var g=Math.round((k.width-i.width)/(h.grid[0]||1))*(h.grid[0]||1),f=Math.round((k.height-i.height)/(h.grid[1]||1))*(h.grid[1]||1);if(/^(se|s|e)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f}else{if(/^(ne)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f}else{if(/^(sw)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.left=j.left-g}else{p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f;p.position.left=j.left-g}}}}});var b=function(e){return parseInt(e,10)||0};var a=function(e){return !isNaN(parseInt(e,10))}})(jQuery);/*! * jQuery hashchange event - v1.3 - 7/21/2010 * http://benalman.com/projects/jquery-hashchange-plugin/ - * + * * Copyright (c) 2010 "Cowboy" Ben Alman * Dual licensed under the MIT and GPL licenses. * http://benalman.com/about/license/ @@ -65,4 +93,23 @@ Released under MIT license. https://raw.github.com/stevenbenner/jquery-powertip/master/LICENSE.txt */ -(function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{a(jQuery)}}(function(k){var A=k(document),s=k(window),w=k("body");var n="displayController",e="hasActiveHover",d="forcedOpen",u="hasMouseMove",f="mouseOnToPopup",g="originalTitle",y="powertip",o="powertipjq",l="powertiptarget",E=180/Math.PI;var c={isTipOpen:false,isFixedTipOpen:false,isClosing:false,tipOpenImminent:false,activeHover:null,currentX:0,currentY:0,previousX:0,previousY:0,desyncTimeout:null,mouseTrackingActive:false,delayInProgress:false,windowWidth:0,windowHeight:0,scrollTop:0,scrollLeft:0};var p={none:0,top:1,bottom:2,left:4,right:8};k.fn.powerTip=function(F,N){if(!this.length){return this}if(k.type(F)==="string"&&k.powerTip[F]){return k.powerTip[F].call(this,this,N)}var O=k.extend({},k.fn.powerTip.defaults,F),G=new x(O);h();this.each(function M(){var R=k(this),Q=R.data(y),P=R.data(o),T=R.data(l),S;if(R.data(n)){k.powerTip.destroy(R)}S=R.attr("title");if(!Q&&!T&&!P&&S){R.data(y,S);R.data(g,S);R.removeAttr("title")}R.data(n,new t(R,O,G))});if(!O.manual){this.on({"mouseenter.powertip":function J(P){k.powerTip.show(this,P)},"mouseleave.powertip":function L(){k.powerTip.hide(this)},"focus.powertip":function K(){k.powerTip.show(this)},"blur.powertip":function H(){k.powerTip.hide(this,true)},"keydown.powertip":function I(P){if(P.keyCode===27){k.powerTip.hide(this,true)}}})}return this};k.fn.powerTip.defaults={fadeInTime:200,fadeOutTime:100,followMouse:false,popupId:"powerTip",intentSensitivity:7,intentPollInterval:100,closeDelay:100,placement:"n",smartPlacement:false,offset:10,mouseOnToPopup:false,manual:false};k.fn.powerTip.smartPlacementLists={n:["n","ne","nw","s"],e:["e","ne","se","w","nw","sw","n","s","e"],s:["s","se","sw","n"],w:["w","nw","sw","e","ne","se","n","s","w"],nw:["nw","w","sw","n","s","se","nw"],ne:["ne","e","se","n","s","sw","ne"],sw:["sw","w","nw","s","n","ne","sw"],se:["se","e","ne","s","n","nw","se"],"nw-alt":["nw-alt","n","ne-alt","sw-alt","s","se-alt","w","e"],"ne-alt":["ne-alt","n","nw-alt","se-alt","s","sw-alt","e","w"],"sw-alt":["sw-alt","s","se-alt","nw-alt","n","ne-alt","w","e"],"se-alt":["se-alt","s","sw-alt","ne-alt","n","nw-alt","e","w"]};k.powerTip={show:function z(F,G){if(G){i(G);c.previousX=G.pageX;c.previousY=G.pageY;k(F).data(n).show()}else{k(F).first().data(n).show(true,true)}return F},reposition:function r(F){k(F).first().data(n).resetPosition();return F},hide:function D(G,F){if(G){k(G).first().data(n).hide(F)}else{if(c.activeHover){c.activeHover.data(n).hide(true)}}return G},destroy:function C(G){k(G).off(".powertip").each(function F(){var I=k(this),H=[g,n,e,d];if(I.data(g)){I.attr("title",I.data(g));H.push(y)}I.removeData(H)});return G}};k.powerTip.showTip=k.powerTip.show;k.powerTip.closeTip=k.powerTip.hide;function b(){var F=this;F.top="auto";F.left="auto";F.right="auto";F.bottom="auto";F.set=function(H,G){if(k.isNumeric(G)){F[H]=Math.round(G)}}}function t(K,N,F){var J=null;function L(P,Q){M();if(!K.data(e)){if(!P){c.tipOpenImminent=true;J=setTimeout(function O(){J=null;I()},N.intentPollInterval)}else{if(Q){K.data(d,true)}F.showTip(K)}}}function G(P){M();c.tipOpenImminent=false;if(K.data(e)){K.data(d,false);if(!P){c.delayInProgress=true;J=setTimeout(function O(){J=null;F.hideTip(K);c.delayInProgress=false},N.closeDelay)}else{F.hideTip(K)}}}function I(){var Q=Math.abs(c.previousX-c.currentX),O=Math.abs(c.previousY-c.currentY),P=Q+O;if(P",{id:Q.popupId});if(w.length===0){w=k("body")}w.append(O)}if(Q.followMouse){if(!O.data(u)){A.on("mousemove",M);s.on("scroll",M);O.data(u,true)}}if(Q.mouseOnToPopup){O.on({mouseenter:function L(){if(O.data(f)){if(c.activeHover){c.activeHover.data(n).cancel()}}},mouseleave:function N(){if(c.activeHover){c.activeHover.data(n).hide()}}})}function I(S){S.data(e,true);O.queue(function R(T){H(S);T()})}function H(S){var U;if(!S.data(e)){return}if(c.isTipOpen){if(!c.isClosing){K(c.activeHover)}O.delay(100).queue(function R(V){H(S);V()});return}S.trigger("powerTipPreRender");U=B(S);if(U){O.empty().append(U)}else{return}S.trigger("powerTipRender");c.activeHover=S;c.isTipOpen=true;O.data(f,Q.mouseOnToPopup);if(!Q.followMouse){G(S);c.isFixedTipOpen=true}else{M()}O.fadeIn(Q.fadeInTime,function T(){if(!c.desyncTimeout){c.desyncTimeout=setInterval(J,500)}S.trigger("powerTipOpen")})}function K(R){c.isClosing=true;c.activeHover=null;c.isTipOpen=false;c.desyncTimeout=clearInterval(c.desyncTimeout);R.data(e,false);R.data(d,false);O.fadeOut(Q.fadeOutTime,function S(){var T=new b();c.isClosing=false;c.isFixedTipOpen=false;O.removeClass();T.set("top",c.currentY+Q.offset);T.set("left",c.currentX+Q.offset);O.css(T);R.trigger("powerTipClose")})}function M(){if(!c.isFixedTipOpen&&(c.isTipOpen||(c.tipOpenImminent&&O.data(u)))){var R=O.outerWidth(),V=O.outerHeight(),U=new b(),S,T;U.set("top",c.currentY+Q.offset);U.set("left",c.currentX+Q.offset);S=m(U,R,V);if(S!==p.none){T=a(S);if(T===1){if(S===p.right){U.set("left",c.windowWidth-R)}else{if(S===p.bottom){U.set("top",c.scrollTop+c.windowHeight-V)}}}else{U.set("left",c.currentX-R-Q.offset);U.set("top",c.currentY-V-Q.offset)}}O.css(U)}}function G(S){var R,T;if(Q.smartPlacement){R=k.fn.powerTip.smartPlacementLists[Q.placement];k.each(R,function(U,W){var V=m(F(S,W),O.outerWidth(),O.outerHeight());T=W;if(V===p.none){return false}})}else{F(S,Q.placement);T=Q.placement}O.addClass(T)}function F(U,T){var R=0,S,W,V=new b();V.set("top",0);V.set("left",0);O.css(V);do{S=O.outerWidth();W=O.outerHeight();V=P.compute(U,T,S,W,Q.offset);O.css(V)}while(++R<=5&&(S!==O.outerWidth()||W!==O.outerHeight()));return V}function J(){var R=false;if(c.isTipOpen&&!c.isClosing&&!c.delayInProgress){if(c.activeHover.data(e)===false||c.activeHover.is(":disabled")){R=true}else{if(!v(c.activeHover)&&!c.activeHover.is(":focus")&&!c.activeHover.data(d)){if(O.data(f)){if(!v(O)){R=true}}else{R=true}}}if(R){K(c.activeHover)}}}this.showTip=I;this.hideTip=K;this.resetPosition=G}function q(F){return window.SVGElement&&F[0] instanceof SVGElement}function h(){if(!c.mouseTrackingActive){c.mouseTrackingActive=true;k(function H(){c.scrollLeft=s.scrollLeft();c.scrollTop=s.scrollTop();c.windowWidth=s.width();c.windowHeight=s.height()});A.on("mousemove",i);s.on({resize:function G(){c.windowWidth=s.width();c.windowHeight=s.height()},scroll:function F(){var I=s.scrollLeft(),J=s.scrollTop();if(I!==c.scrollLeft){c.currentX+=I-c.scrollLeft;c.scrollLeft=I}if(J!==c.scrollTop){c.currentY+=J-c.scrollTop;c.scrollTop=J}}})}}function i(F){c.currentX=F.pageX;c.currentY=F.pageY}function v(F){var H=F.offset(),J=F[0].getBoundingClientRect(),I=J.right-J.left,G=J.bottom-J.top;return c.currentX>=H.left&&c.currentX<=H.left+I&&c.currentY>=H.top&&c.currentY<=H.top+G}function B(I){var G=I.data(y),F=I.data(o),K=I.data(l),H,J;if(G){if(k.isFunction(G)){G=G.call(I[0])}J=G}else{if(F){if(k.isFunction(F)){F=F.call(I[0])}if(F.length>0){J=F.clone(true,true)}}else{if(K){H=k("#"+K);if(H.length>0){J=H.html()}}}}return J}function m(M,L,K){var G=c.scrollTop,J=c.scrollLeft,I=G+c.windowHeight,F=J+c.windowWidth,H=p.none;if(M.topI||Math.abs(M.bottom-c.windowHeight)>I){H|=p.bottom}if(M.leftF){H|=p.left}if(M.left+L>F||M.right",{id:Q.popupId});if(w.length===0){w=k("body")}w.append(O)}if(Q.followMouse){if(!O.data(u)){A.on("mousemove",M);s.on("scroll",M);O.data(u,true)}}if(Q.mouseOnToPopup){O.on({mouseenter:function L(){if(O.data(f)){if(c.activeHover){c.activeHover.data(n).cancel()}}},mouseleave:function N(){if(c.activeHover){c.activeHover.data(n).hide()}}})}function I(S){S.data(e,true);O.queue(function R(T){H(S);T()})}function H(S){var U;if(!S.data(e)){return}if(c.isTipOpen){if(!c.isClosing){K(c.activeHover)}O.delay(100).queue(function R(V){H(S);V()});return}S.trigger("powerTipPreRender");U=B(S);if(U){O.empty().append(U)}else{return}S.trigger("powerTipRender");c.activeHover=S;c.isTipOpen=true;O.data(f,Q.mouseOnToPopup);if(!Q.followMouse){G(S);c.isFixedTipOpen=true}else{M()}O.fadeIn(Q.fadeInTime,function T(){if(!c.desyncTimeout){c.desyncTimeout=setInterval(J,500)}S.trigger("powerTipOpen")})}function K(R){c.isClosing=true;c.activeHover=null;c.isTipOpen=false;c.desyncTimeout=clearInterval(c.desyncTimeout);R.data(e,false);R.data(d,false);O.fadeOut(Q.fadeOutTime,function S(){var T=new b();c.isClosing=false;c.isFixedTipOpen=false;O.removeClass();T.set("top",c.currentY+Q.offset);T.set("left",c.currentX+Q.offset);O.css(T);R.trigger("powerTipClose")})}function M(){if(!c.isFixedTipOpen&&(c.isTipOpen||(c.tipOpenImminent&&O.data(u)))){var R=O.outerWidth(),V=O.outerHeight(),U=new b(),S,T;U.set("top",c.currentY+Q.offset);U.set("left",c.currentX+Q.offset);S=m(U,R,V);if(S!==p.none){T=a(S);if(T===1){if(S===p.right){U.set("left",c.windowWidth-R)}else{if(S===p.bottom){U.set("top",c.scrollTop+c.windowHeight-V)}}}else{U.set("left",c.currentX-R-Q.offset);U.set("top",c.currentY-V-Q.offset)}}O.css(U)}}function G(S){var R,T;if(Q.smartPlacement){R=k.fn.powerTip.smartPlacementLists[Q.placement];k.each(R,function(U,W){var V=m(F(S,W),O.outerWidth(),O.outerHeight());T=W;if(V===p.none){return false}})}else{F(S,Q.placement);T=Q.placement}O.addClass(T)}function F(U,T){var R=0,S,W,V=new b();V.set("top",0);V.set("left",0);O.css(V);do{S=O.outerWidth();W=O.outerHeight();V=P.compute(U,T,S,W,Q.offset);O.css(V)}while(++R<=5&&(S!==O.outerWidth()||W!==O.outerHeight()));return V}function J(){var R=false;if(c.isTipOpen&&!c.isClosing&&!c.delayInProgress){if(c.activeHover.data(e)===false||c.activeHover.is(":disabled")){R=true}else{if(!v(c.activeHover)&&!c.activeHover.is(":focus")&&!c.activeHover.data(d)){if(O.data(f)){if(!v(O)){R=true}}else{R=true}}}if(R){K(c.activeHover)}}}this.showTip=I;this.hideTip=K;this.resetPosition=G}function q(F){return window.SVGElement&&F[0] instanceof SVGElement}function h(){if(!c.mouseTrackingActive){c.mouseTrackingActive=true;k(function H(){c.scrollLeft=s.scrollLeft();c.scrollTop=s.scrollTop();c.windowWidth=s.width();c.windowHeight=s.height()});A.on("mousemove",i);s.on({resize:function G(){c.windowWidth=s.width();c.windowHeight=s.height()},scroll:function F(){var I=s.scrollLeft(),J=s.scrollTop();if(I!==c.scrollLeft){c.currentX+=I-c.scrollLeft;c.scrollLeft=I}if(J!==c.scrollTop){c.currentY+=J-c.scrollTop;c.scrollTop=J}}})}}function i(F){c.currentX=F.pageX;c.currentY=F.pageY}function v(F){var H=F.offset(),J=F[0].getBoundingClientRect(),I=J.right-J.left,G=J.bottom-J.top;return c.currentX>=H.left&&c.currentX<=H.left+I&&c.currentY>=H.top&&c.currentY<=H.top+G}function B(I){var G=I.data(y),F=I.data(o),K=I.data(l),H,J;if(G){if(k.isFunction(G)){G=G.call(I[0])}J=G}else{if(F){if(k.isFunction(F)){F=F.call(I[0])}if(F.length>0){J=F.clone(true,true)}}else{if(K){H=k("#"+K);if(H.length>0){J=H.html()}}}}return J}function m(M,L,K){var G=c.scrollTop,J=c.scrollLeft,I=G+c.windowHeight,F=J+c.windowWidth,H=p.none;if(M.topI||Math.abs(M.bottom-c.windowHeight)>I){H|=p.bottom}if(M.leftF){H|=p.left}if(M.left+L>F||M.right1){return}h.preventDefault();var j=h.originalEvent.changedTouches[0],g=document.createEvent("MouseEvents");g.initMouseEvent(i,true,true,window,1,j.screenX,j.screenY,j.clientX,j.clientY,false,false,false,false,0,null);h.target.dispatchEvent(g)}d._touchStart=function(h){var g=this;if(a||!g._mouseCapture(h.originalEvent.changedTouches[0])){return}a=true;g._touchMoved=false;e(h,"mouseover");e(h,"mousemove");e(h,"mousedown")};d._touchMove=function(g){if(!a){return}this._touchMoved=true;e(g,"mousemove")};d._touchEnd=function(g){if(!a){return}e(g,"mouseup");e(g,"mouseout");if(!this._touchMoved){e(g,"click")}a=false};d._mouseInit=function(){var g=this;g.element.bind({touchstart:b.proxy(g,"_touchStart"),touchmove:b.proxy(g,"_touchMove"),touchend:b.proxy(g,"_touchEnd")});f.call(g)};d._mouseDestroy=function(){var g=this;g.element.unbind({touchstart:b.proxy(g,"_touchStart"),touchmove:b.proxy(g,"_touchMove"),touchend:b.proxy(g,"_touchEnd")});c.call(g)}})(jQuery);/*! + * SmartMenus jQuery Plugin - v1.0.0 - January 27, 2016 + * http://www.smartmenus.org/ + * + * Copyright Vasil Dinkov, Vadikom Web Ltd. + * http://vadikom.com + * + * Licensed MIT + */ +(function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{if(typeof module==="object"&&typeof module.exports==="object"){module.exports=a(require("jquery"))}else{a(jQuery)}}}(function(a){var b=[],e=!!window.createPopup,f=false,d="ontouchstart" in window,h=false,g=window.requestAnimationFrame||function(l){return setTimeout(l,1000/60)},c=window.cancelAnimationFrame||function(l){clearTimeout(l)};function k(m){var n=".smartmenus_mouse";if(!h&&!m){var o=true,l=null;a(document).bind(i([["mousemove",function(s){var t={x:s.pageX,y:s.pageY,timeStamp:new Date().getTime()};if(l){var q=Math.abs(l.x-t.x),p=Math.abs(l.y-t.y);if((q>0||p>0)&&q<=2&&p<=2&&t.timeStamp-l.timeStamp<=300){f=true;if(o){var r=a(s.target).closest("a");if(r.is("a")){a.each(b,function(){if(a.contains(this.$root[0],r[0])){this.itemEnter({currentTarget:r[0]});return false}})}o=false}}}l=t}],[d?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut",function(p){if(j(p.originalEvent)){f=false}}]],n));h=true}else{if(h&&m){a(document).unbind(n);h=false}}}function j(l){return !/^(4|mouse)$/.test(l.pointerType)}function i(l,n){if(!n){n=""}var m={};a.each(l,function(o,p){m[p[0].split(" ").join(n+" ")+n]=p[1]});return m}a.SmartMenus=function(m,l){this.$root=a(m);this.opts=l;this.rootId="";this.accessIdPrefix="";this.$subArrow=null;this.activatedItems=[];this.visibleSubMenus=[];this.showTimeout=0;this.hideTimeout=0;this.scrollTimeout=0;this.clickActivated=false;this.focusActivated=false;this.zIndexInc=0;this.idInc=0;this.$firstLink=null;this.$firstSub=null;this.disabled=false;this.$disableOverlay=null;this.$touchScrollingSub=null;this.cssTransforms3d="perspective" in m.style||"webkitPerspective" in m.style;this.wasCollapsible=false;this.init()};a.extend(a.SmartMenus,{hideAll:function(){a.each(b,function(){this.menuHideAll()})},destroy:function(){while(b.length){b[0].destroy()}k(true)},prototype:{init:function(n){var l=this;if(!n){b.push(this);this.rootId=(new Date().getTime()+Math.random()+"").replace(/\D/g,"");this.accessIdPrefix="sm-"+this.rootId+"-";if(this.$root.hasClass("sm-rtl")){this.opts.rightToLeftSubMenus=true}var r=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).bind(i([["mouseover focusin",a.proxy(this.rootOver,this)],["mouseout focusout",a.proxy(this.rootOut,this)],["keydown",a.proxy(this.rootKeyDown,this)]],r)).delegate("a",i([["mouseenter",a.proxy(this.itemEnter,this)],["mouseleave",a.proxy(this.itemLeave,this)],["mousedown",a.proxy(this.itemDown,this)],["focus",a.proxy(this.itemFocus,this)],["blur",a.proxy(this.itemBlur,this)],["click",a.proxy(this.itemClick,this)]],r));r+=this.rootId;if(this.opts.hideOnClick){a(document).bind(i([["touchstart",a.proxy(this.docTouchStart,this)],["touchmove",a.proxy(this.docTouchMove,this)],["touchend",a.proxy(this.docTouchEnd,this)],["click",a.proxy(this.docClick,this)]],r))}a(window).bind(i([["resize orientationchange",a.proxy(this.winResize,this)]],r));if(this.opts.subIndicators){this.$subArrow=a("").addClass("sub-arrow");if(this.opts.subIndicatorsText){this.$subArrow.html(this.opts.subIndicatorsText)}}k()}this.$firstSub=this.$root.find("ul").each(function(){l.menuInit(a(this))}).eq(0);this.$firstLink=this.$root.find("a").eq(0);if(this.opts.markCurrentItem){var p=/(index|default)\.[^#\?\/]*/i,m=/#.*/,q=window.location.href.replace(p,""),o=q.replace(m,"");this.$root.find("a").each(function(){var s=this.href.replace(p,""),t=a(this);if(s==q||s==o){t.addClass("current");if(l.opts.markCurrentTree){t.parentsUntil("[data-smartmenus-id]","ul").each(function(){a(this).dataSM("parent-a").addClass("current")})}}})}this.wasCollapsible=this.isCollapsible()},destroy:function(m){if(!m){var n=".smartmenus";this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").unbind(n).undelegate(n);n+=this.rootId;a(document).unbind(n);a(window).unbind(n);if(this.opts.subIndicators){this.$subArrow=null}}this.menuHideAll();var l=this;this.$root.find("ul").each(function(){var o=a(this);if(o.dataSM("scroll-arrows")){o.dataSM("scroll-arrows").remove()}if(o.dataSM("shown-before")){if(l.opts.subMenusMinWidth||l.opts.subMenusMaxWidth){o.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap")}if(o.dataSM("scroll-arrows")){o.dataSM("scroll-arrows").remove()}o.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})}if((o.attr("id")||"").indexOf(l.accessIdPrefix)==0){o.removeAttr("id")}}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("ie-shim").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded");this.$root.find("a.has-submenu").each(function(){var o=a(this);if(o.attr("id").indexOf(l.accessIdPrefix)==0){o.removeAttr("id")}}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub");if(this.opts.subIndicators){this.$root.find("span.sub-arrow").remove()}if(this.opts.markCurrentItem){this.$root.find("a.current").removeClass("current")}if(!m){this.$root=null;this.$firstLink=null;this.$firstSub=null;if(this.$disableOverlay){this.$disableOverlay.remove();this.$disableOverlay=null}b.splice(a.inArray(this,b),1)}},disable:function(l){if(!this.disabled){this.menuHideAll();if(!l&&!this.opts.isPopup&&this.$root.is(":visible")){var m=this.$root.offset();this.$disableOverlay=a('
    ').css({position:"absolute",top:m.top,left:m.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(true),opacity:0}).appendTo(document.body)}this.disabled=true}},docClick:function(l){if(this.$touchScrollingSub){this.$touchScrollingSub=null;return}if(this.visibleSubMenus.length&&!a.contains(this.$root[0],l.target)||a(l.target).is("a")){this.menuHideAll()}},docTouchEnd:function(m){if(!this.lastTouch){return}if(this.visibleSubMenus.length&&(this.lastTouch.x2===undefined||this.lastTouch.x1==this.lastTouch.x2)&&(this.lastTouch.y2===undefined||this.lastTouch.y1==this.lastTouch.y2)&&(!this.lastTouch.target||!a.contains(this.$root[0],this.lastTouch.target))){if(this.hideTimeout){clearTimeout(this.hideTimeout);this.hideTimeout=0}var l=this;this.hideTimeout=setTimeout(function(){l.menuHideAll()},350)}this.lastTouch=null},docTouchMove:function(m){if(!this.lastTouch){return}var l=m.originalEvent.touches[0];this.lastTouch.x2=l.pageX;this.lastTouch.y2=l.pageY},docTouchStart:function(m){var l=m.originalEvent.touches[0];this.lastTouch={x1:l.pageX,y1:l.pageY,target:l.target}},enable:function(){if(this.disabled){if(this.$disableOverlay){this.$disableOverlay.remove();this.$disableOverlay=null}this.disabled=false}},getClosestMenu:function(m){var l=a(m).closest("ul");while(l.dataSM("in-mega")){l=l.parent().closest("ul")}return l[0]||null},getHeight:function(l){return this.getOffset(l,true)},getOffset:function(n,l){var m;if(n.css("display")=="none"){m={position:n[0].style.position,visibility:n[0].style.visibility};n.css({position:"absolute",visibility:"hidden"}).show()}var o=n[0].getBoundingClientRect&&n[0].getBoundingClientRect(),p=o&&(l?o.height||o.bottom-o.top:o.width||o.right-o.left);if(!p&&p!==0){p=l?n[0].offsetHeight:n[0].offsetWidth}if(m){n.hide().css(m)}return p},getStartZIndex:function(l){var m=parseInt(this[l?"$root":"$firstSub"].css("z-index"));if(!l&&isNaN(m)){m=parseInt(this.$root.css("z-index"))}return !isNaN(m)?m:1},getTouchPoint:function(l){return l.touches&&l.touches[0]||l.changedTouches&&l.changedTouches[0]||l},getViewport:function(l){var m=l?"Height":"Width",o=document.documentElement["client"+m],n=window["inner"+m];if(n){o=Math.min(o,n)}return o},getViewportHeight:function(){return this.getViewport(true)},getViewportWidth:function(){return this.getViewport()},getWidth:function(l){return this.getOffset(l)},handleEvents:function(){return !this.disabled&&this.isCSSOn()},handleItemEvents:function(l){return this.handleEvents()&&!this.isLinkInMegaMenu(l)},isCollapsible:function(){return this.$firstSub.css("position")=="static"},isCSSOn:function(){return this.$firstLink.css("display")=="block"},isFixed:function(){var l=this.$root.css("position")=="fixed";if(!l){this.$root.parentsUntil("body").each(function(){if(a(this).css("position")=="fixed"){l=true;return false}})}return l},isLinkInMegaMenu:function(l){return a(this.getClosestMenu(l[0])).hasClass("mega-menu")},isTouchMode:function(){return !f||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(p,l){var n=p.closest("ul"),q=n.dataSM("level");if(q>1&&(!this.activatedItems[q-2]||this.activatedItems[q-2][0]!=n.dataSM("parent-a")[0])){var m=this;a(n.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(n).each(function(){m.itemActivate(a(this).dataSM("parent-a"))})}if(!this.isCollapsible()||l){this.menuHideSubMenus(!this.activatedItems[q-1]||this.activatedItems[q-1][0]!=p[0]?q-1:q)}this.activatedItems[q-1]=p;if(this.$root.triggerHandler("activate.smapi",p[0])===false){return}var o=p.dataSM("sub");if(o&&(this.isTouchMode()||(!this.opts.showOnClick||this.clickActivated))){this.menuShow(o)}},itemBlur:function(m){var l=a(m.currentTarget);if(!this.handleItemEvents(l)){return}this.$root.triggerHandler("blur.smapi",l[0])},itemClick:function(o){var n=a(o.currentTarget);if(!this.handleItemEvents(n)){return}if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==n.closest("ul")[0]){this.$touchScrollingSub=null;o.stopPropagation();return false}if(this.$root.triggerHandler("click.smapi",n[0])===false){return false}var p=a(o.target).is("span.sub-arrow"),m=n.dataSM("sub"),l=m?m.dataSM("level")==2:false;if(m&&!m.is(":visible")){if(this.opts.showOnClick&&l){this.clickActivated=true}this.itemActivate(n);if(m.is(":visible")){this.focusActivated=true;return false}}else{if(this.isCollapsible()&&p){this.itemActivate(n);this.menuHide(m);return false}}if(this.opts.showOnClick&&l||n.hasClass("disabled")||this.$root.triggerHandler("select.smapi",n[0])===false){return false}},itemDown:function(m){var l=a(m.currentTarget);if(!this.handleItemEvents(l)){return}l.dataSM("mousedown",true)},itemEnter:function(n){var m=a(n.currentTarget);if(!this.handleItemEvents(m)){return}if(!this.isTouchMode()){if(this.showTimeout){clearTimeout(this.showTimeout);this.showTimeout=0}var l=this;this.showTimeout=setTimeout(function(){l.itemActivate(m)},this.opts.showOnClick&&m.closest("ul").dataSM("level")==1?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",m[0])},itemFocus:function(m){var l=a(m.currentTarget);if(!this.handleItemEvents(l)){return}if(this.focusActivated&&(!this.isTouchMode()||!l.dataSM("mousedown"))&&(!this.activatedItems.length||this.activatedItems[this.activatedItems.length-1][0]!=l[0])){this.itemActivate(l,true)}this.$root.triggerHandler("focus.smapi",l[0])},itemLeave:function(m){var l=a(m.currentTarget);if(!this.handleItemEvents(l)){return}if(!this.isTouchMode()){l[0].blur();if(this.showTimeout){clearTimeout(this.showTimeout);this.showTimeout=0}}l.removeDataSM("mousedown");this.$root.triggerHandler("mouseleave.smapi",l[0])},menuHide:function(m){if(this.$root.triggerHandler("beforehide.smapi",m[0])===false){return}m.stop(true,true);if(m.css("display")!="none"){var l=function(){m.css("z-index","")};if(this.isCollapsible()){if(this.opts.collapsibleHideFunction){this.opts.collapsibleHideFunction.call(this,m,l)}else{m.hide(this.opts.collapsibleHideDuration,l)}}else{if(this.opts.hideFunction){this.opts.hideFunction.call(this,m,l)}else{m.hide(this.opts.hideDuration,l)}}if(m.dataSM("ie-shim")){m.dataSM("ie-shim").remove().css({"-webkit-transform":"",transform:""})}if(m.dataSM("scroll")){this.menuScrollStop(m);m.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).unbind(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()}m.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false");m.attr({"aria-expanded":"false","aria-hidden":"true"});var n=m.dataSM("level");this.activatedItems.splice(n-1,1);this.visibleSubMenus.splice(a.inArray(m,this.visibleSubMenus),1);this.$root.triggerHandler("hide.smapi",m[0])}},menuHideAll:function(){if(this.showTimeout){clearTimeout(this.showTimeout);this.showTimeout=0}var m=this.opts.isPopup?1:0;for(var l=this.visibleSubMenus.length-1;l>=m;l--){this.menuHide(this.visibleSubMenus[l])}if(this.opts.isPopup){this.$root.stop(true,true);if(this.$root.is(":visible")){if(this.opts.hideFunction){this.opts.hideFunction.call(this,this.$root)}else{this.$root.hide(this.opts.hideDuration)}if(this.$root.dataSM("ie-shim")){this.$root.dataSM("ie-shim").remove()}}}this.activatedItems=[];this.visibleSubMenus=[];this.clickActivated=false;this.focusActivated=false;this.zIndexInc=0;this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(n){for(var l=this.activatedItems.length-1;l>=n;l--){var m=this.activatedItems[l].dataSM("sub");if(m){this.menuHide(m)}}},menuIframeShim:function(l){if(e&&this.opts.overlapControlsInIE&&!l.dataSM("ie-shim")){l.dataSM("ie-shim",a("