diff --git a/TestSHA256/.pio/build/Teensy_SHA/.sconsign310.dblite b/TestSHA256/.pio/build/Teensy_SHA/.sconsign310.dblite new file mode 100644 index 0000000000000000000000000000000000000000..f0c67470b2da7559a81dfecdea3dd8e4012f1984 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/.sconsign310.dblite differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/AudioStream.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/AudioStream.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..d1a64ce43fb28140797eac9b21049b937a6cba67 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/AudioStream.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/CrashReport.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/CrashReport.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..c7ca06f5fe697043e383db4d4af319de995390f9 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/CrashReport.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/DMAChannel.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/DMAChannel.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..8c95899153b2c2f9312a13e0898f7f1fa5237993 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/DMAChannel.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/EventResponder.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/EventResponder.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..2d0d76acdfacb6c681e908131b06b25fd458a26b Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/EventResponder.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/HardwareSerial.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/HardwareSerial.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..e161113cd36e0ddef244d9e1d781bd129ee4a5e2 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/HardwareSerial.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/HardwareSerial1.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/HardwareSerial1.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..53770c4c91a32fc7062484471f0ca1b9a0a82a8d Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/HardwareSerial1.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/HardwareSerial2.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/HardwareSerial2.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..a6a25be9145014014f933fe527ba950b13c031a4 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/HardwareSerial2.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/HardwareSerial3.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/HardwareSerial3.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..4c3aedb49c24019f269a75784ed2655eb29ae7b4 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/HardwareSerial3.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/HardwareSerial4.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/HardwareSerial4.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..a8547e522c3b7ca2e3f53fd69a483159dede62de Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/HardwareSerial4.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/HardwareSerial5.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/HardwareSerial5.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..cae6578c219a898eee0f7928fb0de7b170cd2e7e Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/HardwareSerial5.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/HardwareSerial6.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/HardwareSerial6.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..af44c9ce3ca67e24571c289657cde50dab481937 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/HardwareSerial6.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/IPAddress.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/IPAddress.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..23a1555c582afb3d3e39c6d23a9a76d94a6d14b2 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/IPAddress.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/IntervalTimer.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/IntervalTimer.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..4dbc151942ce4373c8ef9f175d93b90685996ab7 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/IntervalTimer.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/Print.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/Print.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..697c56ff705d1b21a12e75c8b0eaf6e4a4c6b3f6 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/Print.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/Stream.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/Stream.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..9772f1f630bac01dc8d8e7e10e07e763457061be Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/Stream.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/Time.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/Time.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..8852eb7cb49f3444825cdf63ca83640d083bde1a Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/Time.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/Tone.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/Tone.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..c730ae7d87794caf1c29a96e720626dd27edbeda Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/Tone.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/WMath.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/WMath.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..3d466783f2687cef145460cd8144d5f8eec71c38 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/WMath.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/WString.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/WString.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..3e3e4b52ea15a0b558cb5c89f7a281dbacb8b415 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/WString.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/analog.c.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/analog.c.o new file mode 100644 index 0000000000000000000000000000000000000000..0e025aef55ee53f14ec8df4c8a9fe1214a6db4f4 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/analog.c.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/avr_emulation.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/avr_emulation.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..8b0b10b06e4a931c961c49bac8fddb751b39e5d7 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/avr_emulation.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/eeprom.c.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/eeprom.c.o new file mode 100644 index 0000000000000000000000000000000000000000..e5f8bd3cc3ee6e1c8e3923dbb5ebedf91ae821eb Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/eeprom.c.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/keylayouts.c.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/keylayouts.c.o new file mode 100644 index 0000000000000000000000000000000000000000..64c5a696aca54eb701d43545d51acc7c7016e257 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/keylayouts.c.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/main.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/main.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..646edfb579e70b7d1bfb4db30d16b3e40e26ddca Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/main.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/math_helper.c.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/math_helper.c.o new file mode 100644 index 0000000000000000000000000000000000000000..bca292c6f306a4273b1c6238b28e0cda1befa9f1 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/math_helper.c.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/memcpy-armv7m.S.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/memcpy-armv7m.S.o new file mode 100644 index 0000000000000000000000000000000000000000..16eb7dc08c819ae3bcfdde6f55b2f81971dccb3e Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/memcpy-armv7m.S.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/memset.S.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/memset.S.o new file mode 100644 index 0000000000000000000000000000000000000000..6cf45a0c765f77bbeca0ca482fd88959a05d93c4 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/memset.S.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/mk20dx128.c.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/mk20dx128.c.o new file mode 100644 index 0000000000000000000000000000000000000000..2fa574b507045aac386be8927495541c01e4fd74 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/mk20dx128.c.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/new.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/new.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..2bb4a3bdf22e686ba39ba6603ecbffb83d18257b Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/new.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/nonstd.c.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/nonstd.c.o new file mode 100644 index 0000000000000000000000000000000000000000..076a9ab653d8200d41c46b4cf6609a754e4cf4c9 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/nonstd.c.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/pins_teensy.c.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/pins_teensy.c.o new file mode 100644 index 0000000000000000000000000000000000000000..3e7f12b3d5a4b9c60e468d9493264f49d90e2074 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/pins_teensy.c.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/ser_print.c.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/ser_print.c.o new file mode 100644 index 0000000000000000000000000000000000000000..392b7272443e426d1ee9179c5fe0896c4861746e Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/ser_print.c.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serial1.c.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serial1.c.o new file mode 100644 index 0000000000000000000000000000000000000000..f0c78f5c0ecb507e63a3726ea32fe1ca40e2424d Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serial1.c.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serial2.c.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serial2.c.o new file mode 100644 index 0000000000000000000000000000000000000000..a18f967efc257ec52ea69c2ea723bcd25ebf5e33 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serial2.c.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serial3.c.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serial3.c.o new file mode 100644 index 0000000000000000000000000000000000000000..ff1f331b44b88131e58579f6b58706b3a90a296c Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serial3.c.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serial4.c.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serial4.c.o new file mode 100644 index 0000000000000000000000000000000000000000..2229f50d51e8d414e258eaf244da2ccb289e08ba Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serial4.c.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serial5.c.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serial5.c.o new file mode 100644 index 0000000000000000000000000000000000000000..e356a2cdfbbc19351eaf45a0c6e11f84c8a6ea7e Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serial5.c.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serial6.c.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serial6.c.o new file mode 100644 index 0000000000000000000000000000000000000000..608aa25c1b0751c7ebd4a6612c5a01e1aacefb65 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serial6.c.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serial6_lpuart.c.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serial6_lpuart.c.o new file mode 100644 index 0000000000000000000000000000000000000000..1de4d37cb6b1c79d5e09b8ba5085746e5560b430 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serial6_lpuart.c.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serialEvent.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serialEvent.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..855e0e31b823ee4d7d79ef3787f1e2426cac7183 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serialEvent.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serialEvent1.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serialEvent1.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..1d267a7bba612566b10a5d78d12744d6605159cf Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serialEvent1.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serialEvent2.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serialEvent2.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..a296ca5a7db63020e0ca7f56d24a3ec4cc150442 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serialEvent2.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serialEvent3.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serialEvent3.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..f4028231ad011ca8aceef23bdf8d31c6083ca897 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serialEvent3.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serialEvent4.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serialEvent4.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..9d4013bd3ceaae18f3c357267ddeb35de0be4601 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serialEvent4.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serialEvent5.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serialEvent5.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..cbb213c3eeb9bccc1b55c6a32be64fcd8df6c186 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serialEvent5.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serialEvent6.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serialEvent6.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..61f14c6edcd56c62004d719450845ef62f90a649 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serialEvent6.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serialEventUSB1.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serialEventUSB1.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..f27e64a652722e144ce0a8e2ad1c972b9f72a38a Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serialEventUSB1.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serialEventUSB2.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serialEventUSB2.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..8c8a98d9a94698f2ee3ae17d52024a0eeb03f1ab Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/serialEventUSB2.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/touch.c.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/touch.c.o new file mode 100644 index 0000000000000000000000000000000000000000..dad043175f145995b70947593f9ca352ddee856b Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/touch.c.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_audio.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_audio.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..9ca51ec59115b95bfdefd3aa41bcfc25e58b9656 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_audio.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_desc.c.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_desc.c.o new file mode 100644 index 0000000000000000000000000000000000000000..fbb5a6878eb963ae7075d887f9f098ca8b596c17 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_desc.c.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_dev.c.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_dev.c.o new file mode 100644 index 0000000000000000000000000000000000000000..e9175687efb9f53d63c861dbb7d8f691fba2e66d Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_dev.c.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_flightsim.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_flightsim.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..88be23845791fe617b592ab8651d2adb91752bbd Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_flightsim.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_inst.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_inst.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..818c283fa0d285f2c72fba020d2e589f91c587e9 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_inst.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_joystick.c.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_joystick.c.o new file mode 100644 index 0000000000000000000000000000000000000000..9b37ee0dbba40f8e2e785f7b984fdabeed5bcd5f Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_joystick.c.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_keyboard.c.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_keyboard.c.o new file mode 100644 index 0000000000000000000000000000000000000000..3fa272f77552709b1a9b52408bfc05c70bac75b3 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_keyboard.c.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_mem.c.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_mem.c.o new file mode 100644 index 0000000000000000000000000000000000000000..d540e75fa0f544fbcb90d611740abab45f73916d Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_mem.c.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_midi.c.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_midi.c.o new file mode 100644 index 0000000000000000000000000000000000000000..19ad04dbd68bae482b9dce313469b3c8deff0eb8 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_midi.c.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_mouse.c.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_mouse.c.o new file mode 100644 index 0000000000000000000000000000000000000000..43c71425b52434a091a858b42db5b181d58104b6 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_mouse.c.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_mtp.c.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_mtp.c.o new file mode 100644 index 0000000000000000000000000000000000000000..111e45d77843ae5dc21e21283a84028b0377b3aa Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_mtp.c.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_rawhid.c.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_rawhid.c.o new file mode 100644 index 0000000000000000000000000000000000000000..5f030a7f19ecc436951fb9ae6c486179626e9f96 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_rawhid.c.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_seremu.c.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_seremu.c.o new file mode 100644 index 0000000000000000000000000000000000000000..fc1fbadc4e4701c9b7230b9785d291e2bda73337 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_seremu.c.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_serial.c.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_serial.c.o new file mode 100644 index 0000000000000000000000000000000000000000..bd12757b435bd323ac6c3e4291471d3d01d2594f Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_serial.c.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_serial2.c.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_serial2.c.o new file mode 100644 index 0000000000000000000000000000000000000000..fd76a0ad4e677222c86ed7b994c9c60371ab21c5 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_serial2.c.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_serial3.c.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_serial3.c.o new file mode 100644 index 0000000000000000000000000000000000000000..c47bde9b105baa48fafe03d0d367794f93d36ae4 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_serial3.c.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_touch.c.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_touch.c.o new file mode 100644 index 0000000000000000000000000000000000000000..3c25595d16d5e263f83256cf3a1c0297d8130dd9 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/usb_touch.c.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/yield.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/yield.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..c4d076d5154d1460b58add2f91f264b6c6320bb4 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/FrameworkArduino/yield.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/firmware.elf b/TestSHA256/.pio/build/Teensy_SHA/firmware.elf new file mode 100644 index 0000000000000000000000000000000000000000..f94059cc7e6743363a4748d4caae78e826c18fad Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/firmware.elf differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/firmware.hex b/TestSHA256/.pio/build/Teensy_SHA/firmware.hex new file mode 100644 index 0000000000000000000000000000000000000000..a35170777e8189efa96fde8645d6220aae06256e --- /dev/null +++ b/TestSHA256/.pio/build/Teensy_SHA/firmware.hex @@ -0,0 +1,1331 @@ +:1000000000800020BD010000F5160000AD160000C4 +:10001000AD160000AD160000AD160000AD160000D4 +:10002000AD160000AD160000AD160000F51600007C +:10003000F5160000AD1600005530000059300000E4 +:10004000F5160000F5160000F5160000F516000084 +:10005000F5160000F5160000F5160000F516000074 +:10006000F5160000F5160000F5160000F516000064 +:10007000F5160000F5160000F5160000F516000054 +:10008000F5160000F5160000F5160000F516000044 +:10009000F5160000F5160000F5160000F516000034 +:1000A000F5160000F5160000F5160000F516000024 +:1000B000F5160000F5160000F5160000F516000014 +:1000C000F5160000F5160000F5160000F516000004 +:1000D000F5160000F5160000F5160000F5160000F4 +:1000E000F5160000F5160000F5160000F5160000E4 +:1000F000F5160000F5160000F5160000F5160000D4 +:10010000F5160000811F0000F5160000F51600002E +:10011000F5160000F5160000F5160000F5160000B3 +:10012000F5160000F5160000F5160000F5160000A3 +:10013000F5160000F5160000F5160000F516000093 +:10014000F5160000F5160000F5160000F516000083 +:10015000F5160000F5160000F5160000F516000073 +:10016000F516000075220000F5160000F5160000D7 +:10017000F5160000F5160000F5160000F516000053 +:10018000F5160000F5160000F5160000F516000043 +:10019000F5160000F5160000F5160000F516000033 +:1001A000F5160000F5160000F5160000F516000023 +:1001B000F5160000F5160000F5160000564B4CF23F +:1001C000205210B51A804DF628121A8000BF00BFC9 +:1001D00001F094FA514B4FF010621A60504A9A6045 +:1001E000504ADA60504A136813F4807304D14F49BF +:1001F0000B604FF4A85313604D4B1A78110703D5C9 +:100200001A7842F008021A704A4B4B492A221A7097 +:100210004A4A4B4B8B4204D252F8040F43F8040B6A +:10022000F8E7484B484900228B4202D243F8042B9E +:10023000FAE74649464A002352F8230041F82300D2 +:1002400001336F2BF8D1434B434A802103F8011B44 +:100250009342FBD1414B3D4A1A60414B8A221A70AE +:10026000A3F5805324225A70A0221A709A7992071B +:10027000FCD59A79D406FCD43A4A937903F00C035E +:10028000082B384BF9D105221A7143225A719A79F9 +:100290009006FCD5334A9179324B4906FBD5324A58 +:1002A0004FF0817111600521516020221A709A79F6 +:1002B00002F00C020C2AFAD12C4B2D4A1A602D4B5D +:1002C0002D4A1A6000225A60072243F8042C2B4A58 +:1002D000C3F80C2D62B601F041FB144B1B68DA0722 +:1002E00005D5274801F0CAFA264B274A1A60274B42 +:1002F0001B785B0609D5234C234B22689A4204D114 +:100300001F4801F0BBFA0023236001F0FDF902F061 +:1003100099FF01F0EFF8FEE70E2005403080044021 +:10032000823F04000100002B10D0034014D0034092 +:1003300002D0074000E007404C90FF1FD04900006A +:100340002087FF1F4C90FF1F9C96FF1F0082FF1FFE +:100350000000000000E400E05FE400E008ED00E0E1 +:1003600000500640004006404480044004800440A1 +:10037000C010050014E000E03F190100000020203B +:100380000954EA621CE00340A5C3945A00F00740F8 +:10039000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF6D +:1003A000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D +:1003B000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4D +:1003C000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF3D +:1003D000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF2D +:1003E000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF1D +:1003F000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0D +:10040000FFFFFFFFFFFFFFFFFFFFFFFFDEF9FFFF23 +:1004100010B5054C237833B9044B13B10448AFF33E +:1004200000800123237010BD4C90FF1F00000000CE +:10043000CC490000084B10B51BB108490848AFF380 +:1004400000800848036803B910BD074B002BFBD0A0 +:10045000BDE81040184700BF000000005090FF1F8B +:10046000CC4900004C90FF1F0000000000B59DB07B +:10047000684600F013FA68464FF47C72044900F0B5 +:1004800039FA6846034900F057FA1DB05DF804FBDD +:100490009490FF1F8494FF1F08B501210D2001F0E7 +:1004A00001FA4FF4FA7001F009FA0D20002101F071 +:1004B000F9F94FF4FA70BDE8084001F0FFB900BF48 +:1004C00070B5002304220121564800F03BFD1D2198 +:1004D000554802F023FC554800F034FF4FF0FF323E +:1004E0000021504800F028FEFF2800F093800323ED +:1004F0001A4602214B4800F025FD12214C4802F01B +:100500000DFC4A4800F01EFF1A214A4802F006FC82 +:10051000464800F017FF434800F086FD05460028D6 +:10052000F9D1404800F09CFD0646002838D02B4603 +:10053000012203213B48404C00F004FD15213F48B7 +:1005400002F0ECFB2B460A223146384800F00EFF41 +:10055000364800F0F7FE3A4A3248B1B200F0A8FC43 +:10056000FFF784FF1421374802F0D8FB2F4800F032 +:10057000E9FE04F120050AE0002310222B4800F0D8 +:10058000F5FE0121304802F0C9FBA5422AD014F83B +:10059000011F0F29F0D8302002F044FC2178EBE74E +:1005A0000346022203211F4800F0CCFC0E212748FD +:1005B00002F0B4FB1D4800F0C5FE1D21244802F0E6 +:1005C000ADFB1A4800F0BEFE4FF47A7001F076F9E8 +:1005D000002304220121134800F0B4FCBDE8704060 +:1005E000FFF75ABF15211B481B4C02F097FB0F4821 +:1005F00000F0A8FE04F57C7514F8011F0B480023D9 +:10060000102200F0B3FE01210F4802F087FBA54243 +:10061000F2D1D2E70F21114802F080FB034800F02D +:1006200091FECAE76890FF1FB44200005087FF1F89 +:10063000D4420000E84200008394FF1F04430000FE +:100640009490FF1F1C430000344300003843000017 +:1006500058430000604300009390FF1F4843000090 +:1006600010B5054C204600F0D5F92046034A044950 +:10067000BDE8104002F0D4BD6890FF1F2087FF1F27 +:10068000290A0000F8B50D20012101F011F91B48DD +:100690001B4A04681B4D1C4F40F2EE2613783BB1F9 +:1006A0002B78DB0704D5036839685B1A0E2B06D854 +:1006B000036811781B1BE9B1B3F5FA6FEED94FF45B +:1006C000E131124800F086FD1049114800F0C8FBE6 +:1006D00009E0104802F022FB0F4800F033FE4FF40F +:1006E0007A7001F0EBF80A4800F050FB2421002852 +:1006F000EFD0F8BDB342D1D9E1E700BFA894FF1F06 +:100700001096FF1F2896FF1F9496FF1F2487FF1F38 +:100710006890FF1F784300005087FF1F2DE9F04FBE +:10072000CDB00DF12C0A0390013156461BAC087870 +:1007300011F8013C8A784D78000440EA03631343C2 +:1007400043EA052346F8043FA64201F10401EED135 +:1007500010200DF1640E14AF0CAE554684465EF8C1 +:10076000049F56F8043F57F8041F55F8040F4FEA4A +:10077000F9484FEAB34288EA794888EA992801445F +:1007800082EAF312414482EAD3030CF1010C0B44D8 +:10079000BCF1400F44F8043FE1D1039ADFF8F89030 +:1007A000136D05931E461346526D06921946104668 +:1007B0001A469B6D07931F46D36D126E08931C4615 +:1007C00015464B6E09928A6E0493C96E304B0A929D +:1007D0000B918646A346DDF8108001919446029362 +:1007E0000BE0CDF804C0C446A8461D4659F8043FA6 +:1007F0000293BB467746B64606464FEAF52205EA1F +:10080000080182EAB5122CEA050482EA75624C40BE +:100810005AF8041F019B144487EA0E0221444FEA50 +:10082000763002EA06040EEA070219445440029B9D +:10083000184A80EAB60080EAB650194420444A4576 +:1008400001EB0B030844CCD10899059A39440F46B3 +:1008500009991944049B2B4402441D460A9B1446E3 +:10086000069A4344184632440B9B1646079A634443 +:1008700072448E461946039B1C655E659A65DF656A +:10088000C3F860E05D669866D9664DB0BDE8F08F4C +:10089000982F8A429C440000A043000000220023BD +:1008A000F0B4C0E912230C4B0365A3F16263A3F516 +:1008B00011230A4F0A4E0B4D0B4C0C490264A3F650 +:1008C0004E130B4A47658665C565046641668266B8 +:1008D000C366F0BC704700BF67E6096A85AE67BBB8 +:1008E00072F36E3C3AF54FA57F520E518C68059B12 +:1008F000ABD9831FFAB1F8B504460D468E18002710 +:1009000001E0B54216D0236C15F8011BE154013308 +:10091000402B2364F5D121462046FFF7FFFED4E9A2 +:10092000122312F5007243F10003B542C4E9122309 +:100930002764E8D1F8BD7047F8B5036C372B05463E +:100940000C464ED84FF08002C25406D0C218002187 +:10095000373002F8011F8242FBD1D5E91201DB00DA +:10096000C01841F10001030A0A0C4FEA104E070EAD +:100970000E0A85F83E300B0EC5E9120185F83F00DE +:1009800085F83B1085F8392085F83DE085F83C7006 +:1009900085F83A6085F8383029462846FFF7BEFECC +:1009A0000322296DD300D9402170696DD94021718E +:1009B000A96DD9402172E96DD9402173296ED940C2 +:1009C0002174696ED9402175A96ED9402176E96EEE +:1009D000013A21FA03F32377531C04F10104E0D117 +:1009E000F8BD5A1C80213F2AC15407D8034400F1A6 +:1009F0003F01002203F8012F8B42FBD129462846F4 +:100A0000FFF78CFE38220021284602F06FFF2B6C86 +:100A1000A3E700BF002250210180426080F824201B +:100A200080F8252002857047704700BF2DE9F04F00 +:100A3000DFF8988085B0D8F800300293029C0191CD +:100A40009146002A40D0824600254FF0000B41F22B +:100A500088360027DAF8040003681B69984759466E +:100A600068B9D8F800300393039A0023121B63EB94 +:100A70000503964277EB030321DB8B46EAE7DAF8BE +:100A8000040003685B699847019B03F80B00D8F8E2 +:100A900000300393039A0023121B63EB0503964275 +:100AA00077EB030309F1FF390BF1010106DBB9F123 +:100AB000000FE2D1084605B0BDE8F08F8B465946DD +:100AC000084605B0BDE8F08F1146F3E7A894FF1F74 +:100AD00070B5044682B00E46002501220DF10701D3 +:100AE0002046FFF7A3FF012839D19DF80730AA2B34 +:100AF00029D0A52B29D0552B29D05A2BECD1022D4A +:100B0000EAD16FF05A02737032700F25B11C0122C6 +:100B10002046FFF78BFFF11C01222046FFF786FFDE +:100B2000311D02222046FFF781FFB11D022220461F +:100B3000FFF77CFF06F1080120460222FFF776FF4F +:100B4000284602B070BD0546C7E70225C5E7012D5E +:100B5000C2D16FF0550273703270F025D6E70125CF +:100B6000284602B070BD00BF70B4CA788B7808798F +:100B70004E798C79CD79134440EA0620FF3353FA3D +:100B800080F344EA052253FA82F303EB1023101298 +:100B900010FA83F080B25AB101F10803013A13FA56 +:100BA00082F3073111F8012F1044994280B2F9D134 +:100BB00070BC70472DE9F04782B00025F029074648 +:100BC00091469846ADF80650BDF828602BD006F146 +:100BD0000A05284602F05EFB0446C0B34AF25A53A7 +:100BE000ADB20380B2460023A4F80490E680A3705F +:100BF000E3708EB921463846FFF7B6FF02A90AF125 +:100C0000080321F8020D0222E01800F07BFC3D856C +:100C1000204602B0BDE8F0873246414604F10800A4 +:100C200000F070FCE6E71A2002F034FB044670B1D5 +:100C300003464AF6552223F8072B2946173003F8B6 +:100C4000011F8342FBD11A254FF0100ACBE7002089 +:100C5000DFE700BFF0B4CA788B784E7908798C79D9 +:100C6000CF790D7A134440EA0620FF334E7A44EAE6 +:100C7000072253FA80F345EA062453FA82F353FA23 +:100C800084F303EB102000EB1223201210FA83F000 +:100C900080B262B1023A002A01F10A0107DD0023A5 +:100CA000CC5C01339BB22044934280B2F8DBF0BCB1 +:100CB000704700BF2DE9F04F87B00DF10C098A464F +:100CC00049460646FFF704FF00B201283FD0F0284E +:100CD00030D0BDF8127007F10A0002F0DBFABB4613 +:100CE000054630B3A7F102087C1E99E807002B46A1 +:100CF00003C305F10A091A8049465A463046FFF7F0 +:100D000095FEA8442B199DF8144098F80A809B7A08 +:100D100086F8264014BB82B2974221D0422386F83F +:100D20002630FF24284602F0BDFA204607B0BDE871 +:100D3000F08FFEE71A2002F0ADFA054630B14FF011 +:100D4000100B5F460F244FF00E08CEE7FEE7462358 +:100D5000FF2086F8263007B0BDE8F08FFF24E1E7DA +:100D6000294630460193FFF775FF019B08EB0323EB +:100D70009BB2834204D0432386F82630FF24D1E778 +:100D80005A464946504600F0BDFBCBE730B583B02C +:100D9000002300930122F0210446FFF70BFF0546D4 +:100DA0006068228D036829465B689847284602F0F0 +:100DB00079FA04F108012046FFF77CFFB0FA80F0D1 +:100DC000400903B030BD00BF2DE9F04186B00023DB +:100DD0000C460093042207460846F021FFF7EAFE7E +:100DE00005466068228D036829465B689847284657 +:100DF00002F058FA04F108012046FFF75BFF20BB20 +:100E0000237A657A013303EB0525ADB28046284687 +:100E100002F040FA0646B8B100F805803146204697 +:100E2000FFF748FF314602A800F020FB304602F0F1 +:100E300039FA02A9384600F043FB02A800F0D6FABE +:100E4000384606B0BDE8F081FEE70449384600F0B8 +:100E50000DFB384606B0BDE8F08100BF304300000E +:100E600010B5044684B0416068462146FFF7ACFFE8 +:100E700002996846013900F02FFB0378342B13D018 +:100E800002996846013900F027FB0378332B04BF31 +:100E9000C823238064686846003418BF012400F02A +:100EA000A5FA204604B010BD50232380F2E700BF0E +:100EB000F0B585B004258DF80C1003AB0095F0213A +:100EC00000251746412204468DF80D508DF80E502E +:100ED0008DF80F50FFF76EFE05466068228D03689F +:100EE00029465B68984704F10806284602F0DAF9BB +:100EF00031462046FFF7DEFE10B1FF2005B0F0BD01 +:100F00000222054603AB0092F021422220468DF8D2 +:100F10000C508DF80D50FFF74DFE05466068228D90 +:100F2000036829465B689847284602F0BBF93146BA +:100F30002046FFF7BFFE39462046FFF7BBFE05B04F +:100F4000F0BD00BF30B50446008885B000255028AC +:100F5000039544D0012933D002293CD003294DD038 +:100F6000052904BF03238DF80C30012A2DD0022A55 +:100F70003ED0032A46D0042A4AD0052A4ED0062A5B +:100F80000CBF832387238DF80D308DF80E3004239A +:100F90000093242203ABF0212046FFF70BFE054609 +:100FA0006068228D036829465B689847284602F0EE +:100FB00079F904F108012046FFF77CFE05B030BD49 +:100FC0000223012A8DF80C30D1D184238DF80D3005 +:100FD0008DF80E30DBE704238DF80C30C5E78DF873 +:100FE0000C108DF80D208DF80E208DF80F30CEE707 +:100FF00082238DF80D308DF80E30C8E701238DF86F +:101000000C30B2E786238DF80D308DF80E30BEE738 +:1010100081238DF80D308DF80E30B8E785238DF8DB +:101020000D308DF80E30B2E730B583B00023009359 +:101030002122F0210446FFF7BDFD05466068228DA0 +:10104000036829465B689847284602F02BF904F1AB +:1010500008012046FFF72EFE00B9207A03B030BD0C +:10106000F0B590F82550012D85B002D0002005B0D4 +:10107000F0BD0024062280F82440009202AB0788CD +:10108000ADF80C406322F021064602948DF80C70F6 +:101090008DF80A50FFF78EFD05467068328D0368A3 +:1010A00029465B689847284602F0FCF806F10801DB +:1010B0003046FFF7FFFD08B9307AD8E72046D6E77B +:1010C00030B583B0002300932022F0210446FFF7BF +:1010D00071FD05466068228D036829465B68984764 +:1010E000284602F0DFF804F10801204603B0BDE80D +:1010F0003040FFF7DFBD00BF30B585B004AB002244 +:10110000ADF80C20022203F8041D0092F0216022A9 +:101110000446FFF74FFD05466068228D03682946A7 +:101120005B689847284602F0BDF804F108012046A4 +:10113000FFF7C0FD05B030BD2DE9F843531C28D0A2 +:1011400001EB81030E46054690464FEA430900270E +:1011500000E07EB92846FFF767FF04460028F8D074 +:101160002846FFF7ADFFF0B1002385F82530FF20BA +:10117000BDE8F88301370A20BFB200F09FFB4F455E +:10118000E8DD232385F8254085F82630FF20BDE8DB +:10119000F88390F82430022BD2D9452380F82630EA +:1011A000FF20BDE8F883B8F1FF3F14BF5FFA88F174 +:1011B00095F824102846FFF79FFF0028D4D195F812 +:1011C00024300122134485F8243085F82520BDE819 +:1011D000F88300BF084B4A08134410B50446B3FB1C +:1011E000F1F000F099FC054B1B7803B110BD2046CF +:1011F000BDE8104001F038BF00A24A044D87FF1F30 +:1012000008B5084600F0ECFD012008BD08B5084609 +:1012100000F0E6FD012008BD38B508460D4602F095 +:101220002FFE04460146284600F0E4FD204638BD66 +:1012300010B508461446114600F0DCFD204610BDEE +:101240000846114600F04EBF0846114600F030BF78 +:1012500000F084BE08B5084600F0A2FD003018BFBB +:10126000012008BD08B5084600F078FD003018BF21 +:10127000012008BD0846114600F046BD084600F0B2 +:101280006BBD00BF084600F023BD00BF00F0E6BC08 +:1012900010B5064B144603EB5100B0FBF1F000F023 +:1012A0003BFC2046BDE8104000F086BC00A24A048A +:1012B00000F02EBE00F0ECBD00F0D6BD00F0B0BDD9 +:1012C00000F0BABD0368064A1B68934205D110B509 +:1012D000C8B200F085FD012010BDC9B2184700BF9B +:1012E0000D1200000368064A1B68934205D110B531 +:1012F000C8B200F075FD012010BDC9B2184700BF8B +:101300000D1200000368064A1B68934205D110B510 +:10131000C8B200F065FD012010BDC9B2184700BF7A +:101320000D1200000368064A1B68934205D110B5F0 +:10133000C8B200F055FD012010BDC9B2184700BF6A +:101340000D12000030B5044683B002252A4601A8DC +:10135000054900F0D7F823682A4601A95B682046B2 +:10136000984703B030BD00BF18480000F0B50746ED +:101370008BB0002A33D0012A08BF0A2251B321249E +:1013800000E0F4B2B1FBF2F502FB1511C8B2092975 +:1013900000F1300198BFC8B20AA988BF3730214494 +:1013A00088BFC0B201F8240C661E2946002DE8D182 +:1013B00033B1013CE4B20AAB23442D2203F8242CC0 +:1013C0003B6801AA11195B683846C4F122029847AC +:1013D0000BB0F0BD30228DF825202124E8E703680A +:1013E000C9B21B6898470BB0F0BD00BF10B50446EA +:1013F000006801F057FF204610BD00BF38B54368B4 +:101400008B4201D3012038BD0D46044601310068EE +:1014100002F0BEFA0028F6D0A36884E82100002B71 +:10142000F0D10370EEE700BFF8B50446154632B9B7 +:10143000036803B11A700023A3602046F8BD0E466E +:101440001146FFF7DBFF074648B9206810B101F0ED +:1014500029FF276000236360A3602046F8BDA560D4 +:101460003146206802F09EFCE7E700BF38B5002354 +:101470000446036043608360037341B108460D4630 +:1014800002F0FEFC294602462046FFF7CDFF20462B +:1014900038BD00BF814211D038B5054600680C4602 +:1014A00008B101F0FFFE23686168A2682B60002389 +:1014B0006960AA6023606360A36038BD704700BFA5 +:1014C00010B5002304460360436083600373FFF795 +:1014D000E1FF204610BD00BF83688B4203D900683E +:1014E00008B108447047024900230B700846704752 +:1014F000A494FF1F08B5FFF7C5F8FEF7E1FF01F060 +:1015000011FDFAE701B441EA000313F003036FD1C0 +:10151000403A41D351F8043B40F8043B51F8043BB6 +:1015200040F8043B51F8043B40F8043B51F8043BBD +:1015300040F8043B51F8043B40F8043B51F8043BAD +:1015400040F8043B51F8043B40F8043B51F8043B9D +:1015500040F8043B51F8043B40F8043B51F8043B8D +:1015600040F8043B51F8043B40F8043B51F8043B7D +:1015700040F8043B51F8043B40F8043B51F8043B6D +:1015800040F8043B51F8043B40F8043B51F8043B5D +:1015900040F8043B403ABDD2303211D351F8043BFD +:1015A00040F8043B51F8043B40F8043B51F8043B3D +:1015B00040F8043B51F8043B40F8043B103AEDD2AC +:1015C0000C3205D351F8043B40F8043B043AF9D2FD +:1015D00004320AD0D2071CBF11F8013B00F8013BCE +:1015E00003D30B7803704B78437001BC704700BF86 +:1015F0000C2A4AD310F0030311D0C3F10403D21A0A +:10160000DB071CBF11F8013B00F8013B07D311F8C1 +:10161000013B00F8013B11F8013B00F8013B11F0E0 +:1016200003033FF475AF30B4043AC91AC3F1040C94 +:1016300051F8044B022B19D0032B0BD0240A51F87C +:10164000043B1D0644EA050440F8044B1C46043ADA +:10165000F4D216E0240E51F8043B1D0244EA0504BE +:1016600040F8044B1C46043AF4D20AE0240C51F82A +:10167000043B1D0444EA050440F8044B1C46043AAC +:10168000F4D20432B1EB0C0130BC043AA0D3013ADD +:1016900011F8013B00F8013BF9D20B7803704B784D +:1016A00043708B78837001BC704700BF08B5104C45 +:1016B00008E0236859050DD423681A050FD4236860 +:1016C000DB0411D423685803F3D500F0D3FD23685D +:1016D0005905F1D500F00EF823681A05EFD500F092 +:1016E00009F82368DB04EDD500F04AFCEAE700BF07 +:1016F0003480044008B5FFF7D9FF00BF014B10222A +:101700001A80704700200540704700BF094908B59E +:101710000B6830B16A461844A2F58052904202D25A +:101720000860184608BD01F087FD0C2303604FF0E8 +:10173000FF3008BD3887FF1FEFF3138070B9EFF358 +:1017400010836BB9EFF305825AB94FF48070EFF351 +:1017500011832BB1984228BF184670474FF0FF30D5 +:1017600070470F2A01D81846F1E7014BD05CEEE72D +:10177000F0E300E0F0B44D1E2E46002400E00134FA +:10178000B0FBF2F302FB1300092800F130078ABF17 +:101790003730F8B2C0B206F8010F1846002BEED170 +:1017A0000A1953704CB1107815F8016F2870013385 +:1017B000E01A834202F80169F5DB0846F0BC704785 +:1017C00010B40F4B53F8302092F880422CB1012313 +:1017D00069B182F8803010BC704703EBC0035B68CE +:1017E0001A6841B922F002021A6010BC704782F8F0 +:1017F000003110BC704742F003021A6010BC704701 +:101800001C4800001C4A02EBC00301295B6811D090 +:1018100004291BD052F83000002280F8802229B120 +:10182000022920D0032922D01A6070474FF4807219 +:101830001A60704752F830004FF4A27280F880129C +:101840001A601A6822F020021A60704752F83010AD +:101850004FF4A272012081F880021A601A6842F0E7 +:1018600020021A60704740F203121A6070474FF46A +:1018700081721A60704700BF1C48000030B4054BED +:10188000054D064C002210211A602A602060196064 +:1018900030BC704714D0034004D0034000D0034054 +:1018A000704700BF212801D8FFF78ABF704700BFEB +:1018B000212801D8FFF7A6BF704700BF2DE9F843E4 +:1018C000054672B6214F224B224A1B683C681268BB +:1018D00062B6520102D5322B88BF0134A5B3C3F5DD +:1018E0008C331D4EDFF86890DFF8688003F23F13F9 +:1018F0004FF47A72A6FB031302FB04F404EB1314F7 +:1019000072B6D9F800103A68D8F800E062B6C1F5AE +:101910008C3303F23F13A6FB03031EF0806FC4EB6E +:1019200013134FF47A7002D0322988BF013200FBC2 +:101930000233B3F57A7F04D3013D05D004F57A7400 +:10194000DEE701F0EFFADBE7BDE8F883A894FF1FBC +:1019500018E000E004ED00E0398EE338F8B52E4BD6 +:101960002E49DFF8D4E0DFF8D4C02D4E2D4D2E4C9B +:101970002E4A2F4F4FF4000018604FF0807018600F +:101980004FF0007018604FF0806018604FF00060FA +:10199000186000200860282348F6FF71CCF800107A +:1019A000CEF80030336013602B6023603B60B3627D +:1019B0009362092245F8242CC4F8D80F05F57F65F9 +:1019C000C7F8D41F07F5FF2707F5FA67C6F8F83FF1 +:1019D0002B6006F5FF26C4F8D42F05F5FD2504F588 +:1019E000FF24386006F2F4761248316005F5FF6591 +:1019F00004F5FD642B602360026001F05DFBFFF7DE +:101A00004FFF1420FFF75AFF01F06EF84FF48C706F +:101A1000BDE8F840FFF752BF08E100E00480034052 +:101A200014800340248003402C8003401C8003402A +:101A30003480034000800B400C800340088003404A +:101A40002DE9F84F2C4B1B6807460BB101221A7089 +:101A5000DFF8BC90DFF8BC8099F80040D8F800307F +:101A6000264D274E01349C422ABF4FF0000A5FFAF0 +:101A700084FA5446AB462B78A3421CD1FFF75CFE98 +:101A800040282BDC33791B06F5D59BF80030D8F8BD +:101A90000010DBB25A1C8A4225D2272A29D91949BB +:101AA000273B0968CB5CD1B2DBB2DBB2F3712970A2 +:101AB0002B78A342E2D0272C8ABF124B124B1B6813 +:101AC000124988BF283CFFB21F550D4B0120AC22A4 +:101AD000087089F800A0DA70BDE8F88FFF28CADD29 +:101AE00001F020FAC7E700210A46074B9B5CDBB2F6 +:101AF000DBE7D1B2F9E700BF2895FF1F2195FF1F53 +:101B000000C00640DC94FF1FB494FF1F2095FF1F08 +:101B10002C95FF1F4887FF1F1C4BDFF894C01A68E5 +:101B20001B49F0B542F480521A4D1A60DFF884E088 +:101B3000194F1A4E1A4C00238CF800304FF4517292 +:101B40002B701F2840F213358EF800303B70337035 +:101B500025600A6012D819460124124A124D1170EC +:101B60001248547000212C27402693724FF4003401 +:101B700091701174D7702E700460F0BDC0F34431C1 +:101B8000C0F3471400F01F03E7E700BF34800440B0 +:101B90000CC00440B194FF1F2195FF1F2095FF1F2B +:101BA00008C0044000C0064031E400E004E100E069 +:101BB000B094FF1F2C95FF1F234B23499B7803F004 +:101BC000EC0200F003031343420700F00F0248BF8A +:101BD00043F01003042A8B702ED01B4B1A4A5B79FA +:101BE000C10603F0EF0348BF43F01003537193792C +:101BF000820603F0EF03144A48BF43F0100310F4C9 +:101C00000070937105D1114B114A1968914218D097 +:101C1000704730B491780F4D0F4B0C480C4C41F08D +:101C2000A00191702A78046003EBC20340F24732AE +:101C30005B6830BC1A6070478B7943F040038B714E +:101C4000CBE71860704700BF00C006402895FF1F13 +:101C5000D400D8424C87FF1F1C480000F8B5134B36 +:101C60001B68DB041FD5124C237823B101F05AF90D +:101C70002378002BFAD10F4B0F4A104D104F114E05 +:101C8000114C12484FF4003119600023D37040F218 +:101C900003113960316029681579D2792370037096 +:101CA00011B101230B70F8BDF8BD00BF34800440B2 +:101CB0002095FF1F84E100E000C00640AC94FF1FA8 +:101CC00008C004400CC00440B094FF1FB194FF1F33 +:101CD0000A4A38B50546137803F0FF04002BFAD101 +:101CE00001212846FFF7E4FD21462846FFF7DAFDEB +:101CF000034A044B52F835201A6038BD2095FF1F67 +:101D00001C4800002895FF1F09B140F080000F4AD1 +:101D10001378984219D010B40D4C2468E40412D5FD +:101D200003F07F03082B02D10A4B00241C6000291A +:101D300000F07F0314BF60214421082B03D1054B21 +:101D400041F440711960107010BC70474C87FF1F40 +:101D5000348004400CC00440704700BF0D4B1B682A +:101D600013F4805305D0212805D90B4B00201860AF +:101D7000704718467047094B10B5074C53F8303080 +:101D800023600121FFF794FD236800221A700120CF +:101D900010BD00BF34800440AC94FF1F1C480000FD +:101DA0000C4B1B6813F4805306D00E2806D00A4A49 +:101DB000537B03F0FE03537300207047074B064A22 +:101DC00040F202311960537B43F001035373012049 +:101DD000704700BF3480044000C0064004C0044087 +:101DE000034B1B68DB0401D5FFF72ABE704700BF19 +:101DF0003480044070B5094E04464518AC4204F1E5 +:101E000001040AD03368DB04F8D514F8010CFFF79D +:101E100017FEAC4204F10104F4D170BD34800440DB +:101E200010B5044C237823B101F07CF82378002B03 +:101E3000FAD110BD2095FF1F084B094A1B78107876 +:101E4000DBB2C0B2834202D20138C01A7047054AE1 +:101E50001268013A1044C01A704700BF2C95FF1F4A +:101E60002195FF1F4887FF1F064A074B10781B78F4 +:101E7000C0B2DBB2984202D2044A12681044C01ABF +:101E8000704700BFB094FF1FB194FF1F3C87FF1F36 +:101E900070B4184B184D1B782A78D9B2D2B291423F +:101EA00022D0164B1C68531CA34214D300221346A5 +:101EB0001348C05CC0B2134E2A7032684AB19942CE +:101EC00038BF0919CB1A104909688B4201D8002381 +:101ED000137070BC70473F2B09D90C483F3A00681B +:101EE000805CDAB2C0B2E6E74FF0FF30F1E7DAB279 +:101EF000DEE700BFB094FF1FB194FF1F3C87FF1FB8 +:101F0000E094FF1FAC94FF1F4087FF1F2495FF1F25 +:101F10000D4A0E4B12781B78DBB29A4211D00C4A54 +:101F200011685A1C8A4204D300220A4B985CC0B242 +:101F300070473F2AF9D9084A3F3B1268D05CC0B2CB +:101F400070474FF0FF307047B094FF1FB194FF1FF0 +:101F50003C87FF1FE094FF1F2495FF1F054B064A97 +:101F60001B7806491268DBB20B700AB100231370AC +:101F7000704700BFB194FF1FAC94FF1FB094FF1FC8 +:101F800030B43C4B1A79940626D53B4DDC793B4B5B +:101F900029781A683A4BC9B2481C9042E4B232D34D +:101FA000197801F0FF03002957D00023184635495E +:101FB0000C542B703449096871B1344B1B78DBB277 +:101FC000834284BFD21A1318314A126898BFC31AC9 +:101FD000934224BF01230B70264AD378DBB2180644 +:101FE0001DD45A060DD5234B1B795B0609D5294B09 +:101FF00029491B6800220A7003B11A701D4B2C225C +:10200000DA7030BC70471B789842D3D03F282FD964 +:10201000224B3F391B685C54C3B22B70CAE711795D +:102020000906DED51E49194C08782178C9B28842C4 +:102030001BD01C4A1268481C904210D2272898BF17 +:10204000C1B20ED9184A27391268525CC1B2D2B255 +:102050000848D2B2C2712170C3E71846AAE700212E +:102060000846124A125CD2B2F2E76C21D170B8E78E +:10207000C3B29CE700C00640B094FF1F3C87FF1F1F +:10208000B194FF1FE094FF1FAC94FF1F2195FF1F29 +:102090004487FF1F2895FF1F2095FF1F2495FF1FD2 +:1020A0002C95FF1F4887FF1FDC94FF1FB494FF1F70 +:1020B000084B1860084B50B101F140021A60074A02 +:1020C000074B01F11A002831106019607047402257 +:1020D0001A60F4E72495FF1F3C87FF1F4087FF1F0E +:1020E0004487FF1F044B1860044B10B1283119605E +:1020F000704728221A607047DC94FF1F4887FF1F33 +:10210000704700BF431E032B14D872B60A4951F81A +:10211000230068B170B4094C058834F81320466870 +:1021200041F82360521B24F8132062B670BC70473C +:1021300062B67047002070478895FF1F8496FF1F86 +:10214000013803280BD872B6074B53F8203043B13F +:1021500000205B680130002BFBD162B67047002085 +:1021600070471846F9E700BFDC95FF1FF0B472B660 +:102170001A491B4E012311F8014B194F9A002407ED +:1021800042F0010505D556F8324064B156F83520C5 +:10219000BAB10133052BEED162B6124B00221A7090 +:1021A000F0BC00F02FBD0F4C0F4D217807EB43130F +:1021B000083001395860217047F8325062B6F0BCDF +:1021C0007047084A0949137807EBC5040830013BFA +:1021D0006060137047F8351062B6F0E754490000AC +:1021E0000080FF1F0596FF1F88004000C8004000C8 +:1021F000431E032B1DD81B4A400140F0100030B491 +:10220000104472B6184CE25C032A1BD8DFE802F0D7 +:102210000212151703220D88E25410F0080F14BFA4 +:10222000C823882343EA054308314160036062B64E +:1022300030BC704708300222EDE70522EBE708309A +:102240000422E8E7094A52F8230038B1084A52F854 +:102250002300416042F8231062B6E9E742F82310F8 +:10226000034AF7E70080FF1F1496FF1FDC95FF1F4E +:10227000EC95FF1F2DE9F04FDFF814B3DFF814A33E +:1022800087B044E0AD4F4FEA930807EBC809013E21 +:10229000D9F8042003F00803F6B2A2F1080003F015 +:1022A000FF04002B40F0038157F838301B0C99B223 +:1022B00022F8081C002B00F0F180A14B22F8064CFC +:1022C00042F8044C53F82620002A00F06C819D4D02 +:1022D00055F8263058609C4C45F8260034F81630E6 +:1022E000194424F8161000F06DFC002800F0548109 +:1022F000964A974B19F0080F00F1080018BF1346D3 +:10230000C9F8040047F8383008238BF800309BF8F0 +:102310000040E4B260071BD58E4B1B78ABB18E49F1 +:102320000A7802F0FF032AB1013BDBB20B70002BED +:1023300000F0B58389490A7802F0FF032AB1013B16 +:10234000DBB20B70002B00F0F68004238BF800301A +:1023500004F0080303F0FF02002B00F0D5809AF888 +:102360000030DBB21E098DD19C08744F57F8342021 +:1023700007EBC401C2F38302013A49680C2A7ED8F4 +:10238000DFE802F081817D7D7D7D7D7D427D7D7DEB +:1023900007000868724B734D01936C4B4A68724E8C +:1023A00047F8343081B240F281646D4B6A60286036 +:1023B00000220120A1423A611A60BA61307000F235 +:1023C000F680B1F5D06F80F0E882B1F5817F00F042 +:1023D000D38200F2D881802900F04D81822940F01B +:1023E0009282A988614B01F07F01042900F28C825E +:1023F0005F4C89000B44227062701A78930740F199 +:102400003883207002203AE1554B01931A6862B379 +:10241000584B5949544E18880C7896F800E04028DB +:10242000054684F0010C28BF402544F00204BEF1AB +:10243000000F81F800C0A0EB050007EBC40C0CBF37 +:102440008821C82180B28EF0010E41EA0541CCF806 +:102450000420188086F800E02A4447F8341010B9A8 +:10246000402D18BF0022019B1A603E4B1A88B2F51E +:10247000A06F04D100219A785970404B1A70404ADD +:102480000123137040E7374A158842F22100854244 +:1024900000F052812D4A47F83420F0E72B4A2C4BAC +:1024A00019F0080F18BF134647F838302CE700F032 +:1024B000A9FB344A344952F82630002B00F02D8114 +:1024C00058688C5D42F8260003F10802C9F8042020 +:1024D000032C05D8DFE804F0120F150204228A55F8 +:1024E0001A8819F0080F0CBF8823C82343EA024357 +:1024F00047F8383008E702228A55F1E703228A5567 +:10250000EEE705228A55EBE7E00700F17881210626 +:1025100000F1A281A20706D51C4A1D4913780220AA +:10252000DBB213700870E30602D5194B10221A7043 +:1025300007B0BDE8F08F00F0D1FC06E70080FF1F78 +:102540008895FF1F3495FF1F8496FF1FC800400029 +:10255000880040001096FF1F9995FF1F1896FF1FD7 +:102560003095FF1FFC95FF1F9895FF1FC020074067 +:102570000896FF1F4495FF1F0496FF1F98200740F1 +:1025800094200740DC95FF1F1496FF1F882007400A +:102590008020074090200740B74A47F8380013785A +:1025A00001331370B0E643F82600B44D93E642F2CF +:1025B0002104A14200F0AD8000F20E81B1F5086F58 +:1025C00000F05481B1F5106F40F09D81AC4AA978BC +:1025D0001170AC4D042402E00134142C0CD057F8D7 +:1025E00034301906F8D505EBC403013458680838AF +:1025F00000F008FB142CF2D1A349A44BA44A029189 +:10260000A449A54C9D4D039405964FF000098846BA +:102610001C4616460495206828B1456800F0F2FA79 +:102620002846002DF9D100232360049B30681A4608 +:10263000002342F8293028B1456800F0E3FA284623 +:10264000002DF9D100223260029A98F8003011462C +:10265000002241F8042B039A0291023B4FF0000143 +:1026600022F81910032B00F2B481DFE813F0E20125 +:10267000AE01E201AE01894C022022706270EA884C +:10268000824280F00D8286490D78402A45F0020E84 +:10269000944607EBCE0028BF4FF0400C04EB0C0330 +:1026A00044600293CCEB02004FEA0C484FF0010962 +:1026B0000022C82444EA080385F0010447F83E30AC +:1026C00032700C70DFF8BCE1764BDFF8D481002863 +:1026D00040F02081BCF1400F1BD144F0020407EB15 +:1026E000C403029FDFF89CE15F60002A40F027816D +:1026F000020442F0880286F800900D7007444EF8FC +:1027000034203B46402804D10020674A01991080BC +:102710000B60664A01231370B1E68B5D032B00F258 +:10272000248101A252F823F00923000009230000AC +:102730004D28000053280000928862B95C4ACD1DE4 +:1027400011F8013B02F8013F8D42F9D1594A126854 +:10275000862A00F0C9805249524E0878327840F0FB +:10276000020580F00100087007EBC501002A4FF058 +:102770000000486082F001020CBF8821C82147F8A0 +:102780003510327086E640F20232914240F0B0805D +:10279000A98801F07F01042900F2B5806A88002A27 +:1027A00040F0B180444C89000C448146217841F0CE +:1027B0000201217000200290804684460446384978 +:1027C0000D7845F0020E07EBCE03B9F1000F5C6007 +:1027D0000CBF8824C8246DE742F22124A14240F0B6 +:1027E0008E80A988002940F04281344B344A354C10 +:1027F0001B68AD78136081460A462570DAE72B49DD +:10280000204B3148264EDFF8B0C0304DDFF8D4E021 +:102810002F4F02240C702F4C18605C6098602E487B +:10282000D8601A619A610D2332702C4C8CF80030FC +:102830002B4EFF232B7001209F258EF800303A701D +:1028400033702570087007B0BDE8F08F00238B55FA +:102850005AE501238B5557E51749224B80220D205D +:1028600008701A70A2077FF55EAE55E6044A0B4C5D +:102870001278227003E700BF0596FF1F3495FF1FF3 +:102880001096FF1F0080FF1FEC95FF1F8895FF1F0C +:10289000DC95FF1F1496FF1F8496FF1F0896FF1FED +:1028A0000496FF1F9895FF1F4495FF1F9420074033 +:1028B0008B96FF1F8C96FF1FC0200740A894FF1F18 +:1028C0009496FF1F2896FF1F88004000882007402D +:1028D000982007404895FF1F9C95FF1F84200740C4 +:1028E0008C20074080200740754A0F21117032E785 +:1028F000B1F5A06F07D100224FF001095AE742F26B +:1029000021329142F7D06F4B0F221A706E4A012389 +:102910001370B4E540287FF6E0AE44F002040EEBFD +:10292000C401029E4E60AAB183F80090674A88F8FD +:1029300000503346403840334EF83420E5E6029BE1 +:1029400086F80090020442F0C8020D7003444EF86D +:102950003420D7E683F80090029B5D4A88F8005047 +:10296000403840334EF83420CFE619F0080F0CBF42 +:10297000022303238B55C7E4A98801F07F010429B2 +:10298000C1D86A88002ABED14E4C89000C448146C9 +:10299000217821F0020121700CE74E4A5468002C86 +:1029A000B1D06888B5F804E003E00C325468002C1C +:1029B000A9D013888342F8D153887345F5D1000A12 +:1029C00003280CBF2078108959E64FF0010388F8DE +:1029D000003009F10109B9F1040F04F1040406F112 +:1029E000040608F101087FF416AE3B4B059E3B4DF3 +:1029F000DFF8F080002018704FF0010918F8013B53 +:102A000005F8043B1A0719D44FEA890444F002027E +:102A100044F00304002347F8323047F83430304B99 +:102A20009D4209F10109E9D196F8009089F001026F +:102A3000C0E64FF0000388F80030CAE700F0C2F8A3 +:102A400018B307EB49134FEA890408305860204B4C +:102A500047F8343000F0B6F868B144F0010307EBF2 +:102A6000C30208305060194A47F83320CEE7814648 +:102A7000A0E6022003E6184B44F001021B7847F859 +:102A80003200154A01331370C0E7134B124A1B780A +:102A90004FEA8904013347F834001370DAE700BEC7 +:102AA0004028844628BF4FF0400C04EB0C03CCEBCD +:102AB00000004FEA0C48029300224FF001097EE625 +:102AC0009995FF1FC020074094200740C800400090 +:102AD00088004000584900000596FF1FC4200740A9 +:102AE000D4200740544900002DE9F04100F056FB86 +:102AF00000231F491A4601EBC30041F8332001337C +:102B0000142B42604FF000041948F4D1194A1A4FAF +:102B100013681A491A4D1B4EDFF874C0DFF874E0D1 +:102B2000DFF8748043F480231360C0F307233B7005 +:102B3000C0F307430B70000EFF2302F52832287004 +:102B4000D4328CF80030104D8EF800300F483370BE +:102B5000012388F80030702681F850404FF400744B +:102B6000102107F8183C2E7004601170BDE8F08148 +:102B70000080FF1F348004409C200740B0200740A5 +:102B8000B42007401020074049E400E008E100E0DD +:102B900080200740882007409420074000F0A2B81A +:102BA00000F07AB800F054B800F08EB800F06AB9BE +:102BB00000F044B90846114600F0B0B8084600F0ED +:102BC00031B900BF72B60D480268B2FA82F30B2B1E +:102BD00010DC4FF00041D94022EA0102026062B6E7 +:102BE000074803EBC303DB00C2180021C1501046A5 +:102BF0005160704762B60020704700BF6087FF1FBA +:102C0000BC83FF1F0D4B0E4AC31AA2FB03231B09F3 +:102C10000B2B0CD80B4A127852B972B60A484FF0F7 +:102C20000041026821FA03F31A43026062B670475A +:102C3000064A1278002AF0D0FFF798BABC83FF1F2B +:102C4000398EE3380596FF1F6087FF1F1096FF1F20 +:102C500038B50F4D286878B143880288C118013310 +:102C600093420C7A02D24380204638BDFFF7CAFF58 +:102C7000002320462B6038BD064B1B782BB1032068 +:102C8000FFF740FA28600028E6D14FF0FF3038BD4A +:102C90002496FF1F1096FF1F10B5094C206818B12D +:102CA00043881844007A10BD064B1B782BB10320D3 +:102CB000FFF728FA20600028F2D14FF0FF3010BD56 +:102CC0002496FF1F1096FF1F044B054A1B6890882F +:102CD0001BB11A885B88D31A184470472496FF1FCB +:102CE0008496FF1F0B4B1B789BB110B50A4C2068D4 +:102CF00048B1FFF787FF002303202360FFF702FAA4 +:102D000030B1FFF77FFF0320FFF7FCF90028F8D16F +:102D100010BD70471096FF1F2496FF1F2DE9F04F3E +:102D2000DFF8F89083B0012289F80020019169B39F +:102D3000DFF8EC80364F019E8346D8F80000B0B330 +:102D4000344D4488C4F14001B14228BF314604EB00 +:102D5000010E00221FFA8EFE2A70761AA0F802E0F9 +:102D600000F1080251B1013C224459441BF8014BC7 +:102D700002F8014F8B45F9D1B0F802E0BEF13F0FE8 +:102D80000BD8254A05211170002ED6D101980023B9 +:102D900089F8003003B0BDE8F08F40220280014680 +:102DA0000420FFF725FA0022C8F80020E9E73A7866 +:102DB0002AB3184D48F601444FF0010A07E0013CE0 +:102DC00016D02A78A2B900F0ADF83A78BAB104204A +:102DD000FFF7B6F90728F2D889F800A0FFF7F2FE4E +:102DE000C8F800000028ACD10C4B013C1870E8D1A9 +:102DF00001234FF0FF302B7003B0BDE8F08F0023AC +:102E00004FF0FF3089F8003003B0BDE8F08F00BF0D +:102E10001096FF1F2096FF1F1896FF1F1996FF1F81 +:102E20001C96FF1F00B583B002AB012103F8010D12 +:102E30001846FFF773FF03B05DF804FB38B50E4D7D +:102E40000E4C28680123237028B14088002323708A +:102E5000C0F1400038BD0A4B1B7813B90020207028 +:102E600038BD0420FFF76CF90728F7D8FFF7AAFE52 +:102E700028600028E9D1F1E71C96FF1F1996FF1F73 +:102E80001096FF1FF8B5114B1B788BB1104E114DEA +:102E9000346801272F7064B10F4A638800271770C8 +:102EA000214623800420FFF7A3F9376000232B700D +:102EB000F8BDFFF787FE084B28B1014604201C70BF +:102EC000FFF796F9F2E71F70F0E700BF1096FF1FBB +:102ED0001C96FF1F1996FF1F1896FF1F38B50E4B43 +:102EE0001B7873B90D4C216861B103F0FF054B8865 +:102EF0000B800420FFF77CF9256038BD084B0122C8 +:102F00001A7038BDFFF75EFE0028F7D00146BDE815 +:102F100038400420FFF76CB91996FF1F1C96FF1F5D +:102F20001896FF1F2DE9F843314E337893B1314F96 +:102F30003A787AB90122D9073A7036D49A0719D467 +:102F400000225B073A7005D52B4B1A6812B1EFF3DC +:102F500005820AB1BDE8F883EFF3108172B61868F4 +:102F600018B1264C2278002A2ED00029F2D162B660 +:102F7000BDE8F883DFF8908098F80020002ADFD0C1 +:102F8000DFF88890002405E0013498F80030E4B2BE +:102F9000A34212D959F824502B6828461B69984738 +:102FA0000028F1D02B699847EEE7FFF78DFEC8B9EE +:102FB000134B1B781BB93378C0E73378C0E73378FD +:102FC00003F0FE033370B9E745691D6001232370E8 +:102FD0005DB1AA6101B962B600254577836898475B +:102FE0002570B7E700F0D8F8E2E7064B1D60F1E77F +:102FF0006487FF1F2996FF1F3896FF1F3C96FF1F0F +:103000006787FF1F3496FF1F4C96FF1F4096FF1FD8 +:1030100070B5EFF3108272B60C4C206880B10C4E84 +:1030200000254369236073B19D6102B962B645779B +:1030300083689847EFF3108272B620680028F0D1B9 +:1030400002B962B670BD3360EFE700BF2C96FF1F78 +:103050003096FF1FFFF7DCBF024A1368013313608D +:10306000704700BFA894FF1F70B4104E104D347805 +:10307000CCB12B68984214D02A46002303E052F8C2 +:10308000041F81420DD00133DBB2A342F7D15A1C99 +:10309000D2B2084945F823000B78327043F002039E +:1030A0000B7070BC704723460122F2E74C96FF1F5D +:1030B0004096FF1F6487FF1F30B42948294A2A4BD6 +:1030C0002A4D6024E121047011701B78284C082BD4 +:1030D00030D00A2B2748284937D00C2B0CBF15229B +:1030E0003D2212232A60236002600B60234B244997 +:1030F0001B78244ABBB101230B601360224B234988 +:103100001B78234A012B26D9042B0FD9082B1ED953 +:10311000102B94BF862387230B6013601D4B012265 +:103120001A7030BC70470B601360E7E784230B60B4 +:103130001360F3E700F58E200F49083001221323B6 +:103140002A60236002600B60D0E71922F7E785232D +:103150000B601360E2E780230B601360DEE700BFC3 +:1031600000400740014007406587FF1F08B003404B +:103170000CB0034008B00B400CB00B404E96FF1F44 +:1031800020B0034020B00B406687FF1F24B00340EF +:1031900024B00B404D96FF1F704700BF70B584B040 +:1031A00072B6194B194D1A48702241260F248021FE +:1031B0001A702E701A460470197013781B06FCD50D +:1031C000144B186862B6144B144C984298BF00EB2D +:1031D000800001A998BF40000A22FEF7CBFA01A99E +:1031E0002046002311F8012B01333AB10A2B20F8B5 +:1031F000022FF7D11623237004B070BD5B00DBB241 +:10320000237004B070BD00BF000002400700024000 +:1032100006000240080002407F969800F487FF1FD6 +:103220000B460146184600F001B800BF13460A4697 +:103230000146022000F092BE014B1868704700BFA3 +:10324000388CFF1F70B50F4E0F4D761BB61018BF90 +:10325000002405D0013455F8043B9847A642F9D123 +:103260000A4E0B4D761B01F0A3FBB61018BF0024CD +:1032700006D0013455F8043B9847A642F9D170BDF9 +:1032800070BD00BFBC490000BC490000C849000037 +:10329000BC490000024B0146186800F00BB800BFA3 +:1032A000388CFF1F024B0146186800F01BBF00BF9F +:1032B000388CFF1F2DE9F04F01F10B05162D83B05F +:1032C000064640F29F8035F0070500F1BF80A94215 +:1032D00000F2BC8000F058FBB5F5FC7FC0F09C828A +:1032E0006B0A00F0BA80042B00F28381A80900F178 +:1032F000390E4FEA4E033830C44F07EB8303A3F176 +:1033000008015C68A14207D1ACE0002A80F2AC80E1 +:10331000E468A14200F0A680636823F003035A1B0F +:103320000F2AF2DDB9493C6901F1080E744500F03D +:10333000B381636823F003035A1B0F2A00F39981BA +:10334000002AC1F814E0C1F810E080F29E80B3F5C5 +:10335000007F80F06781DB0803F1010C01229B10E4 +:1033600002FA03F34A6851F83C80C4F8088001EB84 +:10337000CC091A43A9F10803E3604A6041F83C40D4 +:10338000C8F80C40831001249C40944200F28A80CB +:10339000144206D120F003006400144200F104003E +:1033A000FAD007EBC009CC468046DCF80C108C45FF +:1033B00007D173E1002A80F28181C9688C4500F051 +:1033C0006D814B6823F003035A1B0F2AF2DD0C4674 +:1033D000D1F80CC054F8088F4B1945F001054D6029 +:1033E00042F00101C8F80CC03046CCF808807B617F +:1033F0003B61C3F80CE0C3F808E059609A5000F054 +:10340000C5FA1FE0102921D800F0BEFA10250623C6 +:1034100002207E4F07EB8303A3F108025C6894420D +:1034200000F045816368E168A56823F00303234445 +:1034300030465A68E96042F001028D605A6000F03F +:10344000A5FA0834204603B0BDE8F08F00240C2311 +:103450002046336003B0BDE8F08F80234FF0400E6C +:103460003F2049E770465DE72344E1685A68A56854 +:1034700042F00102E96030468D605A6000F086FA41 +:103480000834204603B0BDE8F08F234430465A6824 +:1034900042F001025A6000F079FA0834204603B085 +:1034A000BDE8F08FBC68636823F00308A84504D327 +:1034B000C5EB08030F2B00F38C80554BDFF86091B0 +:1034C0001A68D9F8003001332A4404EB080A00F0E6 +:1034D000608102F580520F3222F47F6222F00F02E7 +:1034E00011463046019200F04BFCB0F1FF3F83469D +:1034F000019A00F05881824500F2FC80454B196822 +:10350000DA451144196000F05381D9F80000DFF862 +:1035100010E101301BBFCAEB0B0A5144CEF800B0DA +:1035200019601BF0070100F01781C1F10800C1F517 +:103530008051834408315A44C2F30B02C2EB0109A3 +:1035400049463046019300F01BFC431C019B00F0F0 +:103550003F81CBEB00024A4442F001021968C7F8F0 +:1035600008B04944BC42CBF804201960DFF8A490AD +:1035700016D0B8F10F0F40F2FD806268A8F10C037D +:1035800023F00703E01802F001024FF0050E1A4382 +:103590000F2B6260C0F804E0C0F808E000F21C8164 +:1035A0001D4BBC681A68914288BF19601B4B1A6892 +:1035B0009142626888BF196022F003029542A2EB33 +:1035C000050301D80F2B04DC304600F0DFF900249E +:1035D00038E7621943F0010345F0010565603046A4 +:1035E000BA60536000F0D2F90834204603B0BDE859 +:1035F000F08F142B71D9542B00F2A480280B00F10A +:103600006F0E4FEA4E036E3076E600BF3C8CFF1F14 +:103610005896FF1F5C96FF1F5496FF1F5096FF1F82 +:103620004890FF1F5A0A042A5ED9142A00F2B38078 +:1036300002F15C0149005B3207EB810C57F8211065 +:10364000DFF8DC81ACF1080C8C4500F088804A681A +:1036500022F00302934202D289688C45F7D1D1F857 +:103660000CC07A68C4F80CC0A160CCF80840CC60EB +:1036700088E6631942F0010745F0010565603046B0 +:103680004B610B61C3F80CE0C3F808E05F609A502F +:10369000083400F07BF9D5E64A6873E608F10108C2 +:1036A00018F0030F0CF1080C7FF47FAE30E0DC68FB +:1036B000A34208BF02303FF435AEB3E60B440C46DC +:1036C0005A68C96854F8085F42F001025A603046EF +:1036D000E9608D6000F05AF9B4E603F15C0E03F185 +:1036E0005B004FEA4E0307E69A0902F139014900EF +:1036F0003832A1E7BC424A4B3FF400AF9C68626895 +:1037000022F003025AE759F80839994540F08280BF +:1037100010F0030F00F1FF30F5D17B6823EA0403BA +:103720007B6064009C423FF6BDAE002C3FF4BAAE15 +:103730001C4240467FF435AE64001C4200F1040098 +:10374000FAD02EE6B3F5AA7F18D8E80B00F1780E70 +:103750004FEA4E037730CFE54FF48051EBE601217D +:10376000D8F80430921001FA02F21A43C8F8042083 +:10377000614677E70123CBF8043025E740F2545245 +:10378000934220D8A80C00F17D0E4FEA4E037C3006 +:10379000B2E51032A4E6542A26D81A0B02F16F01C2 +:1037A00049006E3248E7BC68626822F0030205E710 +:1037B000CAF30B0000287FF4A8AE4244BB6842F075 +:1037C00001025A60ECE6FE234FF07F0E7E2093E567 +:1037D00001224FF00009C1E604F10801304600F073 +:1037E00081FCD9F80010DBE6B2F5AA7F05D8DA0B28 +:1037F00002F17801490077321EE740F254518A42C3 +:1038000005D89A0C02F17D0149007C3214E7FE21B3 +:103810007E2211E77B6884E7E808431C5B00F8E53B +:103820003C8CFF1F8842F0B50DD98B1898420AD204 +:103830008118002A51D09A1A13F8014D01F8014D50 +:103840009342F9D1F0BD0F2A48D941EA00039B0702 +:1038500046D100F1100401F11003154653F8106C25 +:1038600044F8106C53F80C6C44F80C6C53F8086C6A +:1038700044F8086C103D53F8046C44F8046C0F2DA8 +:1038800003F1100304F11004E8D8A2F1100323F0AF +:103890000F0302F00F0E1033BEF1030F194403445F +:1038A00021D91E1F0D467446043C55F8047B46F88A +:1038B000047F032CF8D8AEF1040424F0030404348C +:1038C0002344214402F0030262B1013B0A4411F88F +:1038D000014B03F8014F8A42F9D1F0BD0346F3E7EB +:1038E0000346F2E7F0BD7246EEE700BF70B484070E +:1038F00046D0541E002A41D0CDB2034602E0621EDB +:10390000E4B3144603F8015B9A07F8D1032C2ED9CF +:10391000CDB245EA05250F2C45EA054519D903F135 +:1039200010022646103E0F2E42F8105C42F80C5C46 +:1039300042F8085C42F8045C02F11002F2D8A4F1EB +:10394000100222F00F0204F00F041032032C134473 +:103950000DD91E462246043A032A46F8045BFAD8DB +:10396000221F22F003020432134404F003042CB19A +:10397000C9B21C4403F8011BA342FBD170BC7047C1 +:1039800014460346C2E700BF704700BF704700BF40 +:10399000024B0A460146186800F002B8388CFF1F37 +:1039A0002DE9F04F174683B0002900F0C1800E4684 +:1039B000814607F10B05FFF7E7FF56F804EC162DDB +:1039C0002EF00304A6F1080840D810221546AF4295 +:1039D00041D8944275DAC94B996808EB04008842D3 +:1039E000416800F0D98021F0010303445B68DB07E4 +:1039F0007DD51EF0010F35D039464846FFF75AFCF9 +:103A00000746E0B156F8043C23F001034344A0F11B +:103A100008029A4200F04481221F242A00F23181D8 +:103A2000132A00F204810346324611681960516876 +:103A3000596092689A603146484600F053FB484608 +:103A4000FFF7A4FF384603B0BDE8F08F25F0070567 +:103A5000002D2A46BBDA0C230020C9F8003003B041 +:103A6000BDE8F08F56F8083CC3EB080ADAF80430DA +:103A700023F0030C04EB0C039342BDDB5746DAF84A +:103A80000C1057F8080F221F242AC160886000F22A +:103A90001781132A40F212813168CAF80810716840 +:103AA000CAF80C101B2A00F22B8108360AF110020A +:103AB0003168116071685160B16891603E461C4682 +:103AC000D046631B0F2B1DD8D8F8043003F0010338 +:103AD00023434444C8F80430636843F0010363603F +:103AE0004846FFF753FF304603B0BDE8F08F21F0A2 +:103AF00003012144914221DBC36882680C46D360F4 +:103B00009A60DEE7D8F8042008EB050102F0010214 +:103B1000154343F001020B44C8F804504A605A6848 +:103B200042F0010208315A60484600F0DBFAD7E75C +:103B3000114603B0BDE8F04FFFF7BCBB1EF0010F0C +:103B40007FF45AAF56F8083CC3EB080ADAF80430A1 +:103B500023F0030C01EB0C0E96458BDBC3688268E7 +:103B60005746D3609A6057F8081FDAF80C30CB60DC +:103B7000221F242A996000F29980132A62D933689F +:103B8000CAF808307368CAF80C301B2A00F2A0800B +:103B900008360AF1100356E021F0030BA34405F1A7 +:103BA0001000834559DA1EF0010F7FF425AF56F857 +:103BB000081CC1EB080ADAF8041021F0030CE344F6 +:103BC00058453FF757AF5746DAF80C1057F8080F2B +:103BD000221F242AC160886000F2B480132A40F2B8 +:103BE000A5803168CAF808107168CAF80C101B2A41 +:103BF00000F2AF8008360AF1100231681160716876 +:103C00005160B16891600AEB0501C5EB0B0242F00F +:103C1000010299604A60DAF8043003F001031D43A1 +:103C20004846CAF80450FFF7B1FE38465CE73368EF +:103C30000360736843601B2A27D800F1080306F16C +:103C40000802F2E63B4632681A6072685A60B2684F +:103C50009A603E467446D04633E708EB0501C5EB53 +:103C60000B0B4BF0010299604A6056F8043C03F0DC +:103C700001031D43484646F8045CFFF787FE3046C3 +:103C800032E73146FFF7CEFDD5E6B3688360F368CF +:103C9000C360242A28D000F1100306F11002C4E604 +:103CA00050F8043C23F003031C440AE7314638462D +:103CB0007446D046FFF7B6FD3E4602E73A46F7E6C1 +:103CC000314638461C46D046FFF7ACFD3E46F8E686 +:103CD000B368CAF81030F368CAF81430242A1BD02D +:103CE00010360AF11803AEE7336903617369436163 +:103CF00006F1180200F1180397E600BF3C8CFF1F85 +:103D0000B168CAF81010F168CAF81410242A0FD04C +:103D100010360AF11802CBE63369CAF81830736915 +:103D2000CAF81C3018360AF120038CE73A4664E7DB +:103D30003269CAF818207269CAF81C2018360AF1CC +:103D40002002B5E6314638460193FFF76BFD019B33 +:103D500059E7B168CAF81010F168CAF81410242A9B +:103D600003D010360AF1180247E73269CAF8182062 +:103D70007269CAF81C2018360AF120023DE700BF1C +:103D800038B5074C0023054608462360FDF7BEFC06 +:103D9000431C00D038BD2368002BFBD02B6038BDFE +:103DA0009896FF1F80EA0102844612F0030F4FD15C +:103DB00011F0030F32D14DF8044D11F0040F51F8FA +:103DC000043B0BD0A3F101329A4312F0803F04BFB1 +:103DD0004CF8043B51F8043B16D100BF51F8044B9A +:103DE000A3F101329A4312F0803FA4F101320BD1CA +:103DF0004CF8043BA24312F0803F04BF51F8043B4F +:103E00004CF8044BEAD023460CF8013B13F0FF0FAB +:103E10004FEA3323F8D15DF8044B704711F0010FDE +:103E200006D011F8012B0CF8012B002A08BF7047AF +:103E300011F0020FBFD031F8022B12F0FF0F16BFA6 +:103E40002CF8022B8CF8002012F47F4FB3D170476E +:103E500011F8012B0CF8012B002AF9D1704700BF93 +:103E6000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF62 +:103E7000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF52 +:103E800090F800F06DE9024520F007016FF0000C9A +:103E900010F0070491F820F040F049804FF0000442 +:103EA0006FF00700D1E9002391F840F000F108001D +:103EB00082FA4CF2A4FA8CF283FA4CF3A2FA8CF355 +:103EC0004BBBD1E9022382FA4CF200F10800A4FABC +:103ED0008CF283FA4CF3A2FA8CF3E3B9D1E9042310 +:103EE00082FA4CF200F10800A4FA8CF283FA4CF347 +:103EF000A2FA8CF37BB9D1E9062301F1200182FA01 +:103F00004CF200F10800A4FA8CF283FA4CF3A2FA06 +:103F10008CF3002BC6D0002A04BF04301A4612BA14 +:103F2000B2FA82F2FDE8024500EBD2007047D1E917 +:103F3000002304F00305C4F100004FEAC50514F0A6 +:103F4000040F91F840F00CFA05F562EA05021CBF77 +:103F500063EA050362464FF00004A9E72DE9F04744 +:103F6000254C2568D5F8484106468846924699462C +:103F7000C4B360681F2817DC431C76B104EB8005CE +:103F80000122C5F888A0D4F8881182401143022E7E +:103F9000C4F88811C5F808911ED00230636044F857 +:103FA00020800020BDE8F087144B03B34FF4C870A5 +:103FB000FFF770F90446D0B1D5F84831002780E802 +:103FC0008800C5F8484138460123C4F88871C4F810 +:103FD0008C71002EE1D0D1E7D4F88C110A43C4F8DB +:103FE0008C21DAE705F5A674C5F84841C1E74FF022 +:103FF000FF30BDE8F08700BFAC49000095320000FB +:10400000024B13B1024800F005B8704700000000F1 +:1040100021400000002301461A461846FFF79EBFC4 +:1040200038B5074D074C2C1BA41005D0013C55F8A2 +:10403000043D9847002CF9D1BDE8384000F0C4BCDD +:104040000000000000000000F8B5234F0C460646B3 +:10405000FFF79AFCBB685D6825F00305291B01F694 +:10406000EF7121F47F6121F00F01A1F58054B4F5C7 +:10407000805F07DB00213046FFF782FEBB682B44E0 +:10408000984204D03046FFF781FC0020F8BD614221 +:104090003046FFF775FE01300DD0104BBA68196835 +:1040A0002D1B45F001053046091B55601960FFF7CF +:1040B0006DFC0120F8BD00213046FFF761FEBA68B3 +:1040C000831A0F2BDEDD064C0449246843F00103FC +:1040D000001B53600860D5E73C8CFF1F5C96FF1FF8 +:1040E0004890FF1F002945D02DE9F0410D4680463C +:1040F000FFF74AFC55F8047C6A4927F00103A5F153 +:104100000804E2188E685068B24220F0030062D0C2 +:10411000FE0750600BD455F8087CE41B01F1080E33 +:10412000A56875453B446FD0E768EF60BD60151822 +:104130006D68ED0742D543F001026260E350B3F5CC +:10414000007F18D2DB085A1C4D6851F83270A76006 +:1041500001209B1000FA03F301EBC2001D43083855 +:10416000E0604D6041F83240FC604046BDE8F041FF +:10417000FFF70CBC70475A0A042A53D89A0902F177 +:1041800039077F0002F1380501EB870051F827203D +:104190004449083890424DD0516821F003018B42C8 +:1041A00002D292689042F7D1D068E060A260846049 +:1041B000D4604046BDE8F041FFF7E8BB95683A4F50 +:1041C000BD4203443FD0D068E86043F001028560FF +:1041D0006260E350B3E7FF07034407D455F8082CA7 +:1041E000A41A1344A068E268C26090602F4A126863 +:1041F00043F00100934260608C60B6D32C4B404684 +:104200001968FFF721FFB0E711184968C90744D4BE +:104210009168D268CA60034443F001009160606015 +:10422000E350A2E7142A17D802F15C077F0002F1DD +:104230005B05A9E7AA104B68012505FA02F21343B2 +:104240004B600246B1E743F001024C610C61E5604E +:10425000A5606260E35088E7542A06D81A0B02F181 +:104260006F077F0002F16E058EE7B2F5AA7F06D8D0 +:10427000DA0B02F178077F0002F1770584E740F25C +:104280005450824206D89A0C02F17D077F0002F159 +:104290007C0579E7FE277E2576E743F00102626020 +:1042A000E35062E73C8CFF1F448CFF1F4490FF1FCC +:1042B0005896FF1F506C656173652070726573734B +:1042C00020646F776E20796F75722066696E6765FE +:1042D00072000000436170747572696E67207375B7 +:1042E0006363656564730000506C6561736520727B +:1042F000656C6561736520796F75722066696E679C +:10430000657200004D61746368696E672073756340 +:1043100063656564732C49443D0000002D2D2D2DEF +:104320002D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2DBD +:1043300000000000200000004D61746368696E6732 +:10434000206661696C730000436170747572696EF8 +:1043500067206661696C73002D2D2D2D2D2D2D2D5F +:104360002D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D7D +:104370002D2D2D2D2D000000436F6D6D756E696321 +:104380006174696F6E207769746820746865206451 +:104390006576696365206661696C656400FFFFFF8F +:1043A000982F8A4291443771CFFBC0B5A5DBB5E9A0 +:1043B0005BC25639F111F159A4823F92D55E1CAB14 +:1043C00098AA07D8015B8312BE853124C37D0C55A2 +:1043D000745DBE72FEB1DE80A706DC9B74F19BC1EA +:1043E000C1699BE48647BEEFC69DC10FCCA10C24DA +:1043F0006F2CE92DAA84744ADCA9B05CDA88F976BE +:1044000052513E986DC631A8C82703B0C77F59BF27 +:10441000F30BE0C64791A7D55163CA066729291453 +:10442000850AB72738211B2EFC6D2C4D130D3853F0 +:1044300054730A65BB0A6A762EC9C281852C7292B2 +:10444000A1E8BFA24B661AA8708B4BC2A3516CC7E0 +:1044500019E892D1240699D685350EF470A06A1019 +:1044600016C1A419086C371E4C774827B5BCB03468 +:10447000B30C1C394AAAD84E4FCA9C5BF36F2E6806 +:10448000EE828F746F63A5781478C8840802C78C95 +:10449000FAFFBE90EB6C50A4F7A3F9BEF27871C698 +:1044A000436F6D6D616E642070726F6365737365C9 +:1044B00064207375636365737366756C6C79000053 +:1044C000436F6D6D616E642070726F6365737369A5 +:1044D0006E67206661696C6564000000313A3120C6 +:1044E000636F6D70617269736F6E206661696C6570 +:1044F00064000000436F6D70617269736F6E2077A6 +:1045000069746820616C6C2066696E676572707290 +:10451000696E7473206661696C6564004E6F206615 +:10452000696E6765727072696E7420696E20646569 +:104530007369676E617465642049440044657369FA +:10454000676E617465642049442068617320666900 +:104550006E6765727072696E740000004D6F6475ED +:104560006C6520756E726567697374657265642029 +:1045700066696E6765727072696E74004E6F207244 +:104580006567697374657261626C6520494420686F +:10459000657265004E6F2062726F6B656E20666992 +:1045A0006E6765727072696E74000000496E7661A4 +:1045B0006C696420646573696E6761746564206604 +:1045C000696E6765727072696E74206461746100EF +:1045D0005468652066696E6765727072696E7420D2 +:1045E000686173206265656E2072656769737465C2 +:1045F00072656400506F6F72207175616C697479B7 +:104600002066696E6765727072696E7420696D618B +:104610006765000046696E6765727072696E742026 +:1046200073796E746865736973206661696C65641B +:1046300000000000436F6D6D756E69636174696F92 +:104640006E2070617373776F7264206E6F74206177 +:104650007574686F72697A656400000045787465E6 +:10466000726E616C20466C617368206275726E694F +:104670006E67206572726F7200000000496E76618D +:104680006C69642064657369676E61746564204950 +:1046900044000000496E636F72726563742070613C +:1046A00072616D65746572004163717569736974D7 +:1046B000696F6E2074696D656F757400496E7661FF +:1046C0006C6964206E756D626572206F6620666924 +:1046D0006E6765727072696E742073796E74686546 +:1046E00073697300496E636F7272656374204275FB +:1046F000666665722049442076616C75650000002D +:104700004E6F2066696E6765727072696E7420699B +:104710006E70757420696E746F2066696E6765725D +:104720007072696E742072656164657200000000C9 +:10473000436F6D6D616E642063616E63656C6C6563 +:104740006400000057726F6E672064617461206CB2 +:10475000656E67746800000057726F6E6720646151 +:10476000746120636865636B20636F64650000009B +:10477000457863656564207570706572206C696D3D +:104780006974206F66206163717569736974696FFC +:104790006E2074696D657300446174612072656197 +:1047A00064696E672074696D656F75740000000040 +:1047B00000000000000000000D1200003112000097 +:1047C000C1120000BD120000B9120000B5120000B5 +:1047D000B1120000D5110000911200008D120000EE +:1047E000851200007D1200007512000065120000A5 +:1047F0005512000051120000491200004112000041 +:10480000E51200000513000025130000C51200008A +:1048100019120000011200000D0AFFFF4008FE43BC +:1048200040A004404408FE4344A004400018FE4356 +:1048300000C004403000FE43309004403400FE438A +:10484000349004401C18FE431CC004401018FE4362 +:1048500010C004400818FE4308C004400C18FE4372 +:104860000CC004400C10FE430CB004401010FE437A +:1048700010B004401810FE4318B004401C10FE4352 +:104880001CB004401410FE4314B004400418FE434E +:1048900004C004400010FE4300B004400008FE4382 +:1048A00000A004400408FE4304A004400C08FE439A +:1048B0000CA004400808FE4308A004401418FE435E +:1048C00014C004401818FE4318C004400410FE43EE +:1048D00004B004400810FE4308B004401400FE4336 +:1048E000149004404C08FE434CA004400420FE43B6 +:1048F00004D004402410FE4324B004402010FE43A2 +:1049000020B004402810FE4328B004402C10FE4381 +:104910002CB004400020FE4300D004404808FE4371 +:1049200048A004401000FE43109004400000000026 +:1049300000000000BD2B0000B52B0000B12B0000D3 +:10494000AD2B0000A92B0000A52B0000A12B00001F +:104950009D2B000000151915000100006887FF1F3E +:1049600012000000000200009487FF1F43000000B7 +:1049700000030000F087FF1F00000000010309048E +:104980007C87FF1F0000000002030904D887FF1F77 +:104990000000000003030904F487FF1F000000006B +:1049A0000000000000000000000000001088FF1F51 +:1049B000F8B500BFF8BC08BC9E4670470140000037 +:0849C00035040000610600004F +:0449C800F8B500BF7F +:0849CC0054E8FF7F0100000028 +:1049D40000000000B847000000000000E8030000E9 +:1049E40000000000012100009C96FF1F4000000011 +:1049F4001A00000028000000280000000801000040 +:104A04003449000000000000E8030000000000003A +:104A1400FFFFFFFF010A0401120110010200004020 +:104A2400C016830475020102030100001803540038 +:104A3400650065006E00730079006400750069000C +:104A44006E006F0009024300020100C03209040035 +:104A540000010202010005240010010524010101E6 +:104A64000424020605240600010705820310004001 +:104A740009040100020A00000007050302400000C7 +:104A8400070584024000000016035500530042004D +:104A94002000530065007200690061006C00000092 +:104AA400040309040C0300000000000000000000DF +:104AB40000000000000000000000000000000000F2 +:104AC40000000000FC8AFF1F648BFF1FCC8BFF1FBC +:104AD40000000000000000000000000000000000D2 +:104AE40000000000000000000000000000000000C2 +:104AF40000000000000000000000000000000000B2 +:104B040000000000000000000000000000000000A1 +:104B14000000000000000000000000000000000091 +:104B24000000000000000000000000000000000081 +:104B34000000000000000000000000000000000071 +:104B44000000000000000000000000000000000061 +:104B54000000000000000000000000000000000051 +:104B64000000000000000000010000000000000040 +:104B74000E33CDAB34126DE6ECDE05000B00000005 +:104B84000000000000000000000000000000000021 +:104B94000000000000000000000000000000000011 +:104BA4000000000000000000000000000000000001 +:104BB40000000000000000000000000000000000F1 +:104BC40000000000000000000000000000000000E1 +:104BD40000000000000000000000000000000000D1 +:104BE40000000000000000000000000000000000C1 +:104BF40000000000000000000000000000000000B1 +:104C040000000000000000000000000000000000A0 +:104C14000000000000000000000000000000000090 +:104C24000000000000000000000000000000000080 +:104C34000000000000000000000000000000000070 +:104C44000000000000000000000000000000000060 +:104C54000000000000000000000000000000000050 +:104C64000000000000000000000000000000000040 +:104C74000000000000000000000000000000000030 +:104C84000000000000000000000000000000000020 +:104C94000000000000000000000000000000000010 +:104CA4000000000000000000000000000000000000 +:104CB40000000000000000000000000000000000F0 +:104CC40000000000000000000000000000000000E0 +:104CD40000000000000000000000000000000000D0 +:104CE40000000000000000000000000000000000C0 +:104CF40000000000000000000000000000000000B0 +:104D0400000000000000000000000000000000009F +:104D1400000000000000000000000000000000008F +:104D2400000000000000000000000000000000007F +:104D3400000000000000000000000000000000006F +:104D4400000000000000000000000000000000005F +:104D5400000000000000000000000000000000004F +:104D6400000000000000000000000000000000003F +:104D7400000000000000000000000000000000002F +:104D8400000000000000000000000000000000001F +:104D9400000000000000000000000000000000000F +:104DA40000000000000000000000000000000000FF +:104DB40000000000000000000000000000000000EF +:104DC40000000000000000000000000000000000DF +:104DD40000000000000000000000000000000000CF +:104DE40000000000000000000000000000000000BF +:104DF40000000000000000000000000000000000AF +:104E0400000000000000000000000000000000009E +:104E1400000000000000000000000000000000008E +:104E2400000000000000000000000000000000007E +:104E3400000000000000000000000000000000006E +:104E4400000000000000000000000000000000005E +:104E5400000000000000000000000000000000004E +:104E6400000000000000000000000000000000003E +:104E7400000000000000000000000000000000002E +:104E8400000000000000000000000000000000001E +:104E9400000000000000000000000000000000000E +:104EA40000000000000000000000000000000000FE +:104EB40000000000000000000000000000000000EE +:104EC40000000000000000000000000000000000DE +:104ED40000000000000000000000000000000000CE +:104EE40000000000000000001088FF1F0000000008 +:104EF400000000003C8CFF1F3C8CFF1F448CFF1FF4 +:104F0400448CFF1F4C8CFF1F4C8CFF1F548CFF1FC5 +:104F1400548CFF1F5C8CFF1F5C8CFF1F648CFF1F75 +:104F2400648CFF1F6C8CFF1F6C8CFF1F748CFF1F25 +:104F3400748CFF1F7C8CFF1F7C8CFF1F848CFF1FD5 +:104F4400848CFF1F8C8CFF1F8C8CFF1F948CFF1F85 +:104F5400948CFF1F9C8CFF1F9C8CFF1FA48CFF1F35 +:104F6400A48CFF1FAC8CFF1FAC8CFF1FB48CFF1FE5 +:104F7400B48CFF1FBC8CFF1FBC8CFF1FC48CFF1F95 +:104F8400C48CFF1FCC8CFF1FCC8CFF1FD48CFF1F45 +:104F9400D48CFF1FDC8CFF1FDC8CFF1FE48CFF1FF5 +:104FA400E48CFF1FEC8CFF1FEC8CFF1FF48CFF1FA5 +:104FB400F48CFF1FFC8CFF1FFC8CFF1F048DFF1F54 +:104FC400048DFF1F0C8DFF1F0C8DFF1F148DFF1F01 +:104FD400148DFF1F1C8DFF1F1C8DFF1F248DFF1FB1 +:104FE400248DFF1F2C8DFF1F2C8DFF1F348DFF1F61 +:104FF400348DFF1F3C8DFF1F3C8DFF1F448DFF1F11 +:10500400448DFF1F4C8DFF1F4C8DFF1F548DFF1FC0 +:10501400548DFF1F5C8DFF1F5C8DFF1F648DFF1F70 +:10502400648DFF1F6C8DFF1F6C8DFF1F748DFF1F20 +:10503400748DFF1F7C8DFF1F7C8DFF1F848DFF1FD0 +:10504400848DFF1F8C8DFF1F8C8DFF1F948DFF1F80 +:10505400948DFF1F9C8DFF1F9C8DFF1FA48DFF1F30 +:10506400A48DFF1FAC8DFF1FAC8DFF1FB48DFF1FE0 +:10507400B48DFF1FBC8DFF1FBC8DFF1FC48DFF1F90 +:10508400C48DFF1FCC8DFF1FCC8DFF1FD48DFF1F40 +:10509400D48DFF1FDC8DFF1FDC8DFF1FE48DFF1FF0 +:1050A400E48DFF1FEC8DFF1FEC8DFF1FF48DFF1FA0 +:1050B400F48DFF1FFC8DFF1FFC8DFF1F048EFF1F4F +:1050C400048EFF1F0C8EFF1F0C8EFF1F148EFF1FFC +:1050D400148EFF1F1C8EFF1F1C8EFF1F248EFF1FAC +:1050E400248EFF1F2C8EFF1F2C8EFF1F348EFF1F5C +:1050F400348EFF1F3C8EFF1F3C8EFF1F448EFF1F0C +:10510400448EFF1F4C8EFF1F4C8EFF1F548EFF1FBB +:10511400548EFF1F5C8EFF1F5C8EFF1F648EFF1F6B +:10512400648EFF1F6C8EFF1F6C8EFF1F748EFF1F1B +:10513400748EFF1F7C8EFF1F7C8EFF1F848EFF1FCB +:10514400848EFF1F8C8EFF1F8C8EFF1F948EFF1F7B +:10515400948EFF1F9C8EFF1F9C8EFF1FA48EFF1F2B +:10516400A48EFF1FAC8EFF1FAC8EFF1FB48EFF1FDB +:10517400B48EFF1FBC8EFF1FBC8EFF1FC48EFF1F8B +:10518400C48EFF1FCC8EFF1FCC8EFF1FD48EFF1F3B +:10519400D48EFF1FDC8EFF1FDC8EFF1FE48EFF1FEB +:1051A400E48EFF1FEC8EFF1FEC8EFF1FF48EFF1F9B +:1051B400F48EFF1FFC8EFF1FFC8EFF1F048FFF1F4A +:1051C400048FFF1F0C8FFF1F0C8FFF1F148FFF1FF7 +:1051D400148FFF1F1C8FFF1F1C8FFF1F248FFF1FA7 +:1051E400248FFF1F2C8FFF1F2C8FFF1F348FFF1F57 +:1051F400348FFF1F3C8FFF1F3C8FFF1F448FFF1F07 +:10520400448FFF1F4C8FFF1F4C8FFF1F548FFF1FB6 +:10521400548FFF1F5C8FFF1F5C8FFF1F648FFF1F66 +:10522400648FFF1F6C8FFF1F6C8FFF1F748FFF1F16 +:10523400748FFF1F7C8FFF1F7C8FFF1F848FFF1FC6 +:10524400848FFF1F8C8FFF1F8C8FFF1F948FFF1F76 +:10525400948FFF1F9C8FFF1F9C8FFF1FA48FFF1F26 +:10526400A48FFF1FAC8FFF1FAC8FFF1FB48FFF1FD6 +:10527400B48FFF1FBC8FFF1FBC8FFF1FC48FFF1F86 +:10528400C48FFF1FCC8FFF1FCC8FFF1FD48FFF1F36 +:10529400D48FFF1FDC8FFF1FDC8FFF1FE48FFF1FE6 +:1052A400E48FFF1FEC8FFF1FEC8FFF1FF48FFF1F96 +:1052B400F48FFF1FFC8FFF1FFC8FFF1F0490FF1F45 +:1052C4000490FF1F0C90FF1F0C90FF1F1490FF1FF2 +:1052D4001490FF1F1C90FF1F1C90FF1F2490FF1FA2 +:1052E4002490FF1F2C90FF1F2C90FF1F3490FF1F52 +:0C52F4003490FF1F00000200FFFFFFFFCE +:00000001FF diff --git a/TestSHA256/.pio/build/Teensy_SHA/lib1ac/DFRobot_ID809/DFRobot_ID809.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/lib1ac/DFRobot_ID809/DFRobot_ID809.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..cf8818abf118d25a0a9f4cdfef2d69fbda73d867 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/lib1ac/DFRobot_ID809/DFRobot_ID809.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/lib1ac/libDFRobot_ID809.a b/TestSHA256/.pio/build/Teensy_SHA/lib1ac/libDFRobot_ID809.a new file mode 100644 index 0000000000000000000000000000000000000000..4462c797bcaca97cec6e3e3ca7722867bce58b17 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/lib1ac/libDFRobot_ID809.a differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/lib516/SHA256/sha256.c.o b/TestSHA256/.pio/build/Teensy_SHA/lib516/SHA256/sha256.c.o new file mode 100644 index 0000000000000000000000000000000000000000..81fcf553fca2795ad52a5cc186287069143aef9b Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/lib516/SHA256/sha256.c.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/lib516/libSHA256.a b/TestSHA256/.pio/build/Teensy_SHA/lib516/libSHA256.a new file mode 100644 index 0000000000000000000000000000000000000000..34ce9f99074f606cdcc5e3e6ebcfdfdc8d58c97e Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/lib516/libSHA256.a differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/lib537/DFRobot_ID809/DFRobot_ID809.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/lib537/DFRobot_ID809/DFRobot_ID809.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..cf8818abf118d25a0a9f4cdfef2d69fbda73d867 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/lib537/DFRobot_ID809/DFRobot_ID809.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/lib537/libDFRobot_ID809.a b/TestSHA256/.pio/build/Teensy_SHA/lib537/libDFRobot_ID809.a new file mode 100644 index 0000000000000000000000000000000000000000..6047b67b9fd81852567e15108f9ab25a44ce4182 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/lib537/libDFRobot_ID809.a differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/lib6bd/SHA256/sha256.c.o b/TestSHA256/.pio/build/Teensy_SHA/lib6bd/SHA256/sha256.c.o new file mode 100644 index 0000000000000000000000000000000000000000..81fcf553fca2795ad52a5cc186287069143aef9b Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/lib6bd/SHA256/sha256.c.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/lib6bd/libSHA256.a b/TestSHA256/.pio/build/Teensy_SHA/lib6bd/libSHA256.a new file mode 100644 index 0000000000000000000000000000000000000000..b519e684ce7aad6ec8ac45e1dec1d1451dfca5ef Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/lib6bd/libSHA256.a differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/libFrameworkArduino.a b/TestSHA256/.pio/build/Teensy_SHA/libFrameworkArduino.a new file mode 100644 index 0000000000000000000000000000000000000000..fb5701eab1ac7f2e05015bc644bcfde363dd935f Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/libFrameworkArduino.a differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/libbc6/Wire/Wire.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/libbc6/Wire/Wire.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..d9dde844fc7c415cdc2784f85d61592c9bf3db5e Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/libbc6/Wire/Wire.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/libbc6/Wire/WireIMXRT.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/libbc6/Wire/WireIMXRT.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..05f7e671ab2509eb84aad8106a2b1db3ef8f1b54 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/libbc6/Wire/WireIMXRT.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/libbc6/Wire/WireKinetis.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/libbc6/Wire/WireKinetis.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..8aa1a37f5f11f502d6032c47c3424a847e5ac809 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/libbc6/Wire/WireKinetis.cpp.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/libbc6/Wire/utility/twi.c.o b/TestSHA256/.pio/build/Teensy_SHA/libbc6/Wire/utility/twi.c.o new file mode 100644 index 0000000000000000000000000000000000000000..cfea50bad493ed0cc6ab88c0b77377156ffbd183 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/libbc6/Wire/utility/twi.c.o differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/libbc6/libWire.a b/TestSHA256/.pio/build/Teensy_SHA/libbc6/libWire.a new file mode 100644 index 0000000000000000000000000000000000000000..a3601ad29ab4216640e3cdd5ee2c03d59bdadcd1 Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/libbc6/libWire.a differ diff --git a/TestSHA256/.pio/build/Teensy_SHA/src/main.cpp.o b/TestSHA256/.pio/build/Teensy_SHA/src/main.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..407e6a091a3d0c831d5e22ae725616ccafc1761a Binary files /dev/null and b/TestSHA256/.pio/build/Teensy_SHA/src/main.cpp.o differ diff --git a/TestSHA256/.pio/build/project.checksum b/TestSHA256/.pio/build/project.checksum new file mode 100644 index 0000000000000000000000000000000000000000..5fa608328c0fb20306f4af671e92cd0200f417aa --- /dev/null +++ b/TestSHA256/.pio/build/project.checksum @@ -0,0 +1 @@ +d26dc5aa4cb3393323704e8f9a79fdf21acb95b1 \ No newline at end of file diff --git a/TestSHA256/.pio/libdeps/Teensy_SHA/DFRobot_ID809/.piopm b/TestSHA256/.pio/libdeps/Teensy_SHA/DFRobot_ID809/.piopm new file mode 100644 index 0000000000000000000000000000000000000000..6d0b735eeb694f439a37fd6d51d3dedb2babe9d2 --- /dev/null +++ b/TestSHA256/.pio/libdeps/Teensy_SHA/DFRobot_ID809/.piopm @@ -0,0 +1 @@ +{"type": "library", "name": "DFRobot_ID809", "version": "0.0.0+20220728181242", "spec": {"owner": null, "id": null, "name": "DFRobot_ID809", "requirements": null, "uri": "file://lib/DFRobot_ID809"}} \ No newline at end of file diff --git a/TestSHA256/.pio/libdeps/Teensy_SHA/DFRobot_ID809/DFRobot_ID809.cpp b/TestSHA256/.pio/libdeps/Teensy_SHA/DFRobot_ID809/DFRobot_ID809.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ddf2e9935312621665d8582d43f916b346e28214 --- /dev/null +++ b/TestSHA256/.pio/libdeps/Teensy_SHA/DFRobot_ID809/DFRobot_ID809.cpp @@ -0,0 +1,1089 @@ + +/*! + * @file DFRobot_ID809.cpp + * @brief Define the basic structure of DFRobot_ID809 class and the implementation of underlying methods + * @copyright Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com) + * @licence The MIT License (MIT) + * @author [Eddard](eddard.liu@dfrobot.com) + * @version V1.0 + * @date 2020-03-19 + * @get from https://www.dfrobot.com + * @url https://github.com/cdjq/DFRobot_ID809 + */ + +#include <DFRobot_ID809.h> +#include <Arduino.h> +#include <string.h> +#include <stdio.h> +Stream *dbg=NULL; + +DFRobot_ID809::DFRobot_ID809() + :s(NULL){ + +} + +DFRobot_ID809::~DFRobot_ID809(){ + +} + +bool DFRobot_ID809::begin(Stream &s_){ + s = &s_; + String str = getDeviceInfo(); + //Serial.println(str[str.length()-1]); + if(str[str.length()-1] == '4'){ + + FINGERPRINT_CAPACITY = 80 ; + + //Serial.println(str[str.length()-1]); + }else if(str[str.length()-1] == '3'){ + //Serial.println(str[str.length()-1]); + FINGERPRINT_CAPACITY = 200 ; + + } + + if(s == NULL){ + return false; + } + return true; +} + +bool DFRobot_ID809::isConnected(){ + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_TEST_CONNECTION, NULL, 0); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + if(ret == ERR_SUCCESS){ + return true; + }else{ + return false; + } +} + +uint8_t DFRobot_ID809::setDeviceID(uint8_t deviceID){ + uint8_t data[5] = {0}; //data:1bytes Parameter Type+4bytes Parameter Value + data[1] = deviceID; + uint8_t ret = setParam(data); + return ret; +} + +uint8_t DFRobot_ID809::setSecurityLevel(uint8_t securityLevel){ + uint8_t data[5] = {0}; + data[0] = 1; + data[1] = securityLevel; + uint8_t ret = setParam(data); + return ret; +} + +uint8_t DFRobot_ID809::setDuplicationCheck(uint8_t duplicationCheck){ + uint8_t data[5] = {0}; + data[0] = 2; + data[1] = duplicationCheck; + uint8_t ret = setParam(data); + return ret; +} + +uint8_t DFRobot_ID809::setBaudrate(eDeviceBaudrate_t baudrate){ + uint8_t data[5] = {0}; + data[0] = 3; + data[1] = baudrate; + uint8_t ret = setParam(data); + return ret; +} + +uint8_t DFRobot_ID809::setSelfLearn(uint8_t selfLearn){ + uint8_t data[5] = {0}; + data[0] = 4; + data[1] = selfLearn; + uint8_t ret = setParam(data); + return ret; +} + +uint8_t DFRobot_ID809::getDeviceID(){ + uint8_t data[1]; //data:1byte Parameter Type + data[0] = 0; + uint8_t ret = getParam(data); + return ret; +} + +uint8_t DFRobot_ID809::getSecurityLevel(){ + uint8_t data[1]; + data[0] = 1; + uint8_t ret = getParam(data); + return ret; +} + +uint8_t DFRobot_ID809::getDuplicationCheck(){ + uint8_t data[1]; + data[0] = 2; + uint8_t ret = getParam(data); + return ret; +} + +uint8_t DFRobot_ID809::getBaudrate(){ + uint8_t data[1]; + data[0] = 3; + uint8_t ret = getParam(data); + return ret; +} + +uint8_t DFRobot_ID809::getSelfLearn(){ + uint8_t data[1]; + data[0] = 4; + uint8_t ret = getParam(data); + return ret; +} + +String DFRobot_ID809::getDeviceInfo(){ + char *data; + uint8_t result; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_DEVICE_INFO, NULL, 0); + sendPacket(header); + free(header); + result = responsePayload(buf); + LDBG("result=");LDBG(result); + if(result != ERR_SUCCESS){ + return ""; + } + uint16_t dataLen = buf[0]+(buf[1]<<8)+1; + if((data = (char *)malloc(dataLen)) == NULL){ + LDBG("no memory!!!\r\n"); + while(1); + } + data[dataLen] = 0; + result = responsePayload(data); + LDBG("result=");LDBG(result); + String ret = String(data); + free(data); + return ret; +} + +uint8_t DFRobot_ID809::setModuleSN(const char* SN){ + char data[2]; + data[0] = MODULE_SN_SIZE; + if(strlen(SN) > MODULE_SN_SIZE){ + LDBG("The serial number exceeds 15 characters"); + return ERR_ID809; + } + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_SET_MODULE_SN, data, 2); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + if(ret != ERR_SUCCESS){ + return ERR_ID809; + } + header = pack(DATA_TYPE, CMD_SET_MODULE_SN, SN, MODULE_SN_SIZE); + sendPacket(header); + free(header); + ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + if(ret == ERR_SUCCESS){ + ret = buf[0]; + } + return ret; +} + +uint8_t DFRobot_ID809::getTemplate(uint16_t id,uint8_t * temp){ + char data[4]; + data[0] = id; + data[1] = 0; + data[2] = 0; + data[3] = 0; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_LOAD_CHAR, data, 4); + sendPacket(header); + free(header); + + uint8_t ret = responsePayload(buf); + LDBG("ret="); + LDBG(ret); + if(ret != ERR_SUCCESS) { + return ERR_ID809; + } + data[0] = 0; + data[1] = 0; + header = pack(CMD_TYPE, CMD_UP_CHAR, data, 2); + sendPacket(header); + free(header); + + ret = responsePayload(buf); + LDBG("ret="); + LDBG(ret); + if(ret == ERR_SUCCESS) { + ret = buf[0]; + } + ret = responsePayload(temp); + + return ret; +} + +uint8_t DFRobot_ID809::downLoadTemplate(uint16_t id,uint8_t * temp){ + + char data[4]; + data[0] = 0xf2; + data[1] = 3; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_DOWN_CHAR, data, 2); + sendPacket(header); + free(header); + + uint8_t ret = responsePayload(buf); + LDBG("ret="); + LDBG(ret); + if(ret != ERR_SUCCESS) { + return ERR_ID809; + } + char *tempData= (char *)malloc(0x3f2 +1); + tempData[0] = 0; + tempData[1] = 0; + memcpy(tempData+2,temp,0x3f0); + + + header = pack(DATA_TYPE, CMD_DOWN_CHAR, tempData, 0x3f2); + + sendPacket(header); + + free(header); + + ret = responsePayload(buf); + LDBG("ret="); + LDBG(ret); + if(ret == ERR_SUCCESS) { + ret = buf[0]; + } + free(tempData); + + + return store(id); +} + +uint8_t DFRobot_ID809::contrastTemplate(uint8_t *temp){ + + char data[4]; + data[0] = 0xf2; + data[1] = 3; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_DOWN_CHAR, data, 2); + sendPacket(header); + free(header); + + uint8_t ret = responsePayload(buf); + LDBG("ret="); + LDBG(ret); + if(ret != ERR_SUCCESS) { + return ERR_ID809; + } + char *tempData= (char *)malloc(0x3f2 +1); + tempData[0] = 2; + tempData[1] = 0; + memcpy(tempData+2,temp,0x3f0); + + + header = pack(DATA_TYPE, CMD_DOWN_CHAR, tempData, 0x3f2); + + sendPacket(header); + + free(header); + + ret = responsePayload(buf); + LDBG("ret="); + LDBG(ret); + if(ret == ERR_SUCCESS) { + ret = buf[0]; + } + free(tempData); + data[0] = 0; + data[1] = 0; + data[2] = 2; + data[3] = 0; + header = pack(CMD_TYPE, CMD_MATCH, data, 4); + sendPacket(header); + free(header); + + ret = responsePayload(buf); + LDBG("ret="); + LDBG(ret); + if(ret != ERR_SUCCESS) { + return ret; + } + return ret; + +} +uint8_t DFRobot_ID809::getFingerImage(uint8_t *image) +{ + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_GET_IMAGE, NULL, 0); + sendPacket(header); + free(header); + + uint8_t ret = responsePayload(buf); + LDBG("ret="); + LDBG(ret); + if(ret != ERR_SUCCESS) { + return ERR_ID809; + } + + char data[1]; + data[0] = 0; + header = pack(CMD_TYPE, CMD_UP_IMAGE_CODE, data, 1); + sendPacket(header); + free(header); + + ret = responsePayload(buf); + LDBG("ret="); + LDBG(ret); + if(ret != ERR_SUCCESS) { + return ERR_ID809; + } + char *tempData= (char *)malloc(500 +1); + for(uint8_t i=0;i<52;i++){ + + ret = responsePayload(tempData); + if(i == 51) + memcpy(image+i*496,tempData+2,304); + else + memcpy(image+i*496,tempData+2,496); + } + free(tempData); +} +uint8_t DFRobot_ID809::getQuarterFingerImage(uint8_t *image){ + + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_GET_IMAGE, NULL, 0); + sendPacket(header); + free(header); + + uint8_t ret = responsePayload(buf); + LDBG("ret="); + LDBG(ret); + if(ret != ERR_SUCCESS) { + return ERR_ID809; + } + + char data[1]; + data[0] = 1; + header = pack(CMD_TYPE, CMD_UP_IMAGE_CODE, data, 1); + sendPacket(header); + free(header); + + ret = responsePayload(buf); + LDBG("ret="); + LDBG(ret); + if(ret != ERR_SUCCESS) { + return ERR_ID809; + } + char *tempData= (char *)malloc(500 +1); + for(uint8_t i=0;i<13;i++){ + + ret = responsePayload(tempData); + if(i == 12) + memcpy(image+i*496,tempData+2,448); + else + memcpy(image+i*496,tempData+2,496); + } + free(tempData); + +} +uint8_t DFRobot_ID809::downLoadImage(uint16_t id,uint8_t * temp) +{ + char data[4]; + data[0] = 0xa0; + data[1] = 0; + data[2] = 0xa0; + data[3] = 0; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_DOWN_IMAGE, data, 4); + sendPacket(header); + free(header); + + uint8_t ret = responsePayload(buf); + LDBG("ret="); + LDBG(ret); + if(ret != ERR_SUCCESS) { + return ERR_ID809; + } + char *tempData= (char *)malloc(500); + for(uint8_t i =0 ;i<52;i++){ + tempData[0] = i; + tempData[1] = 0; + if(i == 51){ + memcpy(tempData+2,temp+i*496,304); + header = pack(DATA_TYPE, CMD_DOWN_IMAGE, tempData, 306); + }else{ + memcpy(tempData+2,temp+i*496,496); + header = pack(DATA_TYPE, CMD_DOWN_IMAGE, tempData, 498); + } + sendPacket(header); + + free(header); + + ret = responsePayload(buf); + LDBG("ret="); + LDBG(ret); + if(ret != ERR_SUCCESS) { + return ERR_ID809; + } + + } + free(tempData); + + data[0] = 0; + data[1] = 0; + header = pack(CMD_TYPE, CMD_GENERATE, data, 2); + sendPacket(header); + free(header); + + ret = responsePayload(buf); + LDBG("ret="); + LDBG(ret); + if(ret != ERR_SUCCESS) { + // return ERR_ID809; + } + return store(id); + +} + +uint8_t DFRobot_ID809::receiveImageData(uint8_t * image){ + + + + uint8_t ret = responsePayload(image); + if(ret != ERR_SUCCESS) { + return ERR_ID809; + } + +} +String DFRobot_ID809::getModuleSN(){ + char *data; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_GET_MODULE_SN, NULL, 0); + sendPacket(header); + free(header); + uint8_t result = responsePayload(buf); + LDBG("result=");LDBG(result); + if(result != ERR_SUCCESS){ + return ""; + } + uint16_t dataLen = buf[0]+(buf[1]<<8)+1; + if((data = (char *)malloc(dataLen)) == NULL){ + LDBG("no memory!!!\r\n"); + while(1); + } + data[dataLen] = 0; + result = responsePayload(data); + LDBG("result=");LDBG(result); + String ret = String(data); + free(data); + return ret; +} + +uint8_t DFRobot_ID809::ctrlLED(eLEDMode_t mode,eLEDColor_t color,uint8_t blinkCount){ + char data[4] = {0}; + if(FINGERPRINT_CAPACITY == 80){ + data[0] = mode; + data[2] = data[1] = color; + data[3] = blinkCount; + }else{ + if(mode == 1){ + data[0] = 2; + } else if(mode == 2){ + data[0] = 4; + } else if(mode == 3){ + data[0] = 1; + } else if(mode == 4){ + data[0] = 0; + } else if(mode == 5){ + data[0] = 3; + } + if(color == eLEDGreen){ + data[2] = data[1] = 0x84; + }else if(color == eLEDRed){ + data[2] = data[1] = 0x82; + }else if(color == eLEDYellow){ + data[2] = data[1] = 0x86; + }else if(color == eLEDBlue){ + data[2] = data[1] = 0x81; + }else if(color == eLEDCyan){ + data[2] = data[1] = 0x85; + }else if(color == eLEDMagenta){ + data[2] = data[1] = 0x83; + }else { + data[2] = data[1] = 0x87; + } + } + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_SLED_CTRL, data, 4); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + return ret; +} + +uint8_t DFRobot_ID809::detectFinger(){ + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_FINGER_DETECT, NULL, 0); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + if(ret == ERR_SUCCESS){ + ret = buf[0]; + } + return ret; +} + +uint8_t DFRobot_ID809::getEmptyID(){ + char data[4] = {0}; + data[0] = 1; + data[2] = FINGERPRINT_CAPACITY; //80 fingerprints at most, default to full range + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_GET_EMPTY_ID, data, 4); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + if(ret == ERR_SUCCESS){ + ret = buf[0]; + } + return ret; +} + +uint8_t DFRobot_ID809::getStatusID(uint8_t ID){ + char data[2] = {0}; + data[0] = ID; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_GET_STATUS, data, 2); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + if(ret == ERR_SUCCESS){ + ret = buf[0]; + } + return ret; +} + +uint8_t DFRobot_ID809::getEnrollCount(){ + char data[4] = {0}; + data[0] = 1; + data[2] = FINGERPRINT_CAPACITY; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_GET_ENROLL_COUNT, data, 4); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + if(ret == ERR_SUCCESS){ + ret = buf[0]; + } + return ret; +} + +#define getID(A, V) (A[0 + V/8] & (0x01 << (V & 0x07))) +uint8_t DFRobot_ID809::getEnrolledIDList(uint8_t* list) +{ + char *data; + uint8_t i = 0; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_GET_ENROLLED_ID_LIST, NULL, 0); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + uint16_t dataLen = buf[0]+(buf[1]<<8); + if((data = (char *)malloc(dataLen)) == NULL){ + LDBG("no memory!!!\r\n"); + while(1); + } + ret = responsePayload(data); + LDBG("ret=");LDBG(ret); + if(ret != ERR_SUCCESS){ + ret = ERR_ID809; + }else{ + for(uint16_t j = 0; j < (dataLen*8); j++){ + if(getID(data, j) != 0){ + list[i] = j; + i++; + } + } + } + free(data); + return ret; +} + +uint8_t DFRobot_ID809::storeFingerprint(uint8_t ID){ + char data[4] = {0}; + uint8_t ret; + ret = merge(); + LDBG("ret=");LDBG(ret); + if(ret != ERR_SUCCESS){ + return ERR_ID809; + } + _number = 0; + data[0] = ID; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_STORE_CHAR, data, 4); + sendPacket(header); + free(header); + ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + return ret; + +} +uint8_t DFRobot_ID809::store(uint8_t ID){ + + + char data[4] = {0}; + uint8_t ret; + LDBG("ret="); + LDBG(ret); + data[0] = ID; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_STORE_CHAR, data, 4); + sendPacket(header); + free(header); + ret = responsePayload(buf); + LDBG("ret="); + LDBG(ret); + return ret; +} +uint8_t DFRobot_ID809::delFingerprint(uint8_t ID) +{ + char data[4] = {0}; + if(ID == DELALL) { + data[0] = 1; + data[2] = FINGERPRINT_CAPACITY; + } else { + data[0] = data[2] = ID; + } + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_DEL_CHAR, data, 4); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret="); + LDBG(ret); + return ret; +} + +uint8_t DFRobot_ID809::search(){ + if(_state == 1){ + char data[6] = {0}; + data[2] = 1; + data[4] = FINGERPRINT_CAPACITY; + _number = 0; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_SEARCH, data, 6); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + if(ret == ERR_SUCCESS){ + ret = buf[0]; + }else{ + ret = 0; + } + return ret; + } + return 0; +} + +uint8_t DFRobot_ID809::verify(uint8_t ID){ + if(_state == 1){ + char data[4] = {0}; + data[0] = ID; + _number = 0; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_VERIFY, data, 4); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + if(ret == ERR_SUCCESS){ + ret = buf[0]; + }else{ + ret = 0; + } + return ret; + } + return 0; +} + +uint8_t DFRobot_ID809::match(uint8_t RamBufferID0, uint8_t RamBufferID1){ + char data[4] = {0}; + data[0] = RamBufferID0; + data[2] = RamBufferID1; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_MATCH, data, 4); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + if(ret == ERR_SUCCESS){ + ret = buf[0]; + }else{ + ret = 0; + } + return ret; +} + +uint8_t DFRobot_ID809::getBrokenQuantity(){ + char data[4] = {0}; + data[0] = 1; + data[2] = FINGERPRINT_CAPACITY; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_GET_BROKEN_ID, data, 4); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + if(ret == ERR_SUCCESS){ + ret = buf[0]; + } + return ret; +} + +uint8_t DFRobot_ID809::getBrokenID(){ + char data[4] = {0}; + data[0] = 1; + data[2] = FINGERPRINT_CAPACITY; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_GET_BROKEN_ID, data, 4); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + if(ret == ERR_SUCCESS){ + ret = buf[2]; + } + return ret; +} + +uint8_t DFRobot_ID809::loadFingerprint(uint8_t ID, uint8_t RamBufferID){ + char data[4] = {0}; + data[0] = ID; + data[2] = RamBufferID; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_LOAD_CHAR, data, 4); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + return ret; +} + +uint8_t DFRobot_ID809::enterStandbyState(){ + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_ENTER_STANDBY_STATE, NULL, 0); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + return ret; +} + +uint8_t DFRobot_ID809::setParam(uint8_t* data){ + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_SET_PARAM, (const char *)data, 5); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + return ret; +} + +uint8_t DFRobot_ID809::getParam(uint8_t* data){ + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_GET_PARAM, (const char *)data, 1); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + if(ret == ERR_SUCCESS){ + ret = buf[0]; + } + return ret; +} + +uint8_t DFRobot_ID809::getImage(){ + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_GET_IMAGE, NULL, 0); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + return ret; +} + +uint8_t DFRobot_ID809::collectionFingerprint(uint16_t timeout,int ramNumber){ //Collect fingerprint + uint16_t i = 0; + uint8_t ret; + if(ramNumber == -1){ + if(_number > 2){ + _error = eErrorGatherOut; + LDBG("Exceed upper limit of acquisition times "); + return ERR_ID809; + } + } + while(!detectFinger()){ + if(timeout != 0){ + delay(10); + if(++i > timeout*10){ + _error = eErrorTimeOut; + LDBG("Acquisition timeout "); + LDBG("ret=");LDBG(ret); + _state = 0; + return ERR_ID809; + } + } + } + ret = getImage(); + LDBG("ret=");LDBG(ret); + if(ret != ERR_SUCCESS){ + _state = 0; + return ERR_ID809; + } + if(ramNumber != -1){ + ret = generate(ramNumber); + } else{ + ret = generate(_number); + } + LDBG("ret=");LDBG(ret); + if(ret != ERR_SUCCESS){ + _state = 0; + return ERR_ID809; + } + _number++; + _state = 1; + return ret; +} + +uint8_t DFRobot_ID809::generate(uint8_t RamBufferID){ + char data[2] = {0}; + data[0] = RamBufferID; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_GENERATE, (const char *)data, 2); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + return ret; +} + +uint8_t DFRobot_ID809::merge(){ + char data[3] = {0}; + data[2] = _number; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_MERGE, data, 3); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + return ret; +} + +pCmdPacketHeader_t DFRobot_ID809::pack(uint8_t type, uint16_t cmd, const char *payload, uint16_t len){ + pCmdPacketHeader_t header; + uint16_t cks=0; + uint16_t dataLen; + if(type == CMD_TYPE){ //Structure of command packet, fixed 26 bytes:10(frame header)+14(data)+2(CKS) + if((header = (pCmdPacketHeader_t)malloc(sizeof(sCmdPacketHeader_t)+16+2)) == NULL){ + return NULL; + } + header->PREFIX = CMD_PREFIX_CODE; + for(int i=0;i<16;i++){ + header->payload[i] = 0; + } + dataLen = 16; //Length of data to be replicated + }else{ //Structure of command data packet, unfixed length:10(frame header)+LEN(data)+2(CKS) + if((header = (pCmdPacketHeader_t)malloc(sizeof(sCmdPacketHeader_t)+len+2)) == NULL){ + return NULL; + } + header->PREFIX = CMD_DATA_PREFIX_CODE; + dataLen = len; //Length of data to be replicated + } + header->SID = 0; + header->DID = 0; + header->CMD = cmd; + header->LEN = len; + if(len){ + memcpy(header->payload, payload, len); + } + cks = getCmdCKS(header); + memcpy(&header->payload[dataLen],&cks,2); + _PacketSize = sizeof(sCmdPacketHeader_t) + dataLen +2; + return header; +} + + +void DFRobot_ID809::sendPacket(pCmdPacketHeader_t header){ + s->write((uint8_t *)header,_PacketSize); +} + +uint8_t DFRobot_ID809::responsePayload(void* buf){ + sRcmPacketHeader_t header; + uint16_t dataLen,dataCount,cks; + uint8_t ch,ret; + int16_t type; + type = readPrefix(&header); + if(type == 1){ + LDBG("--recv timeout---"); + _error = eErrorRecvTimeout; + return ERR_ID809; + } + pRcmPacketHeader_t packet; + if(type == RCM_TYPE){ //Structure of response packet, fixed 26 bytes: 10(frame header)+14(data)+2(CKS) + packet = (pRcmPacketHeader_t)malloc(sizeof(sRcmPacketHeader_t)+14+2); + dataLen = 14+2; //Length of data+CKS + if(packet == NULL){ + LDBG(""); + while(1); + } + }else{ //Structure of response data packet, unfixed length: 10(frame header)+(LEN-2)(data)+2(CKS) + packet = (pRcmPacketHeader_t)malloc(sizeof(sRcmPacketHeader_t)+header.LEN); + dataLen = header.LEN; //Length of data+CKS + if(packet == NULL){ + LDBG(""); + while(1); + } + } + memcpy(packet, &header, 10); + dataCount = readN(packet->payload, dataLen); + cks = packet->payload[dataLen-2]+(packet->payload[dataLen-1]<<8); + ret = (header.RET&0xFF); + _error = (eError_t)ret; + if(ret != ERR_SUCCESS){ + ret = ERR_ID809; + }else if(dataLen != dataCount){ + LDBG("--recvRspPacket length error---"); + _error = eErrorRecvLength; + ret = ERR_ID809; + }else if(getRcmCKS(packet) != cks){ + LDBG("--recvRspPacket cks error---"); + _error = eErrorRecvCks; + ret = ERR_ID809; + }else{ + LDBG("--recvRspPacket OK---"); + memcpy(buf, packet->payload, dataLen); + } + free(packet); + packet = NULL; + return ret; +} + +uint16_t DFRobot_ID809::readPrefix( pRcmPacketHeader_t header ){ + uint8_t ch,ret; + typedef enum{ + RECV_HEADER_INIT, + RECV_HEADER_AA, + RECV_HEADER_A5, + RECV_HEADER_OK + }eRecvHeaderState; + eRecvHeaderState state = RECV_HEADER_INIT; + while(state != RECV_HEADER_OK){ //Can judge the received command packet and command data packet prefix at the same time + if(readN(&ch, 1) != 1){ + ret = 1; + return ret; + } + if((ch == 0xAA) && (state == RECV_HEADER_INIT)){ + state = RECV_HEADER_AA; + continue; + }else if((ch == 0xA5) && (state == RECV_HEADER_INIT)){ + state = RECV_HEADER_A5; + continue; + }else if((ch == 0x55) && (state == RECV_HEADER_AA)){ + state = RECV_HEADER_OK; + ret = RCM_TYPE; + continue; + }else if((ch == 0x5A) && (state == RECV_HEADER_A5)){ + state = RECV_HEADER_OK; + ret = DATA_TYPE; + continue; + }else{ + state = RECV_HEADER_INIT; + if(ch == 0xAA){ + state = RECV_HEADER_AA; + }else if(ch == 0xA5){ + state = RECV_HEADER_A5; + } + } + } + if(ret == RCM_TYPE){ + header->PREFIX = RCM_PREFIX_CODE; + }else if(ret == DATA_TYPE){ + header->PREFIX = RCM_DATA_PREFIX_CODE; + } + readN(&header->SID, 1); + readN(&header->DID, 1); + readN(&header->RCM, 2); + readN(&header->LEN, 2); + readN(&header->RET, 2); + return ret; +} + +size_t DFRobot_ID809::readN(void* buffer, size_t len){ + size_t offset = 0,left = len; + uint8_t *buf = (uint8_t*)buffer; + long long curr = millis(); + while(left){ + if(s->available()){ + buf[offset++] = s->read(); + left--; + } + if(millis() - curr > 5000){ + LDBG("----------!!!!!!!!!recv timeout----------"); + break; + } + } + return offset; +} + +uint16_t DFRobot_ID809::getCmdCKS(pCmdPacketHeader_t packet){ + uint16_t cks = 0xFF; + cks += packet->SID; + cks += packet->DID; + cks += packet->CMD&0xFF; + cks += packet->CMD>>8; + cks += packet->LEN&0xFF; + cks += packet->LEN>>8; + if(packet->LEN > 0){ + uint8_t *p = packet->payload; + for(uint16_t i = 0; i < packet->LEN; i++){ + cks += p[i]; + } + } + return cks&0xFFFF; +} + +uint16_t DFRobot_ID809::getRcmCKS(pRcmPacketHeader_t packet){ + uint16_t cks = 0xFF; + cks += packet->SID; + cks += packet->DID; + cks += packet->RCM&0xFF; + cks += packet->RCM>>8; + cks += packet->LEN&0xFF; + cks += packet->LEN>>8; + cks += packet->RET&0xFF; + cks += packet->RET>>8; + if(packet->LEN > 0){ + uint8_t *p = packet->payload; + for(uint16_t i = 0; i < packet->LEN-2; i++){ + cks += p[i]; + } + } + return cks&0xFFFF; +} + +const DFRobot_ID809::sErrorDescription_t DFRobot_ID809::errorDescriptionsTable[]={ + {eErrorSuccess, "Command processed successfully"}, + {eErrorFail, "Command processing failed"}, + {eErrorVerify, "1:1 comparison failed"}, + {eErrorIdentify, "Comparison with all fingerprints failed"}, + {eErrorTmplEmpty, "No fingerprint in designated ID"}, + {eErrorTmplNotEmpty, "Designated ID has fingerprint"}, + {eErrorAllTmplEmpty, "Module unregistered fingerprint"}, + {eErrorEmptyIDNoexist, "No registerable ID here"}, + {eErrorBrokenIDNoexist, "No broken fingerprint"}, + {eErrorInvalidTmplData, "Invalid desingated fingerprint data"}, + {eErrorDuplicationID, "The fingerprint has been registered"}, + {eErrorBadQuality, "Poor quality fingerprint image"}, + {eErrorMergeFail, "Fingerprint synthesis failed"}, + {eErrorNotAuthorized, "Communication password not authorized"}, + {eErrorMemory, "External Flash burning error"}, + {eErrorInvalidTmplNo, "Invalid designated ID"}, + {eErrorInvalidParam, "Incorrect parameter"}, + {eErrorTimeOut, "Acquisition timeout"}, + {eErrorGenCount, "Invalid number of fingerprint synthesis"}, + {eErrorInvalidBufferID, "Incorrect Buffer ID value"}, + {eErrorFPNotDetected, "No fingerprint input into fingerprint reader"}, + {eErrorFPCancel, "Command cancelled"}, + {eErrorRecvLength, "Wrong data length"}, + {eErrorRecvCks, "Wrong data check code"}, + {eErrorGatherOut, "Exceed upper limit of acquisition times"}, + {eErrorRecvTimeout,"Data reading timeout"} +}; + +String DFRobot_ID809::getErrorDescription() +{ + for(int i=0;i<sizeof(errorDescriptionsTable)/sizeof(errorDescriptionsTable[0]);i++){ + if(_error == errorDescriptionsTable[i].error){ + return errorDescriptionsTable[i].description; + } + } + return ""; +} + diff --git a/TestSHA256/.pio/libdeps/Teensy_SHA/DFRobot_ID809/DFRobot_ID809.h b/TestSHA256/.pio/libdeps/Teensy_SHA/DFRobot_ID809/DFRobot_ID809.h new file mode 100644 index 0000000000000000000000000000000000000000..acb9dfd66edb49c51ecfd9f75a989064d60c5168 --- /dev/null +++ b/TestSHA256/.pio/libdeps/Teensy_SHA/DFRobot_ID809/DFRobot_ID809.h @@ -0,0 +1,504 @@ + +/*! + * @file DFRobot_ID809.h + * @brief Define basic structure of DFRobot_ID809 class + * @n This is an library for capacitive fingerprint module + * @n Main functions: fingerprint image capturing, fingerprint comparison, fingerprint deletion + * @copyright Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com) + * @licence The MIT License (MIT) + * @author [Eddard](eddard.liu@dfrobot.com) + * @version V1.0 + * @date 2020-03-19 + * @get from https://www.dfrobot.com + * @url https://github.com/cdjq/DFRobot_ID809 + */ + +#ifndef _DFRobot_ID809_H +#define _DFRobot_ID809_H + +#if ARDUINO >= 100 +#include "Arduino.h" +#else +#include "WProgram.h" +#endif +#include <Wire.h> + +#include <stdint.h> + +//Open this macro to see the detailed running process of the program + +//#define ENABLE_DBG +#ifdef ENABLE_DBG +#define LDBG(...) if(dbg) {dbg->print("["); dbg->print(__FUNCTION__); dbg->print("(): "); dbg->print(__LINE__); dbg->print(" ] "); dbg->println(__VA_ARGS__);} +#else +#define LDBG(...) +#endif + +extern Stream *dbg; + + /* + Frame struct of command packet + */ +typedef struct{ + uint16_t PREFIX; + uint8_t SID; + uint8_t DID; + uint16_t CMD; + uint16_t LEN; + uint8_t payload[0]; +}__attribute__ ((packed)) sCmdPacketHeader_t, *pCmdPacketHeader_t; + + /* + Frame struct of response packet + */ +typedef struct{ + uint16_t PREFIX; + uint8_t SID; + uint8_t DID; + uint16_t RCM; + uint16_t LEN; + uint16_t RET; + uint8_t payload[0]; +}__attribute__ ((packed)) sRcmPacketHeader_t, *pRcmPacketHeader_t; + + + + +class DFRobot_ID809{ +public: + +//#define FINGERPRINT_CAPACITY 80 //Fingerprint module capacity +#define MODULE_SN_SIZE 16 //Module SN length + + +#define DELALL 0xFF //Delete all fingerprints + +#define CMD_PREFIX_CODE 0xAA55 //Command packet prefix code +#define RCM_PREFIX_CODE 0x55AA //Response packet prefix code +#define CMD_DATA_PREFIX_CODE 0xA55A //Command data packet prefix code +#define RCM_DATA_PREFIX_CODE 0x5AA5 //Response data packet prefix code + +#define CMD_TYPE 0xF0 //Command packet type +#define RCM_TYPE 0xF0 //Response packet type +#define DATA_TYPE 0x0F //Data packet type + +#define CMD_TEST_CONNECTION 0X0001 //Test connection +#define CMD_SET_PARAM 0X0002 //Set parameter +#define CMD_GET_PARAM 0X0003 //Read parameter +#define CMD_DEVICE_INFO 0X0004 //Read device information +#define CMD_SET_MODULE_SN 0X0008 //Set module serial number +#define CMD_GET_MODULE_SN 0X0009 //Read module serial number +#define CMD_ENTER_STANDBY_STATE 0X000C //Enter sleep mode +#define CMD_GET_IMAGE 0X0020 //Capture fingerprint image +#define CMD_FINGER_DETECT 0X0021 //Detect fingerprint + #define CMD_UP_IMAGE_CODE 0X0022 //Upload fingerprint image to host + #define CMD_DOWN_IMAGE 0X0023 //Download fingerprint image to module +#define CMD_SLED_CTRL 0X0024 //Control collector backlight +#define CMD_STORE_CHAR 0X0040 //Save fingerprint template data into fingerprint library +#define CMD_LOAD_CHAR 0X0041 //Read fingerprint in module and save it in RAMBUFFER temporarily + #define CMD_UP_CHAR 0X0042 //Upload the fingerprint template saved in RAMBUFFER to host + #define CMD_DOWN_CHAR 0X0043 //Download fingerprint template to module designated RAMBUFFER +#define CMD_DEL_CHAR 0X0044 //Delete fingerprint in specific ID range +#define CMD_GET_EMPTY_ID 0X0045 //Get the first registerable ID in specific ID range +#define CMD_GET_STATUS 0X0046 //Check if the designated ID has been registered +#define CMD_GET_BROKEN_ID 0X0047 //Check whether there is damaged data in fingerprint library of specific range +#define CMD_GET_ENROLL_COUNT 0X0048 //Get the number of registered fingerprints in specific ID range +#define CMD_GET_ENROLLED_ID_LIST 0X0049 //Get registered ID list +#define CMD_GENERATE 0X0060 //Generate template from the fingerprint images saved in IMAGEBUFFER temporarily +#define CMD_MERGE 0X0061 //Synthesize fingerprint template data +#define CMD_MATCH 0X0062 //Compare templates in 2 designated RAMBUFFER +#define CMD_SEARCH 0X0063 //1:N Recognition in specific ID range +#define CMD_VERIFY 0X0064 //Compare specific RAMBUFFER template with specific ID template in fingerprint library + +#define ERR_SUCCESS 0x00 //Command processed successfully +#define ERR_ID809 0xFF //error + + +public: + + typedef enum{ + eBreathing = 1, //Breathing + eFastBlink, //Quick blink + eKeepsOn, //On + eNormalClose, //Off + eFadeIn, //Fade in + eFadeOut, //Fade out + eSlowBlink //Slow blink + }eLEDMode_t; + + typedef enum{ + eLEDGreen = 1, //green + eLEDRed, //red + eLEDYellow, //yellow + eLEDBlue, //blue + eLEDCyan, //cyan + eLEDMagenta, //magenta + eLEDWhite //white + }eLEDColor_t; + + typedef enum{ + e9600bps = 1, + e19200bps, + e38400bps, + e57600bps, + e115200bps + }eDeviceBaudrate_t; + + typedef enum{ + eErrorSuccess = 0x00, //Command processed successfully + eErrorFail = 0x01, //Command processing failed + eErrorVerify = 0x10, //1:1 Templates comparison in specific ID failed + eErrorIdentify = 0x11, //1:N comparison has been made, no same templates here + eErrorTmplEmpty = 0x12, //No registered template in the designated ID + eErrorTmplNotEmpty = 0x13, //Template already exists in the specified ID + eErrorAllTmplEmpty = 0x14, //No registered Template + eErrorEmptyIDNoexist = 0x15, //No registerable Template ID + eErrorBrokenIDNoexist = 0x16, //No damaged Template + eErrorInvalidTmplData = 0x17, //The designated Template Data is invalid + eErrorDuplicationID = 0x18, //The fingerprint has been registered + eErrorBadQuality = 0x19, //Poor quality fingerprint image + eErrorMergeFail = 0x1A, //Template synthesis failed + eErrorNotAuthorized = 0x1B, //Communication password not authorized + eErrorMemory = 0x1C, //Error in exernal Flash burning + eErrorInvalidTmplNo = 0x1D, //The designated template ID is invalid + eErrorInvalidParam = 0x22, //Incorrect parameter has been used + eErrorTimeOut = 0x23, //Acquisition timeout + eErrorGenCount = 0x25, //Invalid number of fingerprint synthesis + eErrorInvalidBufferID = 0x26, //Wrong Buffer ID value + eErrorFPNotDetected = 0x28, //No fingerprint input into fingerprint reader + eErrorFPCancel = 0x41, //Command cancelled + eErrorRecvLength = 0x42, //Wrong length of recieved data + eErrorRecvCks = 0x43, //Wrong check code + eErrorGatherOut = 0x45, //Exceed upper limit of acquisition times + eErrorRecvTimeout = 0x46 //Communication timeout + }eError_t; + + typedef struct{ + /**< Gesture enumeration variable X */ + eError_t error; + /**< Description about the gesture enumeration variable X */ + const char * description; + }sErrorDescription_t; + +public: + DFRobot_ID809(); + ~DFRobot_ID809(); + + /** + * @brief Init communication port + * @param Software serial or hardware serial + * @return true or false + */ + bool begin(Stream &s_); + + /** + * @brief Test whether the module connection is ok + * @return true or false + */ + bool isConnected(); + + /** + * @brief Set module ID + * @param ID:1-255 + * @return 0(succeed) or ERR_ID809 + */ + uint8_t setDeviceID(uint8_t deviceID); + + /** + * @brief Set module security level + * @param security level:1-5 + * @return 0(succeed) or ERR_ID809 + */ + uint8_t setSecurityLevel(uint8_t securityLevel); + + /** + * @brief Set module fingerprint replication check (Check whether the fingperint has been registered when saving it) + * @param 1(ON) or 0(OFF) + * @return 0(succeed) or ERR_ID809 + */ + uint8_t setDuplicationCheck(uint8_t duplicationCheck); + + /** + * @brief Set module baud rate + * @param Baudrate:in typedef enum eDeviceBaudrate_t + * @return 0(succeed) or ERR_ID809 + */ + uint8_t setBaudrate(eDeviceBaudrate_t baudrate); + + /** + * @brief Set module self-learning function (Update fingeprint when fingerprint comparison succeeds) + * @param 1(ON) or 0(OFF) + * @return 0(succeed) or ERR_ID809 + */ + uint8_t setSelfLearn(uint8_t selfLearn); + + /** + * @brief Read module ID + * @return IDå·:1-255 or ERR_ID809 + */ + uint8_t getDeviceID(); + + /** + * @brief Read module security level + * @return Security level:1-5 or ERR_ID809 + */ + uint8_t getSecurityLevel(); + + /** + * @brief Read module fingerprint replication check status + * @return Status:1(ON), 0(OFF) or ERR_ID809 + */ + uint8_t getDuplicationCheck(); + + /** + * @brief Read module baud rate + * @return Baudrate:in typedef enum eDEVICE_BAUDRATE_t or ERR_ID809 + */ + uint8_t getBaudrate(); + + /** + * @brief Read module self-learning function status + * @return Status:1(ON), 0(OFF) or ERR_ID809 + */ + uint8_t getSelfLearn(); + uint8_t getTemplate(uint16_t id,uint8_t * temp); + uint8_t downLoadTemplate(uint16_t id,uint8_t * temp); + uint8_t getFingerImage(uint8_t *image); + uint8_t downLoadImage(uint16_t id,uint8_t * temp); + uint8_t receiveImageData(uint8_t *image); + uint8_t getQuarterFingerImage(uint8_t *image); + uint8_t contrastTemplate(uint8_t *temp); + /** + * @brief Read device number + * @return Device number + */ + String getDeviceInfo(); + + /** + * @brief Set serial number + * @param String pointer + * @return 0(succeed) or ERR_ID809 + */ + uint8_t setModuleSN(const char* SN); + /** + * @brief Read serial number + * @return Serial number + */ + String getModuleSN(); + + /** + * @brief Set LED + * @param mode:in typedef enum eLEDMode_t + * @param color:in typedef enum eLEDColor_t + * @param blink Count: 00 represents blinking all the time + * @This parameter will only be valid in mode eBreathing, eFastBlink, eSlowBlink + * @return 0(succeed) or ERR_ID809 + */ + uint8_t ctrlLED(eLEDMode_t mode,eLEDColor_t color,uint8_t blinkCount); + + /** + * @brief Detect if there is finger touched + * @return 1(Touched) or 0(No touch) + */ + uint8_t detectFinger(); + + /** + * @brief Get the first registerable ID + * @return Registerable ID or ERR_ID809 + */ + uint8_t getEmptyID(); + + /** + * @brief Check if the ID has been registered + * @return 0(Registered), 1(Unregistered) or ERR_ID809 + */ + uint8_t getStatusID(uint8_t ID); + + /** + * @brief Get the number of registered users + * @return Number of registered users or ERR_ID809 + */ + uint8_t getEnrollCount(); + + /** + * @brief Get registered user list + * @return 0(succeed) or ERR_ID809 + */ + uint8_t getEnrolledIDList(uint8_t* list); + + /** + * @brief Fingerprint acquisition + * @return 0(succeed) or ERR_ID809 + */ + uint8_t collectionFingerprint(uint16_t timeout,int ramNumber = -1); + + /** + * @brief Save fingerprint + * @param Fingerprint ID + * @return 0(succeed) or ERR_ID809 + */ + uint8_t storeFingerprint(uint8_t ID); + + /** + * @brief Delete fingerprint + * @param Delete ID or DELALL(delete all) + * @return 0(succeed) or ERR_ID809 + */ + uint8_t delFingerprint(uint8_t ID); + + /** + * @brief Match the fingerprint with all fingeprints + * @return Successfully matched fingerprint ID, 0(Matching failed) or ERR_ID809 + */ + uint8_t search(); + + /** + * @brief Match the fingerprint with specific fingerprint + * @return Successfully matched fingerprint ID, 0(Matching failed) or ERR_ID809 + */ + uint8_t verify(uint8_t ID); + + /** + * @brief Compare templates in two specific RamBuffers + * @param RamBuffer number + * @param RamBuffer number + * @return 0(succeed) or ERR_ID809 + */ + uint8_t match(uint8_t RamBufferID0, uint8_t RamBufferID1); + + /** + * @brief Get the number of damaged fingerprints + * @return Damaged fingerprint ID or ERR_ID809 + */ + uint8_t getBrokenQuantity(); + + /** + * @brief Get the first damaged fingerprint ID + * @return Damaged fingerprint ID or ERR_ID809 + */ + uint8_t getBrokenID(); + + /** + * @brief Take out fingerprint template, temporarily save into RamBuffer + * @param Fingerprint ID + * @param RamBuffer number 0-2 + * @return 0(succeed) or ERR_ID809 + */ + uint8_t loadFingerprint(uint8_t ID, uint8_t RamBufferID); + + /** + * @brief Enter Standby mode + * @return 0(succeed) or ERR_ID809 + */ + uint8_t enterStandbyState(); + + /** + * @brief Get error information + * @return Text description of error information + */ + String getErrorDescription(); + + bool setDbgSerial(Stream &s_){dbg = &s_; return true;} + uint16_t FINGERPRINT_CAPACITY = 80; +protected: + /** + * @brief Set parameter + * @param Data type+ data + * @return 0(succeed) or ERR_ID809 + */ + uint8_t setParam(uint8_t* data); + + /** + * @brief Read parameter + * @param Data type + * @return data or ERR_ID809 + */ + uint8_t getParam(uint8_t* data); + + /** + * @brief Capture fingerprint image + * @return 0(succeed) or ERR_ID809 + */ + uint8_t getImage(); + + /** + * @brief Take image as template + * @param Ram Buffer number + * @return 0(succeed) or ERR_ID809 + */ + uint8_t generate(uint8_t RamBufferID); + + /** + * @brief Fingerprint synthesis + * @return 0(succeed) or ERR_ID809 + */ + uint8_t merge(); + + /** + * @brief Packing data frame + * @param Data type:CMD_TYPE or DATA_TYPE + * @param Command + * @param Data + * @param Length + * @return Data frame + */ + pCmdPacketHeader_t pack(uint8_t type, uint16_t cmd, const char *payload, uint16_t len); + + /** + * @brief Send data + * @param Data frame + */ + void sendPacket(pCmdPacketHeader_t header); + + /** + * @brief Read byte + * @param Pointer for saving data + * @param Length of data to be received + * @return Actual received data length + */ + size_t readN(void* buf_, size_t len); + + /** + * @brief Read frame header + * @param Frame header struct of response packet + * @return Response packet type:RCM_TYPE,DATA_TYPE or 1(reading timeout) + */ + uint16_t readPrefix( pRcmPacketHeader_t header ); + + /** + * @brief Read data + * @param Pointer for saving data + * @return 0(success) or ERR_ID809 + */ + uint8_t responsePayload(void* buf); + + /** + * @brief Get command packet CKS + * @param Command packet frame + * @return CKS + */ + uint16_t getCmdCKS(pCmdPacketHeader_t packet); + + /** + * @brief Get response packet CKS + * @param Response packet frame + * @return CKS + */ + uint16_t getRcmCKS(pRcmPacketHeader_t packet); + uint8_t store(uint8_t ID); + +private: + Stream *s; + uint8_t buf[20]; //For saving response packet data + pCmdPacketHeader_t sendHeader; + pRcmPacketHeader_t recHeader; + + static const sErrorDescription_t /*PROGMEM*/ errorDescriptionsTable[26]; //Error information list + + uint8_t _number = 0; //Fingerprint acquisistion times + uint8_t _state = 0; //Collect fingerprint state + eError_t _error; //Error code + uint16_t _PacketSize = 0; //Data packet length to be sent +}; + +#endif diff --git a/TestSHA256/.pio/libdeps/Teensy_SHA/DFRobot_ID809/library.json b/TestSHA256/.pio/libdeps/Teensy_SHA/DFRobot_ID809/library.json new file mode 100644 index 0000000000000000000000000000000000000000..c537b856da0e13b2d58e57c0aca5ba2c6e51b6da --- /dev/null +++ b/TestSHA256/.pio/libdeps/Teensy_SHA/DFRobot_ID809/library.json @@ -0,0 +1,4 @@ +{ + "name": "DFRobot_ID809", + "version": "0.0.0+20220728181242" +} \ No newline at end of file diff --git a/TestSHA256/.pio/libdeps/Teensy_SHA/SHA256/.piopm b/TestSHA256/.pio/libdeps/Teensy_SHA/SHA256/.piopm new file mode 100644 index 0000000000000000000000000000000000000000..bdcb7ef962fbd37c05d927509993256ed6724255 --- /dev/null +++ b/TestSHA256/.pio/libdeps/Teensy_SHA/SHA256/.piopm @@ -0,0 +1 @@ +{"type": "library", "name": "SHA256", "version": "0.0.0+20220728181242", "spec": {"owner": null, "id": null, "name": "SHA256", "requirements": null, "uri": "file://lib/SHA256"}} \ No newline at end of file diff --git a/TestSHA256/.pio/libdeps/Teensy_SHA/SHA256/library.json b/TestSHA256/.pio/libdeps/Teensy_SHA/SHA256/library.json new file mode 100644 index 0000000000000000000000000000000000000000..a8c7ac2655902901df7fbfdbb9b0028aec2c9626 --- /dev/null +++ b/TestSHA256/.pio/libdeps/Teensy_SHA/SHA256/library.json @@ -0,0 +1,4 @@ +{ + "name": "SHA256", + "version": "0.0.0+20220728181242" +} \ No newline at end of file diff --git a/TestSHA256/.pio/libdeps/Teensy_SHA/SHA256/sha256.c b/TestSHA256/.pio/libdeps/Teensy_SHA/SHA256/sha256.c new file mode 100644 index 0000000000000000000000000000000000000000..cf6601862a39f4f3926deceabf85c80cd4e179df --- /dev/null +++ b/TestSHA256/.pio/libdeps/Teensy_SHA/SHA256/sha256.c @@ -0,0 +1,169 @@ +/********************************************************************* +* Filename: sha256.c +* Author: Brad Conte (brad AT bradconte.com) +* Copyright: +* Disclaimer: This code is presented "as is" without any guarantees. +* Details: Implementation of the SHA-256 hashing algorithm. + SHA-256 is one of the three algorithms in the SHA2 + specification. The others, SHA-384 and SHA-512, are not + offered in this implementation. + Algorithm specification can be found here: + * http://csrc.nist.gov/publications/fips/fips180-2/fips180-2withchangenotice.pdf + This implementation uses little endian byte order. +*********************************************************************/ + +/*************************** HEADER FILES ***************************/ +#include <stdlib.h> +#include <string.h> +//#include <memory.h> +#include "sha256.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + + +/****************************** MACROS ******************************/ +#define ROTLEFT(a,b) (((a) << (b)) | ((a) >> (32-(b)))) +#define ROTRIGHT(a,b) (((a) >> (b)) | ((a) << (32-(b)))) + +#define CH(x,y,z) (((x) & (y)) ^ (~(x) & (z))) +#define MAJ(x,y,z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z))) +#define EP0(x) (ROTRIGHT(x,2) ^ ROTRIGHT(x,13) ^ ROTRIGHT(x,22)) +#define EP1(x) (ROTRIGHT(x,6) ^ ROTRIGHT(x,11) ^ ROTRIGHT(x,25)) +#define SIG0(x) (ROTRIGHT(x,7) ^ ROTRIGHT(x,18) ^ ((x) >> 3)) +#define SIG1(x) (ROTRIGHT(x,17) ^ ROTRIGHT(x,19) ^ ((x) >> 10)) + +/**************************** VARIABLES *****************************/ +static const WORD k[64] = { + 0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5, + 0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174, + 0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da, + 0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967, + 0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85, + 0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070, + 0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3, + 0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2 +}; + +/*********************** FUNCTION DEFINITIONS ***********************/ +void sha256_transform(SHA256_CTX *ctx, const BYTE data[]) +{ + WORD a, b, c, d, e, f, g, h, i, j, t1, t2, m[64]; + + for (i = 0, j = 0; i < 16; ++i, j += 4) + m[i] = (data[j] << 24) | (data[j + 1] << 16) | (data[j + 2] << 8) | (data[j + 3]); + for ( ; i < 64; ++i) + m[i] = SIG1(m[i - 2]) + m[i - 7] + SIG0(m[i - 15]) + m[i - 16]; + + a = ctx->state[0]; + b = ctx->state[1]; + c = ctx->state[2]; + d = ctx->state[3]; + e = ctx->state[4]; + f = ctx->state[5]; + g = ctx->state[6]; + h = ctx->state[7]; + + for (i = 0; i < 64; ++i) { + t1 = h + EP1(e) + CH(e,f,g) + k[i] + m[i]; + t2 = EP0(a) + MAJ(a,b,c); + h = g; + g = f; + f = e; + e = d + t1; + d = c; + c = b; + b = a; + a = t1 + t2; + } + + ctx->state[0] += a; + ctx->state[1] += b; + ctx->state[2] += c; + ctx->state[3] += d; + ctx->state[4] += e; + ctx->state[5] += f; + ctx->state[6] += g; + ctx->state[7] += h; +} + +void sha256_init(SHA256_CTX *ctx) +{ + ctx->datalen = 0; + ctx->bitlen = 0; + ctx->state[0] = 0x6a09e667; + ctx->state[1] = 0xbb67ae85; + ctx->state[2] = 0x3c6ef372; + ctx->state[3] = 0xa54ff53a; + ctx->state[4] = 0x510e527f; + ctx->state[5] = 0x9b05688c; + ctx->state[6] = 0x1f83d9ab; + ctx->state[7] = 0x5be0cd19; +} + +void sha256_update(SHA256_CTX *ctx, const BYTE data[], size_t len) +{ + WORD i; + + for (i = 0; i < len; ++i) { + ctx->data[ctx->datalen] = data[i]; + ctx->datalen++; + if (ctx->datalen == 64) { + sha256_transform(ctx, ctx->data); + ctx->bitlen += 512; + ctx->datalen = 0; + } + } +} + +void sha256_final(SHA256_CTX *ctx, BYTE hash[]) +{ + WORD i; + + i = ctx->datalen; + + // Pad whatever data is left in the buffer. + if (ctx->datalen < 56) { + ctx->data[i++] = 0x80; + while (i < 56) + ctx->data[i++] = 0x00; + } + else { + ctx->data[i++] = 0x80; + while (i < 64) + ctx->data[i++] = 0x00; + sha256_transform(ctx, ctx->data); + memset(ctx->data, 0, 56); + } + + // Append to the padding the total message's length in bits and transform. + ctx->bitlen += ctx->datalen * 8; + ctx->data[63] = ctx->bitlen; + ctx->data[62] = ctx->bitlen >> 8; + ctx->data[61] = ctx->bitlen >> 16; + ctx->data[60] = ctx->bitlen >> 24; + ctx->data[59] = ctx->bitlen >> 32; + ctx->data[58] = ctx->bitlen >> 40; + ctx->data[57] = ctx->bitlen >> 48; + ctx->data[56] = ctx->bitlen >> 56; + sha256_transform(ctx, ctx->data); + + // Since this implementation uses little endian byte ordering and SHA uses big endian, + // reverse all the bytes when copying the final state to the output hash. + for (i = 0; i < 4; ++i) { + hash[i] = (ctx->state[0] >> (24 - i * 8)) & 0x000000ff; + hash[i + 4] = (ctx->state[1] >> (24 - i * 8)) & 0x000000ff; + hash[i + 8] = (ctx->state[2] >> (24 - i * 8)) & 0x000000ff; + hash[i + 12] = (ctx->state[3] >> (24 - i * 8)) & 0x000000ff; + hash[i + 16] = (ctx->state[4] >> (24 - i * 8)) & 0x000000ff; + hash[i + 20] = (ctx->state[5] >> (24 - i * 8)) & 0x000000ff; + hash[i + 24] = (ctx->state[6] >> (24 - i * 8)) & 0x000000ff; + hash[i + 28] = (ctx->state[7] >> (24 - i * 8)) & 0x000000ff; + } +} + +#ifdef __cplusplus +} +#endif diff --git a/TestSHA256/.pio/libdeps/Teensy_SHA/SHA256/sha256.h b/TestSHA256/.pio/libdeps/Teensy_SHA/SHA256/sha256.h new file mode 100644 index 0000000000000000000000000000000000000000..bc64c5f818004f9806c8179aac3b44ea3b25ead7 --- /dev/null +++ b/TestSHA256/.pio/libdeps/Teensy_SHA/SHA256/sha256.h @@ -0,0 +1,48 @@ + +/********************************************************************* +* Filename: sha256.h +* Author: Brad Conte (brad AT bradconte.com) +* Copyright: +* Disclaimer: This code is presented "as is" without any guarantees. +* Details: Defines the API for the corresponding SHA1 implementation. +*********************************************************************/ + +#ifndef SHA256_H +#define SHA256_H + +/*************************** HEADER FILES ***************************/ +#include <stddef.h> + +/****************************** MACROS ******************************/ +#define SHA256_BLOCK_SIZE 32 // SHA256 outputs a 32 byte digest + + +/**************************** DATA TYPES ****************************/ +typedef unsigned char BYTE; // 8-bit byte +typedef unsigned int WORD; // 32-bit word, change to "long" for 16-bit machines + +typedef struct { + BYTE data[64]; + WORD datalen; + unsigned long long bitlen; + WORD state[8]; +} SHA256_CTX; + +/*********************** FUNCTION DECLARATIONS **********************/ + +#ifdef __cplusplus +extern "C" +{ +#endif + + +void sha256_init(SHA256_CTX *ctx); +void sha256_update(SHA256_CTX *ctx, const BYTE data[], size_t len); +void sha256_final(SHA256_CTX *ctx, BYTE hash[]); + +#ifdef __cplusplus +} +#endif + + +#endif // SHA256_H diff --git a/TestSHA256/.pio/libdeps/Teensy_SHA/integrity.dat b/TestSHA256/.pio/libdeps/Teensy_SHA/integrity.dat new file mode 100644 index 0000000000000000000000000000000000000000..45a846c723670890a11c026ec73971fe13a2db67 --- /dev/null +++ b/TestSHA256/.pio/libdeps/Teensy_SHA/integrity.dat @@ -0,0 +1,2 @@ +lib/DFRobot_ID809 +lib/SHA256 \ No newline at end of file diff --git a/TestSHA256/lib/DFRobot_ID809/DFRobot_ID809.cpp b/TestSHA256/lib/DFRobot_ID809/DFRobot_ID809.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ddf2e9935312621665d8582d43f916b346e28214 --- /dev/null +++ b/TestSHA256/lib/DFRobot_ID809/DFRobot_ID809.cpp @@ -0,0 +1,1089 @@ + +/*! + * @file DFRobot_ID809.cpp + * @brief Define the basic structure of DFRobot_ID809 class and the implementation of underlying methods + * @copyright Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com) + * @licence The MIT License (MIT) + * @author [Eddard](eddard.liu@dfrobot.com) + * @version V1.0 + * @date 2020-03-19 + * @get from https://www.dfrobot.com + * @url https://github.com/cdjq/DFRobot_ID809 + */ + +#include <DFRobot_ID809.h> +#include <Arduino.h> +#include <string.h> +#include <stdio.h> +Stream *dbg=NULL; + +DFRobot_ID809::DFRobot_ID809() + :s(NULL){ + +} + +DFRobot_ID809::~DFRobot_ID809(){ + +} + +bool DFRobot_ID809::begin(Stream &s_){ + s = &s_; + String str = getDeviceInfo(); + //Serial.println(str[str.length()-1]); + if(str[str.length()-1] == '4'){ + + FINGERPRINT_CAPACITY = 80 ; + + //Serial.println(str[str.length()-1]); + }else if(str[str.length()-1] == '3'){ + //Serial.println(str[str.length()-1]); + FINGERPRINT_CAPACITY = 200 ; + + } + + if(s == NULL){ + return false; + } + return true; +} + +bool DFRobot_ID809::isConnected(){ + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_TEST_CONNECTION, NULL, 0); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + if(ret == ERR_SUCCESS){ + return true; + }else{ + return false; + } +} + +uint8_t DFRobot_ID809::setDeviceID(uint8_t deviceID){ + uint8_t data[5] = {0}; //data:1bytes Parameter Type+4bytes Parameter Value + data[1] = deviceID; + uint8_t ret = setParam(data); + return ret; +} + +uint8_t DFRobot_ID809::setSecurityLevel(uint8_t securityLevel){ + uint8_t data[5] = {0}; + data[0] = 1; + data[1] = securityLevel; + uint8_t ret = setParam(data); + return ret; +} + +uint8_t DFRobot_ID809::setDuplicationCheck(uint8_t duplicationCheck){ + uint8_t data[5] = {0}; + data[0] = 2; + data[1] = duplicationCheck; + uint8_t ret = setParam(data); + return ret; +} + +uint8_t DFRobot_ID809::setBaudrate(eDeviceBaudrate_t baudrate){ + uint8_t data[5] = {0}; + data[0] = 3; + data[1] = baudrate; + uint8_t ret = setParam(data); + return ret; +} + +uint8_t DFRobot_ID809::setSelfLearn(uint8_t selfLearn){ + uint8_t data[5] = {0}; + data[0] = 4; + data[1] = selfLearn; + uint8_t ret = setParam(data); + return ret; +} + +uint8_t DFRobot_ID809::getDeviceID(){ + uint8_t data[1]; //data:1byte Parameter Type + data[0] = 0; + uint8_t ret = getParam(data); + return ret; +} + +uint8_t DFRobot_ID809::getSecurityLevel(){ + uint8_t data[1]; + data[0] = 1; + uint8_t ret = getParam(data); + return ret; +} + +uint8_t DFRobot_ID809::getDuplicationCheck(){ + uint8_t data[1]; + data[0] = 2; + uint8_t ret = getParam(data); + return ret; +} + +uint8_t DFRobot_ID809::getBaudrate(){ + uint8_t data[1]; + data[0] = 3; + uint8_t ret = getParam(data); + return ret; +} + +uint8_t DFRobot_ID809::getSelfLearn(){ + uint8_t data[1]; + data[0] = 4; + uint8_t ret = getParam(data); + return ret; +} + +String DFRobot_ID809::getDeviceInfo(){ + char *data; + uint8_t result; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_DEVICE_INFO, NULL, 0); + sendPacket(header); + free(header); + result = responsePayload(buf); + LDBG("result=");LDBG(result); + if(result != ERR_SUCCESS){ + return ""; + } + uint16_t dataLen = buf[0]+(buf[1]<<8)+1; + if((data = (char *)malloc(dataLen)) == NULL){ + LDBG("no memory!!!\r\n"); + while(1); + } + data[dataLen] = 0; + result = responsePayload(data); + LDBG("result=");LDBG(result); + String ret = String(data); + free(data); + return ret; +} + +uint8_t DFRobot_ID809::setModuleSN(const char* SN){ + char data[2]; + data[0] = MODULE_SN_SIZE; + if(strlen(SN) > MODULE_SN_SIZE){ + LDBG("The serial number exceeds 15 characters"); + return ERR_ID809; + } + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_SET_MODULE_SN, data, 2); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + if(ret != ERR_SUCCESS){ + return ERR_ID809; + } + header = pack(DATA_TYPE, CMD_SET_MODULE_SN, SN, MODULE_SN_SIZE); + sendPacket(header); + free(header); + ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + if(ret == ERR_SUCCESS){ + ret = buf[0]; + } + return ret; +} + +uint8_t DFRobot_ID809::getTemplate(uint16_t id,uint8_t * temp){ + char data[4]; + data[0] = id; + data[1] = 0; + data[2] = 0; + data[3] = 0; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_LOAD_CHAR, data, 4); + sendPacket(header); + free(header); + + uint8_t ret = responsePayload(buf); + LDBG("ret="); + LDBG(ret); + if(ret != ERR_SUCCESS) { + return ERR_ID809; + } + data[0] = 0; + data[1] = 0; + header = pack(CMD_TYPE, CMD_UP_CHAR, data, 2); + sendPacket(header); + free(header); + + ret = responsePayload(buf); + LDBG("ret="); + LDBG(ret); + if(ret == ERR_SUCCESS) { + ret = buf[0]; + } + ret = responsePayload(temp); + + return ret; +} + +uint8_t DFRobot_ID809::downLoadTemplate(uint16_t id,uint8_t * temp){ + + char data[4]; + data[0] = 0xf2; + data[1] = 3; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_DOWN_CHAR, data, 2); + sendPacket(header); + free(header); + + uint8_t ret = responsePayload(buf); + LDBG("ret="); + LDBG(ret); + if(ret != ERR_SUCCESS) { + return ERR_ID809; + } + char *tempData= (char *)malloc(0x3f2 +1); + tempData[0] = 0; + tempData[1] = 0; + memcpy(tempData+2,temp,0x3f0); + + + header = pack(DATA_TYPE, CMD_DOWN_CHAR, tempData, 0x3f2); + + sendPacket(header); + + free(header); + + ret = responsePayload(buf); + LDBG("ret="); + LDBG(ret); + if(ret == ERR_SUCCESS) { + ret = buf[0]; + } + free(tempData); + + + return store(id); +} + +uint8_t DFRobot_ID809::contrastTemplate(uint8_t *temp){ + + char data[4]; + data[0] = 0xf2; + data[1] = 3; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_DOWN_CHAR, data, 2); + sendPacket(header); + free(header); + + uint8_t ret = responsePayload(buf); + LDBG("ret="); + LDBG(ret); + if(ret != ERR_SUCCESS) { + return ERR_ID809; + } + char *tempData= (char *)malloc(0x3f2 +1); + tempData[0] = 2; + tempData[1] = 0; + memcpy(tempData+2,temp,0x3f0); + + + header = pack(DATA_TYPE, CMD_DOWN_CHAR, tempData, 0x3f2); + + sendPacket(header); + + free(header); + + ret = responsePayload(buf); + LDBG("ret="); + LDBG(ret); + if(ret == ERR_SUCCESS) { + ret = buf[0]; + } + free(tempData); + data[0] = 0; + data[1] = 0; + data[2] = 2; + data[3] = 0; + header = pack(CMD_TYPE, CMD_MATCH, data, 4); + sendPacket(header); + free(header); + + ret = responsePayload(buf); + LDBG("ret="); + LDBG(ret); + if(ret != ERR_SUCCESS) { + return ret; + } + return ret; + +} +uint8_t DFRobot_ID809::getFingerImage(uint8_t *image) +{ + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_GET_IMAGE, NULL, 0); + sendPacket(header); + free(header); + + uint8_t ret = responsePayload(buf); + LDBG("ret="); + LDBG(ret); + if(ret != ERR_SUCCESS) { + return ERR_ID809; + } + + char data[1]; + data[0] = 0; + header = pack(CMD_TYPE, CMD_UP_IMAGE_CODE, data, 1); + sendPacket(header); + free(header); + + ret = responsePayload(buf); + LDBG("ret="); + LDBG(ret); + if(ret != ERR_SUCCESS) { + return ERR_ID809; + } + char *tempData= (char *)malloc(500 +1); + for(uint8_t i=0;i<52;i++){ + + ret = responsePayload(tempData); + if(i == 51) + memcpy(image+i*496,tempData+2,304); + else + memcpy(image+i*496,tempData+2,496); + } + free(tempData); +} +uint8_t DFRobot_ID809::getQuarterFingerImage(uint8_t *image){ + + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_GET_IMAGE, NULL, 0); + sendPacket(header); + free(header); + + uint8_t ret = responsePayload(buf); + LDBG("ret="); + LDBG(ret); + if(ret != ERR_SUCCESS) { + return ERR_ID809; + } + + char data[1]; + data[0] = 1; + header = pack(CMD_TYPE, CMD_UP_IMAGE_CODE, data, 1); + sendPacket(header); + free(header); + + ret = responsePayload(buf); + LDBG("ret="); + LDBG(ret); + if(ret != ERR_SUCCESS) { + return ERR_ID809; + } + char *tempData= (char *)malloc(500 +1); + for(uint8_t i=0;i<13;i++){ + + ret = responsePayload(tempData); + if(i == 12) + memcpy(image+i*496,tempData+2,448); + else + memcpy(image+i*496,tempData+2,496); + } + free(tempData); + +} +uint8_t DFRobot_ID809::downLoadImage(uint16_t id,uint8_t * temp) +{ + char data[4]; + data[0] = 0xa0; + data[1] = 0; + data[2] = 0xa0; + data[3] = 0; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_DOWN_IMAGE, data, 4); + sendPacket(header); + free(header); + + uint8_t ret = responsePayload(buf); + LDBG("ret="); + LDBG(ret); + if(ret != ERR_SUCCESS) { + return ERR_ID809; + } + char *tempData= (char *)malloc(500); + for(uint8_t i =0 ;i<52;i++){ + tempData[0] = i; + tempData[1] = 0; + if(i == 51){ + memcpy(tempData+2,temp+i*496,304); + header = pack(DATA_TYPE, CMD_DOWN_IMAGE, tempData, 306); + }else{ + memcpy(tempData+2,temp+i*496,496); + header = pack(DATA_TYPE, CMD_DOWN_IMAGE, tempData, 498); + } + sendPacket(header); + + free(header); + + ret = responsePayload(buf); + LDBG("ret="); + LDBG(ret); + if(ret != ERR_SUCCESS) { + return ERR_ID809; + } + + } + free(tempData); + + data[0] = 0; + data[1] = 0; + header = pack(CMD_TYPE, CMD_GENERATE, data, 2); + sendPacket(header); + free(header); + + ret = responsePayload(buf); + LDBG("ret="); + LDBG(ret); + if(ret != ERR_SUCCESS) { + // return ERR_ID809; + } + return store(id); + +} + +uint8_t DFRobot_ID809::receiveImageData(uint8_t * image){ + + + + uint8_t ret = responsePayload(image); + if(ret != ERR_SUCCESS) { + return ERR_ID809; + } + +} +String DFRobot_ID809::getModuleSN(){ + char *data; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_GET_MODULE_SN, NULL, 0); + sendPacket(header); + free(header); + uint8_t result = responsePayload(buf); + LDBG("result=");LDBG(result); + if(result != ERR_SUCCESS){ + return ""; + } + uint16_t dataLen = buf[0]+(buf[1]<<8)+1; + if((data = (char *)malloc(dataLen)) == NULL){ + LDBG("no memory!!!\r\n"); + while(1); + } + data[dataLen] = 0; + result = responsePayload(data); + LDBG("result=");LDBG(result); + String ret = String(data); + free(data); + return ret; +} + +uint8_t DFRobot_ID809::ctrlLED(eLEDMode_t mode,eLEDColor_t color,uint8_t blinkCount){ + char data[4] = {0}; + if(FINGERPRINT_CAPACITY == 80){ + data[0] = mode; + data[2] = data[1] = color; + data[3] = blinkCount; + }else{ + if(mode == 1){ + data[0] = 2; + } else if(mode == 2){ + data[0] = 4; + } else if(mode == 3){ + data[0] = 1; + } else if(mode == 4){ + data[0] = 0; + } else if(mode == 5){ + data[0] = 3; + } + if(color == eLEDGreen){ + data[2] = data[1] = 0x84; + }else if(color == eLEDRed){ + data[2] = data[1] = 0x82; + }else if(color == eLEDYellow){ + data[2] = data[1] = 0x86; + }else if(color == eLEDBlue){ + data[2] = data[1] = 0x81; + }else if(color == eLEDCyan){ + data[2] = data[1] = 0x85; + }else if(color == eLEDMagenta){ + data[2] = data[1] = 0x83; + }else { + data[2] = data[1] = 0x87; + } + } + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_SLED_CTRL, data, 4); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + return ret; +} + +uint8_t DFRobot_ID809::detectFinger(){ + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_FINGER_DETECT, NULL, 0); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + if(ret == ERR_SUCCESS){ + ret = buf[0]; + } + return ret; +} + +uint8_t DFRobot_ID809::getEmptyID(){ + char data[4] = {0}; + data[0] = 1; + data[2] = FINGERPRINT_CAPACITY; //80 fingerprints at most, default to full range + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_GET_EMPTY_ID, data, 4); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + if(ret == ERR_SUCCESS){ + ret = buf[0]; + } + return ret; +} + +uint8_t DFRobot_ID809::getStatusID(uint8_t ID){ + char data[2] = {0}; + data[0] = ID; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_GET_STATUS, data, 2); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + if(ret == ERR_SUCCESS){ + ret = buf[0]; + } + return ret; +} + +uint8_t DFRobot_ID809::getEnrollCount(){ + char data[4] = {0}; + data[0] = 1; + data[2] = FINGERPRINT_CAPACITY; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_GET_ENROLL_COUNT, data, 4); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + if(ret == ERR_SUCCESS){ + ret = buf[0]; + } + return ret; +} + +#define getID(A, V) (A[0 + V/8] & (0x01 << (V & 0x07))) +uint8_t DFRobot_ID809::getEnrolledIDList(uint8_t* list) +{ + char *data; + uint8_t i = 0; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_GET_ENROLLED_ID_LIST, NULL, 0); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + uint16_t dataLen = buf[0]+(buf[1]<<8); + if((data = (char *)malloc(dataLen)) == NULL){ + LDBG("no memory!!!\r\n"); + while(1); + } + ret = responsePayload(data); + LDBG("ret=");LDBG(ret); + if(ret != ERR_SUCCESS){ + ret = ERR_ID809; + }else{ + for(uint16_t j = 0; j < (dataLen*8); j++){ + if(getID(data, j) != 0){ + list[i] = j; + i++; + } + } + } + free(data); + return ret; +} + +uint8_t DFRobot_ID809::storeFingerprint(uint8_t ID){ + char data[4] = {0}; + uint8_t ret; + ret = merge(); + LDBG("ret=");LDBG(ret); + if(ret != ERR_SUCCESS){ + return ERR_ID809; + } + _number = 0; + data[0] = ID; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_STORE_CHAR, data, 4); + sendPacket(header); + free(header); + ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + return ret; + +} +uint8_t DFRobot_ID809::store(uint8_t ID){ + + + char data[4] = {0}; + uint8_t ret; + LDBG("ret="); + LDBG(ret); + data[0] = ID; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_STORE_CHAR, data, 4); + sendPacket(header); + free(header); + ret = responsePayload(buf); + LDBG("ret="); + LDBG(ret); + return ret; +} +uint8_t DFRobot_ID809::delFingerprint(uint8_t ID) +{ + char data[4] = {0}; + if(ID == DELALL) { + data[0] = 1; + data[2] = FINGERPRINT_CAPACITY; + } else { + data[0] = data[2] = ID; + } + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_DEL_CHAR, data, 4); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret="); + LDBG(ret); + return ret; +} + +uint8_t DFRobot_ID809::search(){ + if(_state == 1){ + char data[6] = {0}; + data[2] = 1; + data[4] = FINGERPRINT_CAPACITY; + _number = 0; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_SEARCH, data, 6); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + if(ret == ERR_SUCCESS){ + ret = buf[0]; + }else{ + ret = 0; + } + return ret; + } + return 0; +} + +uint8_t DFRobot_ID809::verify(uint8_t ID){ + if(_state == 1){ + char data[4] = {0}; + data[0] = ID; + _number = 0; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_VERIFY, data, 4); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + if(ret == ERR_SUCCESS){ + ret = buf[0]; + }else{ + ret = 0; + } + return ret; + } + return 0; +} + +uint8_t DFRobot_ID809::match(uint8_t RamBufferID0, uint8_t RamBufferID1){ + char data[4] = {0}; + data[0] = RamBufferID0; + data[2] = RamBufferID1; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_MATCH, data, 4); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + if(ret == ERR_SUCCESS){ + ret = buf[0]; + }else{ + ret = 0; + } + return ret; +} + +uint8_t DFRobot_ID809::getBrokenQuantity(){ + char data[4] = {0}; + data[0] = 1; + data[2] = FINGERPRINT_CAPACITY; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_GET_BROKEN_ID, data, 4); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + if(ret == ERR_SUCCESS){ + ret = buf[0]; + } + return ret; +} + +uint8_t DFRobot_ID809::getBrokenID(){ + char data[4] = {0}; + data[0] = 1; + data[2] = FINGERPRINT_CAPACITY; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_GET_BROKEN_ID, data, 4); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + if(ret == ERR_SUCCESS){ + ret = buf[2]; + } + return ret; +} + +uint8_t DFRobot_ID809::loadFingerprint(uint8_t ID, uint8_t RamBufferID){ + char data[4] = {0}; + data[0] = ID; + data[2] = RamBufferID; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_LOAD_CHAR, data, 4); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + return ret; +} + +uint8_t DFRobot_ID809::enterStandbyState(){ + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_ENTER_STANDBY_STATE, NULL, 0); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + return ret; +} + +uint8_t DFRobot_ID809::setParam(uint8_t* data){ + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_SET_PARAM, (const char *)data, 5); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + return ret; +} + +uint8_t DFRobot_ID809::getParam(uint8_t* data){ + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_GET_PARAM, (const char *)data, 1); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + if(ret == ERR_SUCCESS){ + ret = buf[0]; + } + return ret; +} + +uint8_t DFRobot_ID809::getImage(){ + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_GET_IMAGE, NULL, 0); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + return ret; +} + +uint8_t DFRobot_ID809::collectionFingerprint(uint16_t timeout,int ramNumber){ //Collect fingerprint + uint16_t i = 0; + uint8_t ret; + if(ramNumber == -1){ + if(_number > 2){ + _error = eErrorGatherOut; + LDBG("Exceed upper limit of acquisition times "); + return ERR_ID809; + } + } + while(!detectFinger()){ + if(timeout != 0){ + delay(10); + if(++i > timeout*10){ + _error = eErrorTimeOut; + LDBG("Acquisition timeout "); + LDBG("ret=");LDBG(ret); + _state = 0; + return ERR_ID809; + } + } + } + ret = getImage(); + LDBG("ret=");LDBG(ret); + if(ret != ERR_SUCCESS){ + _state = 0; + return ERR_ID809; + } + if(ramNumber != -1){ + ret = generate(ramNumber); + } else{ + ret = generate(_number); + } + LDBG("ret=");LDBG(ret); + if(ret != ERR_SUCCESS){ + _state = 0; + return ERR_ID809; + } + _number++; + _state = 1; + return ret; +} + +uint8_t DFRobot_ID809::generate(uint8_t RamBufferID){ + char data[2] = {0}; + data[0] = RamBufferID; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_GENERATE, (const char *)data, 2); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + return ret; +} + +uint8_t DFRobot_ID809::merge(){ + char data[3] = {0}; + data[2] = _number; + pCmdPacketHeader_t header = pack(CMD_TYPE, CMD_MERGE, data, 3); + sendPacket(header); + free(header); + uint8_t ret = responsePayload(buf); + LDBG("ret=");LDBG(ret); + return ret; +} + +pCmdPacketHeader_t DFRobot_ID809::pack(uint8_t type, uint16_t cmd, const char *payload, uint16_t len){ + pCmdPacketHeader_t header; + uint16_t cks=0; + uint16_t dataLen; + if(type == CMD_TYPE){ //Structure of command packet, fixed 26 bytes:10(frame header)+14(data)+2(CKS) + if((header = (pCmdPacketHeader_t)malloc(sizeof(sCmdPacketHeader_t)+16+2)) == NULL){ + return NULL; + } + header->PREFIX = CMD_PREFIX_CODE; + for(int i=0;i<16;i++){ + header->payload[i] = 0; + } + dataLen = 16; //Length of data to be replicated + }else{ //Structure of command data packet, unfixed length:10(frame header)+LEN(data)+2(CKS) + if((header = (pCmdPacketHeader_t)malloc(sizeof(sCmdPacketHeader_t)+len+2)) == NULL){ + return NULL; + } + header->PREFIX = CMD_DATA_PREFIX_CODE; + dataLen = len; //Length of data to be replicated + } + header->SID = 0; + header->DID = 0; + header->CMD = cmd; + header->LEN = len; + if(len){ + memcpy(header->payload, payload, len); + } + cks = getCmdCKS(header); + memcpy(&header->payload[dataLen],&cks,2); + _PacketSize = sizeof(sCmdPacketHeader_t) + dataLen +2; + return header; +} + + +void DFRobot_ID809::sendPacket(pCmdPacketHeader_t header){ + s->write((uint8_t *)header,_PacketSize); +} + +uint8_t DFRobot_ID809::responsePayload(void* buf){ + sRcmPacketHeader_t header; + uint16_t dataLen,dataCount,cks; + uint8_t ch,ret; + int16_t type; + type = readPrefix(&header); + if(type == 1){ + LDBG("--recv timeout---"); + _error = eErrorRecvTimeout; + return ERR_ID809; + } + pRcmPacketHeader_t packet; + if(type == RCM_TYPE){ //Structure of response packet, fixed 26 bytes: 10(frame header)+14(data)+2(CKS) + packet = (pRcmPacketHeader_t)malloc(sizeof(sRcmPacketHeader_t)+14+2); + dataLen = 14+2; //Length of data+CKS + if(packet == NULL){ + LDBG(""); + while(1); + } + }else{ //Structure of response data packet, unfixed length: 10(frame header)+(LEN-2)(data)+2(CKS) + packet = (pRcmPacketHeader_t)malloc(sizeof(sRcmPacketHeader_t)+header.LEN); + dataLen = header.LEN; //Length of data+CKS + if(packet == NULL){ + LDBG(""); + while(1); + } + } + memcpy(packet, &header, 10); + dataCount = readN(packet->payload, dataLen); + cks = packet->payload[dataLen-2]+(packet->payload[dataLen-1]<<8); + ret = (header.RET&0xFF); + _error = (eError_t)ret; + if(ret != ERR_SUCCESS){ + ret = ERR_ID809; + }else if(dataLen != dataCount){ + LDBG("--recvRspPacket length error---"); + _error = eErrorRecvLength; + ret = ERR_ID809; + }else if(getRcmCKS(packet) != cks){ + LDBG("--recvRspPacket cks error---"); + _error = eErrorRecvCks; + ret = ERR_ID809; + }else{ + LDBG("--recvRspPacket OK---"); + memcpy(buf, packet->payload, dataLen); + } + free(packet); + packet = NULL; + return ret; +} + +uint16_t DFRobot_ID809::readPrefix( pRcmPacketHeader_t header ){ + uint8_t ch,ret; + typedef enum{ + RECV_HEADER_INIT, + RECV_HEADER_AA, + RECV_HEADER_A5, + RECV_HEADER_OK + }eRecvHeaderState; + eRecvHeaderState state = RECV_HEADER_INIT; + while(state != RECV_HEADER_OK){ //Can judge the received command packet and command data packet prefix at the same time + if(readN(&ch, 1) != 1){ + ret = 1; + return ret; + } + if((ch == 0xAA) && (state == RECV_HEADER_INIT)){ + state = RECV_HEADER_AA; + continue; + }else if((ch == 0xA5) && (state == RECV_HEADER_INIT)){ + state = RECV_HEADER_A5; + continue; + }else if((ch == 0x55) && (state == RECV_HEADER_AA)){ + state = RECV_HEADER_OK; + ret = RCM_TYPE; + continue; + }else if((ch == 0x5A) && (state == RECV_HEADER_A5)){ + state = RECV_HEADER_OK; + ret = DATA_TYPE; + continue; + }else{ + state = RECV_HEADER_INIT; + if(ch == 0xAA){ + state = RECV_HEADER_AA; + }else if(ch == 0xA5){ + state = RECV_HEADER_A5; + } + } + } + if(ret == RCM_TYPE){ + header->PREFIX = RCM_PREFIX_CODE; + }else if(ret == DATA_TYPE){ + header->PREFIX = RCM_DATA_PREFIX_CODE; + } + readN(&header->SID, 1); + readN(&header->DID, 1); + readN(&header->RCM, 2); + readN(&header->LEN, 2); + readN(&header->RET, 2); + return ret; +} + +size_t DFRobot_ID809::readN(void* buffer, size_t len){ + size_t offset = 0,left = len; + uint8_t *buf = (uint8_t*)buffer; + long long curr = millis(); + while(left){ + if(s->available()){ + buf[offset++] = s->read(); + left--; + } + if(millis() - curr > 5000){ + LDBG("----------!!!!!!!!!recv timeout----------"); + break; + } + } + return offset; +} + +uint16_t DFRobot_ID809::getCmdCKS(pCmdPacketHeader_t packet){ + uint16_t cks = 0xFF; + cks += packet->SID; + cks += packet->DID; + cks += packet->CMD&0xFF; + cks += packet->CMD>>8; + cks += packet->LEN&0xFF; + cks += packet->LEN>>8; + if(packet->LEN > 0){ + uint8_t *p = packet->payload; + for(uint16_t i = 0; i < packet->LEN; i++){ + cks += p[i]; + } + } + return cks&0xFFFF; +} + +uint16_t DFRobot_ID809::getRcmCKS(pRcmPacketHeader_t packet){ + uint16_t cks = 0xFF; + cks += packet->SID; + cks += packet->DID; + cks += packet->RCM&0xFF; + cks += packet->RCM>>8; + cks += packet->LEN&0xFF; + cks += packet->LEN>>8; + cks += packet->RET&0xFF; + cks += packet->RET>>8; + if(packet->LEN > 0){ + uint8_t *p = packet->payload; + for(uint16_t i = 0; i < packet->LEN-2; i++){ + cks += p[i]; + } + } + return cks&0xFFFF; +} + +const DFRobot_ID809::sErrorDescription_t DFRobot_ID809::errorDescriptionsTable[]={ + {eErrorSuccess, "Command processed successfully"}, + {eErrorFail, "Command processing failed"}, + {eErrorVerify, "1:1 comparison failed"}, + {eErrorIdentify, "Comparison with all fingerprints failed"}, + {eErrorTmplEmpty, "No fingerprint in designated ID"}, + {eErrorTmplNotEmpty, "Designated ID has fingerprint"}, + {eErrorAllTmplEmpty, "Module unregistered fingerprint"}, + {eErrorEmptyIDNoexist, "No registerable ID here"}, + {eErrorBrokenIDNoexist, "No broken fingerprint"}, + {eErrorInvalidTmplData, "Invalid desingated fingerprint data"}, + {eErrorDuplicationID, "The fingerprint has been registered"}, + {eErrorBadQuality, "Poor quality fingerprint image"}, + {eErrorMergeFail, "Fingerprint synthesis failed"}, + {eErrorNotAuthorized, "Communication password not authorized"}, + {eErrorMemory, "External Flash burning error"}, + {eErrorInvalidTmplNo, "Invalid designated ID"}, + {eErrorInvalidParam, "Incorrect parameter"}, + {eErrorTimeOut, "Acquisition timeout"}, + {eErrorGenCount, "Invalid number of fingerprint synthesis"}, + {eErrorInvalidBufferID, "Incorrect Buffer ID value"}, + {eErrorFPNotDetected, "No fingerprint input into fingerprint reader"}, + {eErrorFPCancel, "Command cancelled"}, + {eErrorRecvLength, "Wrong data length"}, + {eErrorRecvCks, "Wrong data check code"}, + {eErrorGatherOut, "Exceed upper limit of acquisition times"}, + {eErrorRecvTimeout,"Data reading timeout"} +}; + +String DFRobot_ID809::getErrorDescription() +{ + for(int i=0;i<sizeof(errorDescriptionsTable)/sizeof(errorDescriptionsTable[0]);i++){ + if(_error == errorDescriptionsTable[i].error){ + return errorDescriptionsTable[i].description; + } + } + return ""; +} + diff --git a/TestSHA256/lib/DFRobot_ID809/DFRobot_ID809.h b/TestSHA256/lib/DFRobot_ID809/DFRobot_ID809.h new file mode 100644 index 0000000000000000000000000000000000000000..acb9dfd66edb49c51ecfd9f75a989064d60c5168 --- /dev/null +++ b/TestSHA256/lib/DFRobot_ID809/DFRobot_ID809.h @@ -0,0 +1,504 @@ + +/*! + * @file DFRobot_ID809.h + * @brief Define basic structure of DFRobot_ID809 class + * @n This is an library for capacitive fingerprint module + * @n Main functions: fingerprint image capturing, fingerprint comparison, fingerprint deletion + * @copyright Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com) + * @licence The MIT License (MIT) + * @author [Eddard](eddard.liu@dfrobot.com) + * @version V1.0 + * @date 2020-03-19 + * @get from https://www.dfrobot.com + * @url https://github.com/cdjq/DFRobot_ID809 + */ + +#ifndef _DFRobot_ID809_H +#define _DFRobot_ID809_H + +#if ARDUINO >= 100 +#include "Arduino.h" +#else +#include "WProgram.h" +#endif +#include <Wire.h> + +#include <stdint.h> + +//Open this macro to see the detailed running process of the program + +//#define ENABLE_DBG +#ifdef ENABLE_DBG +#define LDBG(...) if(dbg) {dbg->print("["); dbg->print(__FUNCTION__); dbg->print("(): "); dbg->print(__LINE__); dbg->print(" ] "); dbg->println(__VA_ARGS__);} +#else +#define LDBG(...) +#endif + +extern Stream *dbg; + + /* + Frame struct of command packet + */ +typedef struct{ + uint16_t PREFIX; + uint8_t SID; + uint8_t DID; + uint16_t CMD; + uint16_t LEN; + uint8_t payload[0]; +}__attribute__ ((packed)) sCmdPacketHeader_t, *pCmdPacketHeader_t; + + /* + Frame struct of response packet + */ +typedef struct{ + uint16_t PREFIX; + uint8_t SID; + uint8_t DID; + uint16_t RCM; + uint16_t LEN; + uint16_t RET; + uint8_t payload[0]; +}__attribute__ ((packed)) sRcmPacketHeader_t, *pRcmPacketHeader_t; + + + + +class DFRobot_ID809{ +public: + +//#define FINGERPRINT_CAPACITY 80 //Fingerprint module capacity +#define MODULE_SN_SIZE 16 //Module SN length + + +#define DELALL 0xFF //Delete all fingerprints + +#define CMD_PREFIX_CODE 0xAA55 //Command packet prefix code +#define RCM_PREFIX_CODE 0x55AA //Response packet prefix code +#define CMD_DATA_PREFIX_CODE 0xA55A //Command data packet prefix code +#define RCM_DATA_PREFIX_CODE 0x5AA5 //Response data packet prefix code + +#define CMD_TYPE 0xF0 //Command packet type +#define RCM_TYPE 0xF0 //Response packet type +#define DATA_TYPE 0x0F //Data packet type + +#define CMD_TEST_CONNECTION 0X0001 //Test connection +#define CMD_SET_PARAM 0X0002 //Set parameter +#define CMD_GET_PARAM 0X0003 //Read parameter +#define CMD_DEVICE_INFO 0X0004 //Read device information +#define CMD_SET_MODULE_SN 0X0008 //Set module serial number +#define CMD_GET_MODULE_SN 0X0009 //Read module serial number +#define CMD_ENTER_STANDBY_STATE 0X000C //Enter sleep mode +#define CMD_GET_IMAGE 0X0020 //Capture fingerprint image +#define CMD_FINGER_DETECT 0X0021 //Detect fingerprint + #define CMD_UP_IMAGE_CODE 0X0022 //Upload fingerprint image to host + #define CMD_DOWN_IMAGE 0X0023 //Download fingerprint image to module +#define CMD_SLED_CTRL 0X0024 //Control collector backlight +#define CMD_STORE_CHAR 0X0040 //Save fingerprint template data into fingerprint library +#define CMD_LOAD_CHAR 0X0041 //Read fingerprint in module and save it in RAMBUFFER temporarily + #define CMD_UP_CHAR 0X0042 //Upload the fingerprint template saved in RAMBUFFER to host + #define CMD_DOWN_CHAR 0X0043 //Download fingerprint template to module designated RAMBUFFER +#define CMD_DEL_CHAR 0X0044 //Delete fingerprint in specific ID range +#define CMD_GET_EMPTY_ID 0X0045 //Get the first registerable ID in specific ID range +#define CMD_GET_STATUS 0X0046 //Check if the designated ID has been registered +#define CMD_GET_BROKEN_ID 0X0047 //Check whether there is damaged data in fingerprint library of specific range +#define CMD_GET_ENROLL_COUNT 0X0048 //Get the number of registered fingerprints in specific ID range +#define CMD_GET_ENROLLED_ID_LIST 0X0049 //Get registered ID list +#define CMD_GENERATE 0X0060 //Generate template from the fingerprint images saved in IMAGEBUFFER temporarily +#define CMD_MERGE 0X0061 //Synthesize fingerprint template data +#define CMD_MATCH 0X0062 //Compare templates in 2 designated RAMBUFFER +#define CMD_SEARCH 0X0063 //1:N Recognition in specific ID range +#define CMD_VERIFY 0X0064 //Compare specific RAMBUFFER template with specific ID template in fingerprint library + +#define ERR_SUCCESS 0x00 //Command processed successfully +#define ERR_ID809 0xFF //error + + +public: + + typedef enum{ + eBreathing = 1, //Breathing + eFastBlink, //Quick blink + eKeepsOn, //On + eNormalClose, //Off + eFadeIn, //Fade in + eFadeOut, //Fade out + eSlowBlink //Slow blink + }eLEDMode_t; + + typedef enum{ + eLEDGreen = 1, //green + eLEDRed, //red + eLEDYellow, //yellow + eLEDBlue, //blue + eLEDCyan, //cyan + eLEDMagenta, //magenta + eLEDWhite //white + }eLEDColor_t; + + typedef enum{ + e9600bps = 1, + e19200bps, + e38400bps, + e57600bps, + e115200bps + }eDeviceBaudrate_t; + + typedef enum{ + eErrorSuccess = 0x00, //Command processed successfully + eErrorFail = 0x01, //Command processing failed + eErrorVerify = 0x10, //1:1 Templates comparison in specific ID failed + eErrorIdentify = 0x11, //1:N comparison has been made, no same templates here + eErrorTmplEmpty = 0x12, //No registered template in the designated ID + eErrorTmplNotEmpty = 0x13, //Template already exists in the specified ID + eErrorAllTmplEmpty = 0x14, //No registered Template + eErrorEmptyIDNoexist = 0x15, //No registerable Template ID + eErrorBrokenIDNoexist = 0x16, //No damaged Template + eErrorInvalidTmplData = 0x17, //The designated Template Data is invalid + eErrorDuplicationID = 0x18, //The fingerprint has been registered + eErrorBadQuality = 0x19, //Poor quality fingerprint image + eErrorMergeFail = 0x1A, //Template synthesis failed + eErrorNotAuthorized = 0x1B, //Communication password not authorized + eErrorMemory = 0x1C, //Error in exernal Flash burning + eErrorInvalidTmplNo = 0x1D, //The designated template ID is invalid + eErrorInvalidParam = 0x22, //Incorrect parameter has been used + eErrorTimeOut = 0x23, //Acquisition timeout + eErrorGenCount = 0x25, //Invalid number of fingerprint synthesis + eErrorInvalidBufferID = 0x26, //Wrong Buffer ID value + eErrorFPNotDetected = 0x28, //No fingerprint input into fingerprint reader + eErrorFPCancel = 0x41, //Command cancelled + eErrorRecvLength = 0x42, //Wrong length of recieved data + eErrorRecvCks = 0x43, //Wrong check code + eErrorGatherOut = 0x45, //Exceed upper limit of acquisition times + eErrorRecvTimeout = 0x46 //Communication timeout + }eError_t; + + typedef struct{ + /**< Gesture enumeration variable X */ + eError_t error; + /**< Description about the gesture enumeration variable X */ + const char * description; + }sErrorDescription_t; + +public: + DFRobot_ID809(); + ~DFRobot_ID809(); + + /** + * @brief Init communication port + * @param Software serial or hardware serial + * @return true or false + */ + bool begin(Stream &s_); + + /** + * @brief Test whether the module connection is ok + * @return true or false + */ + bool isConnected(); + + /** + * @brief Set module ID + * @param ID:1-255 + * @return 0(succeed) or ERR_ID809 + */ + uint8_t setDeviceID(uint8_t deviceID); + + /** + * @brief Set module security level + * @param security level:1-5 + * @return 0(succeed) or ERR_ID809 + */ + uint8_t setSecurityLevel(uint8_t securityLevel); + + /** + * @brief Set module fingerprint replication check (Check whether the fingperint has been registered when saving it) + * @param 1(ON) or 0(OFF) + * @return 0(succeed) or ERR_ID809 + */ + uint8_t setDuplicationCheck(uint8_t duplicationCheck); + + /** + * @brief Set module baud rate + * @param Baudrate:in typedef enum eDeviceBaudrate_t + * @return 0(succeed) or ERR_ID809 + */ + uint8_t setBaudrate(eDeviceBaudrate_t baudrate); + + /** + * @brief Set module self-learning function (Update fingeprint when fingerprint comparison succeeds) + * @param 1(ON) or 0(OFF) + * @return 0(succeed) or ERR_ID809 + */ + uint8_t setSelfLearn(uint8_t selfLearn); + + /** + * @brief Read module ID + * @return IDå·:1-255 or ERR_ID809 + */ + uint8_t getDeviceID(); + + /** + * @brief Read module security level + * @return Security level:1-5 or ERR_ID809 + */ + uint8_t getSecurityLevel(); + + /** + * @brief Read module fingerprint replication check status + * @return Status:1(ON), 0(OFF) or ERR_ID809 + */ + uint8_t getDuplicationCheck(); + + /** + * @brief Read module baud rate + * @return Baudrate:in typedef enum eDEVICE_BAUDRATE_t or ERR_ID809 + */ + uint8_t getBaudrate(); + + /** + * @brief Read module self-learning function status + * @return Status:1(ON), 0(OFF) or ERR_ID809 + */ + uint8_t getSelfLearn(); + uint8_t getTemplate(uint16_t id,uint8_t * temp); + uint8_t downLoadTemplate(uint16_t id,uint8_t * temp); + uint8_t getFingerImage(uint8_t *image); + uint8_t downLoadImage(uint16_t id,uint8_t * temp); + uint8_t receiveImageData(uint8_t *image); + uint8_t getQuarterFingerImage(uint8_t *image); + uint8_t contrastTemplate(uint8_t *temp); + /** + * @brief Read device number + * @return Device number + */ + String getDeviceInfo(); + + /** + * @brief Set serial number + * @param String pointer + * @return 0(succeed) or ERR_ID809 + */ + uint8_t setModuleSN(const char* SN); + /** + * @brief Read serial number + * @return Serial number + */ + String getModuleSN(); + + /** + * @brief Set LED + * @param mode:in typedef enum eLEDMode_t + * @param color:in typedef enum eLEDColor_t + * @param blink Count: 00 represents blinking all the time + * @This parameter will only be valid in mode eBreathing, eFastBlink, eSlowBlink + * @return 0(succeed) or ERR_ID809 + */ + uint8_t ctrlLED(eLEDMode_t mode,eLEDColor_t color,uint8_t blinkCount); + + /** + * @brief Detect if there is finger touched + * @return 1(Touched) or 0(No touch) + */ + uint8_t detectFinger(); + + /** + * @brief Get the first registerable ID + * @return Registerable ID or ERR_ID809 + */ + uint8_t getEmptyID(); + + /** + * @brief Check if the ID has been registered + * @return 0(Registered), 1(Unregistered) or ERR_ID809 + */ + uint8_t getStatusID(uint8_t ID); + + /** + * @brief Get the number of registered users + * @return Number of registered users or ERR_ID809 + */ + uint8_t getEnrollCount(); + + /** + * @brief Get registered user list + * @return 0(succeed) or ERR_ID809 + */ + uint8_t getEnrolledIDList(uint8_t* list); + + /** + * @brief Fingerprint acquisition + * @return 0(succeed) or ERR_ID809 + */ + uint8_t collectionFingerprint(uint16_t timeout,int ramNumber = -1); + + /** + * @brief Save fingerprint + * @param Fingerprint ID + * @return 0(succeed) or ERR_ID809 + */ + uint8_t storeFingerprint(uint8_t ID); + + /** + * @brief Delete fingerprint + * @param Delete ID or DELALL(delete all) + * @return 0(succeed) or ERR_ID809 + */ + uint8_t delFingerprint(uint8_t ID); + + /** + * @brief Match the fingerprint with all fingeprints + * @return Successfully matched fingerprint ID, 0(Matching failed) or ERR_ID809 + */ + uint8_t search(); + + /** + * @brief Match the fingerprint with specific fingerprint + * @return Successfully matched fingerprint ID, 0(Matching failed) or ERR_ID809 + */ + uint8_t verify(uint8_t ID); + + /** + * @brief Compare templates in two specific RamBuffers + * @param RamBuffer number + * @param RamBuffer number + * @return 0(succeed) or ERR_ID809 + */ + uint8_t match(uint8_t RamBufferID0, uint8_t RamBufferID1); + + /** + * @brief Get the number of damaged fingerprints + * @return Damaged fingerprint ID or ERR_ID809 + */ + uint8_t getBrokenQuantity(); + + /** + * @brief Get the first damaged fingerprint ID + * @return Damaged fingerprint ID or ERR_ID809 + */ + uint8_t getBrokenID(); + + /** + * @brief Take out fingerprint template, temporarily save into RamBuffer + * @param Fingerprint ID + * @param RamBuffer number 0-2 + * @return 0(succeed) or ERR_ID809 + */ + uint8_t loadFingerprint(uint8_t ID, uint8_t RamBufferID); + + /** + * @brief Enter Standby mode + * @return 0(succeed) or ERR_ID809 + */ + uint8_t enterStandbyState(); + + /** + * @brief Get error information + * @return Text description of error information + */ + String getErrorDescription(); + + bool setDbgSerial(Stream &s_){dbg = &s_; return true;} + uint16_t FINGERPRINT_CAPACITY = 80; +protected: + /** + * @brief Set parameter + * @param Data type+ data + * @return 0(succeed) or ERR_ID809 + */ + uint8_t setParam(uint8_t* data); + + /** + * @brief Read parameter + * @param Data type + * @return data or ERR_ID809 + */ + uint8_t getParam(uint8_t* data); + + /** + * @brief Capture fingerprint image + * @return 0(succeed) or ERR_ID809 + */ + uint8_t getImage(); + + /** + * @brief Take image as template + * @param Ram Buffer number + * @return 0(succeed) or ERR_ID809 + */ + uint8_t generate(uint8_t RamBufferID); + + /** + * @brief Fingerprint synthesis + * @return 0(succeed) or ERR_ID809 + */ + uint8_t merge(); + + /** + * @brief Packing data frame + * @param Data type:CMD_TYPE or DATA_TYPE + * @param Command + * @param Data + * @param Length + * @return Data frame + */ + pCmdPacketHeader_t pack(uint8_t type, uint16_t cmd, const char *payload, uint16_t len); + + /** + * @brief Send data + * @param Data frame + */ + void sendPacket(pCmdPacketHeader_t header); + + /** + * @brief Read byte + * @param Pointer for saving data + * @param Length of data to be received + * @return Actual received data length + */ + size_t readN(void* buf_, size_t len); + + /** + * @brief Read frame header + * @param Frame header struct of response packet + * @return Response packet type:RCM_TYPE,DATA_TYPE or 1(reading timeout) + */ + uint16_t readPrefix( pRcmPacketHeader_t header ); + + /** + * @brief Read data + * @param Pointer for saving data + * @return 0(success) or ERR_ID809 + */ + uint8_t responsePayload(void* buf); + + /** + * @brief Get command packet CKS + * @param Command packet frame + * @return CKS + */ + uint16_t getCmdCKS(pCmdPacketHeader_t packet); + + /** + * @brief Get response packet CKS + * @param Response packet frame + * @return CKS + */ + uint16_t getRcmCKS(pRcmPacketHeader_t packet); + uint8_t store(uint8_t ID); + +private: + Stream *s; + uint8_t buf[20]; //For saving response packet data + pCmdPacketHeader_t sendHeader; + pRcmPacketHeader_t recHeader; + + static const sErrorDescription_t /*PROGMEM*/ errorDescriptionsTable[26]; //Error information list + + uint8_t _number = 0; //Fingerprint acquisistion times + uint8_t _state = 0; //Collect fingerprint state + eError_t _error; //Error code + uint16_t _PacketSize = 0; //Data packet length to be sent +}; + +#endif diff --git a/TestSHA256/lib/SHA256/sha256.c b/TestSHA256/lib/SHA256/sha256.c new file mode 100644 index 0000000000000000000000000000000000000000..cf6601862a39f4f3926deceabf85c80cd4e179df --- /dev/null +++ b/TestSHA256/lib/SHA256/sha256.c @@ -0,0 +1,169 @@ +/********************************************************************* +* Filename: sha256.c +* Author: Brad Conte (brad AT bradconte.com) +* Copyright: +* Disclaimer: This code is presented "as is" without any guarantees. +* Details: Implementation of the SHA-256 hashing algorithm. + SHA-256 is one of the three algorithms in the SHA2 + specification. The others, SHA-384 and SHA-512, are not + offered in this implementation. + Algorithm specification can be found here: + * http://csrc.nist.gov/publications/fips/fips180-2/fips180-2withchangenotice.pdf + This implementation uses little endian byte order. +*********************************************************************/ + +/*************************** HEADER FILES ***************************/ +#include <stdlib.h> +#include <string.h> +//#include <memory.h> +#include "sha256.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + + +/****************************** MACROS ******************************/ +#define ROTLEFT(a,b) (((a) << (b)) | ((a) >> (32-(b)))) +#define ROTRIGHT(a,b) (((a) >> (b)) | ((a) << (32-(b)))) + +#define CH(x,y,z) (((x) & (y)) ^ (~(x) & (z))) +#define MAJ(x,y,z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z))) +#define EP0(x) (ROTRIGHT(x,2) ^ ROTRIGHT(x,13) ^ ROTRIGHT(x,22)) +#define EP1(x) (ROTRIGHT(x,6) ^ ROTRIGHT(x,11) ^ ROTRIGHT(x,25)) +#define SIG0(x) (ROTRIGHT(x,7) ^ ROTRIGHT(x,18) ^ ((x) >> 3)) +#define SIG1(x) (ROTRIGHT(x,17) ^ ROTRIGHT(x,19) ^ ((x) >> 10)) + +/**************************** VARIABLES *****************************/ +static const WORD k[64] = { + 0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5, + 0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174, + 0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da, + 0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967, + 0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85, + 0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070, + 0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3, + 0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2 +}; + +/*********************** FUNCTION DEFINITIONS ***********************/ +void sha256_transform(SHA256_CTX *ctx, const BYTE data[]) +{ + WORD a, b, c, d, e, f, g, h, i, j, t1, t2, m[64]; + + for (i = 0, j = 0; i < 16; ++i, j += 4) + m[i] = (data[j] << 24) | (data[j + 1] << 16) | (data[j + 2] << 8) | (data[j + 3]); + for ( ; i < 64; ++i) + m[i] = SIG1(m[i - 2]) + m[i - 7] + SIG0(m[i - 15]) + m[i - 16]; + + a = ctx->state[0]; + b = ctx->state[1]; + c = ctx->state[2]; + d = ctx->state[3]; + e = ctx->state[4]; + f = ctx->state[5]; + g = ctx->state[6]; + h = ctx->state[7]; + + for (i = 0; i < 64; ++i) { + t1 = h + EP1(e) + CH(e,f,g) + k[i] + m[i]; + t2 = EP0(a) + MAJ(a,b,c); + h = g; + g = f; + f = e; + e = d + t1; + d = c; + c = b; + b = a; + a = t1 + t2; + } + + ctx->state[0] += a; + ctx->state[1] += b; + ctx->state[2] += c; + ctx->state[3] += d; + ctx->state[4] += e; + ctx->state[5] += f; + ctx->state[6] += g; + ctx->state[7] += h; +} + +void sha256_init(SHA256_CTX *ctx) +{ + ctx->datalen = 0; + ctx->bitlen = 0; + ctx->state[0] = 0x6a09e667; + ctx->state[1] = 0xbb67ae85; + ctx->state[2] = 0x3c6ef372; + ctx->state[3] = 0xa54ff53a; + ctx->state[4] = 0x510e527f; + ctx->state[5] = 0x9b05688c; + ctx->state[6] = 0x1f83d9ab; + ctx->state[7] = 0x5be0cd19; +} + +void sha256_update(SHA256_CTX *ctx, const BYTE data[], size_t len) +{ + WORD i; + + for (i = 0; i < len; ++i) { + ctx->data[ctx->datalen] = data[i]; + ctx->datalen++; + if (ctx->datalen == 64) { + sha256_transform(ctx, ctx->data); + ctx->bitlen += 512; + ctx->datalen = 0; + } + } +} + +void sha256_final(SHA256_CTX *ctx, BYTE hash[]) +{ + WORD i; + + i = ctx->datalen; + + // Pad whatever data is left in the buffer. + if (ctx->datalen < 56) { + ctx->data[i++] = 0x80; + while (i < 56) + ctx->data[i++] = 0x00; + } + else { + ctx->data[i++] = 0x80; + while (i < 64) + ctx->data[i++] = 0x00; + sha256_transform(ctx, ctx->data); + memset(ctx->data, 0, 56); + } + + // Append to the padding the total message's length in bits and transform. + ctx->bitlen += ctx->datalen * 8; + ctx->data[63] = ctx->bitlen; + ctx->data[62] = ctx->bitlen >> 8; + ctx->data[61] = ctx->bitlen >> 16; + ctx->data[60] = ctx->bitlen >> 24; + ctx->data[59] = ctx->bitlen >> 32; + ctx->data[58] = ctx->bitlen >> 40; + ctx->data[57] = ctx->bitlen >> 48; + ctx->data[56] = ctx->bitlen >> 56; + sha256_transform(ctx, ctx->data); + + // Since this implementation uses little endian byte ordering and SHA uses big endian, + // reverse all the bytes when copying the final state to the output hash. + for (i = 0; i < 4; ++i) { + hash[i] = (ctx->state[0] >> (24 - i * 8)) & 0x000000ff; + hash[i + 4] = (ctx->state[1] >> (24 - i * 8)) & 0x000000ff; + hash[i + 8] = (ctx->state[2] >> (24 - i * 8)) & 0x000000ff; + hash[i + 12] = (ctx->state[3] >> (24 - i * 8)) & 0x000000ff; + hash[i + 16] = (ctx->state[4] >> (24 - i * 8)) & 0x000000ff; + hash[i + 20] = (ctx->state[5] >> (24 - i * 8)) & 0x000000ff; + hash[i + 24] = (ctx->state[6] >> (24 - i * 8)) & 0x000000ff; + hash[i + 28] = (ctx->state[7] >> (24 - i * 8)) & 0x000000ff; + } +} + +#ifdef __cplusplus +} +#endif diff --git a/TestSHA256/lib/SHA256/sha256.h b/TestSHA256/lib/SHA256/sha256.h new file mode 100644 index 0000000000000000000000000000000000000000..bc64c5f818004f9806c8179aac3b44ea3b25ead7 --- /dev/null +++ b/TestSHA256/lib/SHA256/sha256.h @@ -0,0 +1,48 @@ + +/********************************************************************* +* Filename: sha256.h +* Author: Brad Conte (brad AT bradconte.com) +* Copyright: +* Disclaimer: This code is presented "as is" without any guarantees. +* Details: Defines the API for the corresponding SHA1 implementation. +*********************************************************************/ + +#ifndef SHA256_H +#define SHA256_H + +/*************************** HEADER FILES ***************************/ +#include <stddef.h> + +/****************************** MACROS ******************************/ +#define SHA256_BLOCK_SIZE 32 // SHA256 outputs a 32 byte digest + + +/**************************** DATA TYPES ****************************/ +typedef unsigned char BYTE; // 8-bit byte +typedef unsigned int WORD; // 32-bit word, change to "long" for 16-bit machines + +typedef struct { + BYTE data[64]; + WORD datalen; + unsigned long long bitlen; + WORD state[8]; +} SHA256_CTX; + +/*********************** FUNCTION DECLARATIONS **********************/ + +#ifdef __cplusplus +extern "C" +{ +#endif + + +void sha256_init(SHA256_CTX *ctx); +void sha256_update(SHA256_CTX *ctx, const BYTE data[], size_t len); +void sha256_final(SHA256_CTX *ctx, BYTE hash[]); + +#ifdef __cplusplus +} +#endif + + +#endif // SHA256_H diff --git a/TestSHA256/platformio.ini b/TestSHA256/platformio.ini new file mode 100644 index 0000000000000000000000000000000000000000..4dc36fcd7d48ded0281ea16d321cea96bb1d8e68 --- /dev/null +++ b/TestSHA256/platformio.ini @@ -0,0 +1,9 @@ +[env:Teensy_SHA] + +platform = teensy +framework = arduino +board = teensy31 + +lib_deps = + lib/SHA256 + lib/DFRobot_ID809 diff --git a/TestSHA256/src/main.cpp b/TestSHA256/src/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7fc6a6be7619ced6c67930b0ed8f69c7629d9eba --- /dev/null +++ b/TestSHA256/src/main.cpp @@ -0,0 +1,178 @@ +#include <Arduino.h> +#include <sha256.h> +#include <DFRobot_ID809.h> + +// use serial3 as interface with fingerprint +// sensor . +#define FPSerial Serial3 + +// define buillt_in led +#define BUILTIN_LED 13 +// Collect the fingerprint 3 times +#define COLLECT_NUMBER 3 +#define SHA256_SIZE 32 + +/*------Funciotion dclarations----------*/ +// function to blink blitin_led +// to make sure that code is working +void blink_led(); + +/*------Global variables--------------*/ +DFRobot_ID809 fingerprint; +byte hash[SHA256_SIZE]; + +uint8_t ID, i, ret; +uint8_t temp[1008]; + +void compute_hash() { + + SHA256_CTX ctx; + sha256_init(&ctx); + sha256_update(&ctx, temp, sizeof(temp)); + sha256_final(&ctx, hash); + // SHA256 hasher; + // hasher.doUpdate(temp, sizeof(temp)); + // hasher.doFinal(hash); +} + +void setup() { + // config led_pin as output + pinMode(BUILTIN_LED, OUTPUT); + // use serial port to print the baud rate + Serial.begin(9600); + + FPSerial.begin(115200); + fingerprint.begin(FPSerial); + + while (fingerprint.isConnected() == false) { + Serial.println("Communication with the device failed"); + delay(1000); + } + + // fingerprint.getTemplate(1, temp); + + // for(uint8_t i=0; i<1008; i++) { + // Serial.print(i); + // Serial.print(": "); + // Serial.println(temp[i]); + // delay(100); + // } + + // compute_hash(); + // Serial.println("------------------------"); + // for (uint8_t i = 0; i < SHA256_SIZE; i++) { + // + // if (hash[i] < 0x10) { + // Serial.print('0'); + // } + // Serial.print(hash[i], HEX); + // Serial.print(" "); + // } + // Serial.println("------------------------"); +} + +void loop() { + + uint8_t ret = 0; + /*Set fingerprint LED ring mode, color, and number of blinks + Can be set as follows: + Parameter 1:<LEDMode> + eBreathing eFastBlink eKeepsOn eNormalClose + eFadeIn eFadeOut eSlowBlink + Parameter 2:<LEDColor> + eLEDGreen eLEDRed eLEDYellow eLEDBlue + eLEDCyan eLEDMagenta eLEDWhite + Parameter 3:<number of blinks> 0 represents blinking all the time + This parameter will only be valid in mode eBreathing, eFastBlink, eSlowBlink + */ + fingerprint.ctrlLED(/*LEDMode = */ fingerprint.eBreathing, + /*LEDColor = */ fingerprint.eLEDBlue, + /*blinkCount = */ 0); + Serial.println("Please press down your finger"); + /*Capture fingerprint image, Disable the collection timeout function + If succeed return 0, otherwise return ERR_ID809 + */ + if ((fingerprint.collectionFingerprint(/*timeout=*/0)) != ERR_ID809) { + /*Set fingerprint LED ring to quick blink in yellow 3 times*/ + fingerprint.ctrlLED(/*LEDMode = */ fingerprint.eFastBlink, + /*LEDColor = */ fingerprint.eLEDYellow, + /*blinkCount = */ 3); + Serial.println("Capturing succeeds"); + Serial.println("Please release your finger"); + /*Wait for finger to release + Return 1 when finger is detected, otherwise return 0 + */ + while (fingerprint.detectFinger()) + ; + + /*Compare the captured fingerprint with all the fingerprints in the + fingerprint library Return fingerprint ID(1-80) if succeed, return 0 when + failed + */ + ret = fingerprint.search(); + /*Compare the captured fingerprint with a fingerprint of specific ID + Return fingerprint ID(1-80) if succeed, return 0 when failed + */ + // ret = fingerprint.verify(/*Fingerprint ID = */1); + if (ret != 0) { + /*Set fingerprint LED ring to always ON in green */ + fingerprint.ctrlLED(/*LEDMode = */ fingerprint.eKeepsOn, + /*LEDColor = */ fingerprint.eLEDGreen, + /*blinkCount = */ 0); + Serial.print("Matching succeeds,ID="); + Serial.println(ret); + + fingerprint.getTemplate(ret, temp); + + // for(uint8_t i=0; i<1008; i++) { + // Serial.print(i); + // Serial.print(": "); + // Serial.println(temp[i]); + // delay(100); + // } + + compute_hash(); + Serial.println("--------------------"); + for (uint8_t i = 0; i < SHA256_SIZE; i++) { + + if (hash[i] < 0x10) { + Serial.print('0'); + } + Serial.print(hash[i], HEX); + Serial.print(" "); + } + Serial.println("---------------------"); + for (uint16_t i = 0; i < 1008; i++) { + Serial.print(temp[i], HEX); + Serial.print(" "); + } + + } else { + /*Set fingerprint LED ring to always ON in red*/ + fingerprint.ctrlLED(/*LEDMode = */ fingerprint.eKeepsOn, + /*LEDColor = */ fingerprint.eLEDRed, + /*blinkCount = */ 0); + Serial.println("Matching fails"); + } + } else { + Serial.println("Capturing fails"); + /*Get error code information*/ + // desc = fingerprint.getErrorDescription(); + // Serial.println(desc); + } + Serial.println("-----------------------------"); + delay(1000); + /*Set the fingerprint LED ring as blue breathing light*/ + fingerprint.ctrlLED(/*LEDMode = */ fingerprint.eBreathing, + /*LEDColor = */ fingerprint.eLEDBlue, + /*blinkCount = */ 0); + + blink_led(); +} + +void blink_led() { + digitalWrite(BUILTIN_LED, HIGH); + delay(500); + digitalWrite(BUILTIN_LED, LOW); + delay(500); +}