Compare commits

...

532 Commits

Author SHA1 Message Date
2fa88966b4 Merge branch 'release/v1.2.0' 2015-03-20 22:30:05 +02:00
cef16ab1c0 Version bump to 1.2.0 (issues #5 #100 #105 #112 #113 #114 #115 #116 #117 #120 #122 #125) 2015-03-20 22:29:51 +02:00
e82f8dc086 Add 4-th custom definition which is equal to "enable_prompts" setting 2015-03-20 22:29:29 +02:00
a8a9451c73 Fix re-arranging the *.ino/pde files when converting to *.cpp // Resolve #100 2015-03-20 21:55:08 +02:00
b4a253110d Add supported platforms to framework and vice versa 2015-03-20 21:44:26 +02:00
4c1fb0d2b2 Merge pull request #126 from valeros/develop
Add full support for MBED libraries: rtos, eth, dsp, fat, usb
2015-03-20 21:06:23 +02:00
726887732f Add full support for MBED libraries: rtos, eth, dsp, fat, usb 2015-03-20 19:46:13 +02:00
7cfb9db046 Typo fix 2015-03-20 17:23:46 +02:00
642e1ef7bc Typo fix 2015-03-20 17:22:59 +02:00
4958e24ffc Add information about platforms and frameworks 2015-03-18 23:26:53 +02:00
a70ecdb1be Fix uploading for atmelsam development platform 2015-03-18 23:17:39 +02:00
3fabd01e1b Fix SSL InsecureRequestWarning (avoid for invalid commands) 2015-03-18 23:02:04 +02:00
347dbb6569 Fix SSL InsecureRequestWarning 2015-03-18 15:57:49 +02:00
2e7e7c4e74 Add "Frameworks" page to docs and web-site // Resolve #115 2015-03-17 00:54:42 +02:00
575048faa7 Add link to PlatformIO Boards Explorer 2015-03-16 23:08:59 +02:00
744c6f12a8 Merge pull request #124 from valeros/develop
Add support for "panStamp" boards // Resolve #117
2015-03-16 23:03:16 +02:00
9c5ef02484 Merge branch 'feature/panStamp' into develop 2015-03-16 19:37:44 +02:00
4782c58752 Merge branch 'develop' of https://github.com/ivankravets/platformio into develop 2015-03-16 19:37:19 +02:00
ccc411fb47 Add support for "panStamp" boards // Resolve #117 2015-03-16 19:24:51 +02:00
e76efef6c7 Merge branch 'develop' of https://github.com/ivankravets/platformio into feature/panStamp 2015-03-16 18:40:58 +02:00
f3f16b56b2 Rename "opencm3" framework to "libopencm3" // Resolve #120 2015-03-16 17:34:52 +02:00
49ab5e718e Add "name" and vendor links to frameworks 2015-03-16 17:30:23 +02:00
19822ff08f Introduce platform names 2015-03-16 14:15:57 +02:00
0bfc6dfe3e Split platform __doc__ to description and vedor url 2015-03-16 12:47:43 +02:00
39f052a57d Merge pull request #123 from valeros/develop
Fix mbed framework // Resolve #122
2015-03-16 12:42:06 +02:00
c536aca961 Add serial port example with mbed framework 2015-03-16 12:12:13 +02:00
57b84789c0 Fix "mbed" framework // Resolve #122 2015-03-16 12:10:15 +02:00
cbd67364f6 Convert "frameworks" to array 2015-03-15 21:47:19 +02:00
7b1aff1653 Merge branch 'develop' of https://github.com/ivankravets/platformio into develop 2015-03-15 21:20:17 +02:00
0ab6b08ff3 Update requests to 2.6.0 2015-03-15 17:59:20 +02:00
c00fecf992 Avoid direct access to platform packages 2015-03-14 00:02:09 +02:00
bd9ee0c27a Introduce /packages and /packages/manifest API 2015-03-14 00:01:32 +02:00
6fe7d952cf Merge branch 'develop' of https://github.com/ivankravets/platformio into develop 2015-03-13 22:36:27 +02:00
808c806ab9 Merge pull request #121 from valeros/develop
Improve support for mbed framework
2015-03-13 21:48:32 +02:00
e19f928794 Fix PyLint warnings 2015-03-13 20:54:22 +02:00
040c6371cd Merge branch 'develop' of https://github.com/ivankravets/platformio into develop 2015-03-13 20:29:16 +02:00
0282c74165 Improve support for mbed framework 2015-03-13 20:27:46 +02:00
8359408e54 Allow multiple frameworks in Project Configuration File 2015-03-13 19:13:36 +02:00
01f65ac4b0 Add information about PlatformIO Web 2.0 2015-03-13 19:06:35 +02:00
4e1e7ed4b5 Enhance "platformio search" command 2015-03-13 18:50:04 +02:00
91b6ef0504 Add example with mbed-enabled boards 2015-03-13 17:59:15 +02:00
519ed04e70 Sort installed libs by ID 2015-03-13 17:58:45 +02:00
4c525e1704 Fix pioversion_to_instr for Py2.6 2015-03-13 17:54:24 +02:00
042816616e Automatically append -DPLATFORMIO to builder // Resolve #105 2015-03-13 17:21:07 +02:00
d89e55e5d7 Disable uploading using mass storage disk for Mac OS X 10.10 (issue with FAT12) 2015-03-13 13:19:00 +02:00
52e1345c4a Improve project description and keywords 2015-03-13 00:19:06 +02:00
f4c21be953 Improve uploading firmware to mbed-enabled mass storages 2015-03-13 00:02:31 +02:00
cd06f3ed43 Add links to credit-card sized computers 2015-03-12 23:32:28 +02:00
b74288f2c4 Merge pull request #118 from valeros/develop
Initial support for mbed; Added Frameworks to doc
2015-03-11 22:05:47 +02:00
a0c3c25721 Fix mbed case for UNIX OS 2015-03-11 20:45:50 +02:00
c00700b7cb Search over platform packages 2015-03-11 20:45:31 +02:00
08808be62b Fix "frameworks" field to JSON array 2015-03-11 20:45:11 +02:00
ce923b6b58 Avoid multiple white spaces 2015-03-11 19:32:53 +02:00
286610b8c5 Merge branch 'develop' of https://github.com/ivankravets/platformio into develop 2015-03-11 18:20:31 +02:00
b511df0bd4 Update "Platforms" documentation 2015-03-11 18:19:36 +02:00
fe797a3265 Add "Frameworks" documentation // Resolve #115 2015-03-11 18:19:07 +02:00
7b4680ef6a Add script for dynamically generating RST documents. Update platforms and frameworks documentation // Resolve 114 2015-03-11 18:12:58 +02:00
898a9c5601 Add "get_frameworks" function 2015-03-11 18:08:52 +02:00
e22890ac18 Add "vendor" and "url" field to board options, change "framework" field to "frameworks" // Resolve #113 2015-03-11 17:56:46 +02:00
af9c23ad87 Automatically generate environment with first supported framework 2015-03-11 17:53:46 +02:00
7e58eb8094 Add checking incompatibility between board and frameworks // Resolve #112 2015-03-11 17:50:15 +02:00
326cf0da7d Add "vendor" and "url" field to board options, change "framework" field to "frameworks" // Resolve #113 2015-03-11 17:48:04 +02:00
d4740c4daf Update "setuptools" while install PlatformIO 2015-03-10 13:23:49 +02:00
19a9f153b9 Add configuration example for VIM/YouCompleteMe by @ajford 2015-03-09 22:06:19 +02:00
36c926bed7 Add Cloud Compiling and Continuos Integration 2015-03-09 15:45:46 +02:00
dc7e98c383 Merge branch 'feature/mbed-platform' into develop 2015-03-09 12:31:02 +02:00
413779f0a1 Merge branch 'develop' of https://github.com/ivankravets/platformio into feature/mbed-platform 2015-03-09 12:28:38 +02:00
d3b9322d3b Initial support for MBED Framework 2015-03-09 12:27:54 +02:00
4a8cd9914b Add new platforms and boards: Freescale, Nordic, NXP and etc. 2015-03-09 12:27:30 +02:00
5fa0a176a7 Refactor CORELIBS per platform 2015-03-09 12:22:24 +02:00
13455987ae Rename "stm32" platform to "ststm32" 2015-03-09 12:18:46 +02:00
6742629efb Change options to references via titles 2015-03-06 19:22:20 +02:00
2224f98d2d Cache long command for "gcc-ar" 2015-03-06 19:05:41 +02:00
e4627ec9ac Merge branch 'release/v1.1.0' 2015-03-05 15:05:40 +02:00
d00740237b Merge branch 'release/v1.1.0' into develop 2015-03-05 15:05:40 +02:00
7de9109437 Version bump to 1.1.0 (issues #102 #103 #106) 2015-03-05 15:05:28 +02:00
e0f2bcdeaf Resolve #133: Disabled "prompts" automatically for *Continuous Integration* systems 2015-03-05 14:48:56 +02:00
ae92cdedea Implemented PLATFORMIO_* environment variables 2015-03-05 01:36:31 +02:00
21c60fdd99 Hide PyLint warning with undefined WindowsError exception 2015-03-04 22:27:07 +02:00
7756504c92 Fix WindowsError where the process cannot access the file 2015-03-04 22:18:05 +02:00
386ad9a94b Avoid problem with long command for "gcc-ar" under Windows 2015-03-04 21:51:41 +02:00
6f19839920 Split PlatformIO build tool to "core" and "upload" 2015-03-04 21:21:10 +02:00
442da36115 Added support for "SainSmart" boards to "atmelsam" development platform 2015-03-04 21:06:35 +02:00
4d5c125d82 Change example from "pro16MHzatmega168" to "pro16MHzatmega328" 2015-03-04 21:05:20 +02:00
c55f4d35ba Merge pull request #109 from valeros/develop
Add "require_upload_port" board option // Resolve #107
2015-03-04 15:07:04 +02:00
abf0f2d5d6 Fix Digistump boards frequency designation 2015-03-04 14:47:21 +02:00
8e62d9ace3 Add SainSmart Due board 2015-03-04 14:12:43 +02:00
7d63d6c77c Add second upload method through native USB Port for SAM-based boards 2015-03-04 14:11:50 +02:00
148018749a Add "require_upload_port" board option 2015-03-04 13:58:20 +02:00
f058506bc4 Fix firmware uploading for "atmelavr" boards which work within "usbtiny" protocol 2015-03-02 23:17:45 +02:00
3a45d443a1 Sort platforms 2015-02-28 15:34:53 +02:00
beb68fa836 Correct PyPi version to 1.0.1 2015-02-28 11:40:09 +02:00
8b9b978db0 Start 1.1.0-dev 2015-02-28 00:08:19 +02:00
6dddf77774 Merge branch 'release/v1.0.0' into develop 2015-02-27 23:06:31 +02:00
c4967243dc Merge branch 'release/v1.0.0' 2015-02-27 23:06:30 +02:00
637a43d6f4 Correction to supported platforms 2015-02-27 23:02:44 +02:00
ce4ce67607 Add keywords and extend platforms list 2015-02-27 22:56:22 +02:00
f3f0979f92 Change development status from beta to Production/Stable 2015-02-27 22:40:15 +02:00
05b722faa1 Correct documentation links 2015-02-27 22:28:38 +02:00
a1c7fa9092 Change badges style to flat 2015-02-27 00:55:00 +02:00
aba68a9c3f Merge branch 'develop' of https://github.com/ivankravets/platformio into develop 2015-02-25 23:58:27 +02:00
35ccefae87 Add libOpenCM3 to history 2015-02-25 23:58:13 +02:00
4168fb6dcb Remove IDE help 2015-02-25 21:36:01 +02:00
6d8d87dfbc Update development status of PlatformIO from "Beta" to "Production/Stable" 2015-02-25 21:22:54 +02:00
8bc8bdd6bd Update requests to 2.5.3 2015-02-25 18:35:41 +02:00
0102e7e195 Merge pull request #99 from valeros/develop
Extend validation of package for SHA1 // Resolve #69
2015-02-25 18:34:48 +02:00
fbd3d956f7 Add "platformio-udev" rules 2015-02-25 18:33:34 +02:00
cd764d4b10 Skip testing of package if SF is offline 2015-02-25 18:32:33 +02:00
03636ad4ae Merge branch 'develop' of https://github.com/ivankravets/platformio into develop 2015-02-25 09:55:33 +02:00
e90e641941 Add Teensy to Wiring Blink example 2015-02-25 00:22:24 +02:00
7a311ff503 Minor fixes 2015-02-24 23:06:58 +02:00
7c0b187ca0 Extend validation of package for SHA1 // Resolve #69 2015-02-24 20:11:57 +02:00
e2f079fc1b Merge pull request #98 from valeros/develop
Improve building of ASM files; Update Teensy Core to 1.21
2015-02-24 19:17:58 +02:00
f12611e27c Fix PyLint warning 2015-02-24 18:53:20 +02:00
9562e2456b Update Teensy Core to 1.21 2015-02-24 18:15:45 +02:00
fedb7527f4 Improve building of ASM files 2015-02-24 18:15:17 +02:00
d142b6e6d1 Merge branch 'develop' of https://github.com/ivankravets/platformio into develop 2015-02-24 12:47:28 +02:00
7948237c94 Fix "Welcome" for upgrading 2015-02-24 12:47:12 +02:00
a18e151fa4 Update requests to 2.5.2 2015-02-24 10:19:30 +02:00
1fc85d3d1d Fill documentation with the new platforms, boards and etc. 2015-02-23 23:47:44 +02:00
7accb86ece Sort search result by platform type 2015-02-23 23:36:19 +02:00
73af0eed3c Add "application/octet-stream" mime type for package 2015-02-23 23:08:42 +02:00
9bde156294 Merge pull request #97 from valeros/develop
Merge Digistump platform to "atmelavr" and "atmelsam"
2015-02-23 22:39:30 +02:00
6f634e76e7 Re-group examples 2015-02-23 22:37:12 +02:00
b60552e264 Fix builder for assembling files 2015-02-23 22:36:57 +02:00
6d86f72060 Merge Digistump platform to "atmelavr" and "atmelsam" 2015-02-23 22:36:21 +02:00
eceedb879b Improve upgrading to 1.0.0 2015-02-23 21:25:59 +02:00
d90933d014 Merge pull request #96 from valeros/develop
Add documentation for Teensy, STM32 and Atmel SAM platforms; Add Digispark boards to Atmel AVR platform
2015-02-23 21:06:19 +02:00
efb02aa056 Merge branch 'develop' of https://github.com/ivankravets/platformio into develop 2015-02-23 21:04:21 +02:00
d28430d8ae Add documentation for Teensy, STM32 and Atmel SAM platforms; Add Digispark boards to Atmel AVR platform 2015-02-23 21:04:08 +02:00
90f17ce6fb Switch to DefaultEnvironment in SCons scripts 2015-02-23 21:02:40 +02:00
aa578fd8ec Fix ROM size 2015-02-23 21:00:27 +02:00
45e8251479 Improve firmware uploading and auto detecting of UPLOAD_PORT // Resolve #93 2015-02-23 19:01:03 +02:00
aab282061c Merge pull request #95 from valeros/develop
Update digistump uploader
2015-02-23 16:55:30 +02:00
b79d1944f2 Merge pull request #94 from valeros/develop
Add example for Engduino boards // Resolve #76
2015-02-23 16:52:03 +02:00
f3251342b4 Update atmelsam uploader options 2015-02-23 16:49:01 +02:00
6a42e1de90 Update digistump uploader 2015-02-23 16:48:26 +02:00
0487825e94 Remove note about Engduino library 2015-02-23 14:47:58 +02:00
dcb1590e57 Append new lines 2015-02-23 14:29:10 +02:00
6e0ebdbc94 Add example for Engduino boards // Resolve #76 2015-02-23 14:25:11 +02:00
2ac6d63ffc Fix Python 2.6 support 2015-02-23 11:50:14 +02:00
d1ca17c406 Fix uploading for "atmelavr" platform // Resolve #92 2015-02-23 01:06:50 +02:00
f86a33c991 Remove hook with SF & packages manifest 2015-02-22 23:31:51 +02:00
46ae4c1a83 Add src_dir option to [platformio] section of platformio.ini which allows to redefine location to project’s source directory // Resolve #83 2015-02-22 22:24:22 +02:00
e17ce83499 Refactor tests with Py.Test's fixtures // Resolve #2 2015-02-21 15:15:00 +02:00
a4926f3c28 Enable stdout capturing for tests by Py.Test 2015-02-21 15:14:25 +02:00
06b009deaa Merge pull request #90 from valeros/develop
Cover package manifest with tests // Issue #69
2015-02-20 22:06:03 +02:00
5b9504d57a Highlight exceptions/errors in red color 2015-02-20 22:02:38 +02:00
05376f873d Cover package manifest with tests // Issue #69 2015-02-20 21:02:10 +02:00
bf059b8b78 Cover "lib" commands with tests 2015-02-20 20:31:59 +02:00
620e5e81c7 Merge pull request #89 from valeros/develop
Cover "list", "search" and "settings" commands with tests
2015-02-20 16:43:06 +02:00
18dd64df88 Cover "list", "search" and "settings" commands with tests 2015-02-20 16:41:42 +02:00
4da8630578 Merge pull request #88 from valeros/develop
Fix CMSIS path for atmelsam platform
2015-02-20 13:50:44 +02:00
442adc1919 Cover "init" and "boards" commands with tests 2015-02-20 13:48:17 +02:00
751a4b9883 Fix CMSIS path for atmelsam platform 2015-02-20 13:19:48 +02:00
6e820afd74 Fix detection of Travis instance 2015-02-19 22:25:40 +02:00
0d7d2ce0b4 Disable Travis Python 2.6 iteration 2015-02-19 22:25:03 +02:00
9a8abaf02b Add "docs" task 2015-02-19 22:05:39 +02:00
a394db1ce1 Refactor build evironments to be compatible with multiple Python versions 2015-02-19 22:04:39 +02:00
2d53d2100d Fix bug with invalid process's "return code" when PlatformIO has internal error 2015-02-19 22:02:50 +02:00
1fc6b222ec Added --json-output option to platformio search command 2015-02-19 19:16:46 +02:00
3f2faeea82 Add default framework for Adafruit boards 2015-02-19 17:56:23 +02:00
a1a5995210 Fix Raspduino extra flags 2015-02-19 17:47:50 +02:00
9a17c6870b Move setup logic for PlatformIO to py.test conf 2015-02-19 17:23:22 +02:00
baf34b37d9 Add default framework per board 2015-02-19 17:20:08 +02:00
d02eb97eeb Fix setting boolean value 2015-02-19 13:49:12 +02:00
8baf2ce241 Merge pull request #87 from valeros/develop
Fix teensy firmware file format
2015-02-19 11:06:24 +02:00
239e1f3fe9 Fix teensy firmware file format 2015-02-19 10:38:09 +02:00
8374199fae Merge pull request #86 from valeros/develop
Typos fix
2015-02-18 20:21:47 +02:00
591efc7257 Typos fix 2015-02-18 20:21:20 +02:00
717d8596ec Merge pull request #85 from valeros/develop
Refactor build scripts for development platforms
2015-02-18 20:13:00 +02:00
9501329526 Refactor build scripts for development platforms 2015-02-18 20:11:52 +02:00
86260a48ba Create LDSCRIPT_PATH Scons env variable 2015-02-18 20:03:49 +02:00
eb4756360a Define MCU & CPU per board 2015-02-18 20:01:39 +02:00
256834be48 Merge pull request #84 from valeros/develop
Add support for Digistump and improve Atmel SAM development platforms
2015-02-17 21:26:53 +02:00
460e896b8f Merge branch 'feature/digistump-platform' into develop 2015-02-17 20:18:48 +02:00
ade673d546 Improve support of Atmel SAM platform 2015-02-17 20:17:33 +02:00
ed5e843893 Add support for Digistump development platform 2015-02-17 20:14:16 +02:00
a03d2382af Grant libs with high priority for C Preprocessor when scan includes 2015-02-17 20:02:57 +02:00
870ce7e0a2 Fix PyLint warning 2015-02-16 23:31:47 +02:00
69d952ea65 Fixed SCons warning: Two different environments were specified for target // Resolve #77 2015-02-16 23:17:22 +02:00
0d2d6cc17e Improve error reporting when upload port isn't defined 2015-02-16 23:16:48 +02:00
be6cdc09d9 Merge pull request #80 from valeros/develop
Add support for Adafruit boards: Flora and Trinkets
2015-02-16 20:45:58 +02:00
63c92152d9 Merge branch 'feature/adafruit-boards' into develop 2015-02-16 20:24:45 +02:00
c9ed663ec5 Add support for Adafruit boards: Flora and Trinkets 2015-02-16 20:23:32 +02:00
45e7fcd106 Remove "SERIALNUM" define for Teensy 2 2015-02-16 20:22:29 +02:00
3f05146de8 Fix Arduino Due ROM & RAM size 2015-02-16 19:32:17 +02:00
9a9b2d8bae Merge pull request #79 from valeros/develop
Add example for teensy boards
2015-02-16 18:05:18 +02:00
639ee9fc47 Add example for teensy boards 2015-02-16 17:35:40 +02:00
fc7e09b8c4 Cache PlatformIO home directory 2015-02-16 17:31:25 +02:00
79d3ad245f Fix PyLint warnings 2015-02-16 15:47:34 +02:00
ca266e81ef Merge pull request #78 from valeros/develop
Update STM32 examples
2015-02-16 15:36:48 +02:00
2b924d1573 Update STM32 examples 2015-02-16 15:34:45 +02:00
00e95dbabc Correct divisor between multiple envs 2015-02-16 11:08:07 +02:00
983b629d23 Implement asynchronous output for build process 2015-02-15 23:53:15 +02:00
0f070d1b78 Implement asynchronous command execution (AsyncPipe+subprocess) 2015-02-15 23:48:04 +02:00
dc61722907 Handle "AbortedByUser" exception 2015-02-15 23:39:02 +02:00
83dfcf6ac2 Remove external rebooter for Teensy CLI 2015-02-15 23:38:11 +02:00
5a32f88dee Test all boards only for the internal libs 2015-02-15 21:37:19 +02:00
9914fc1122 Explain how to install development version of PlatformIO 2015-02-15 21:25:49 +02:00
beab1525a9 Add contents 2015-02-15 21:12:25 +02:00
c6b79f13c3 Add optional $UNIX_TIME variable to build environment 2015-02-15 18:18:11 +02:00
22257e0351 Replace "Unknown board..." message with appropriate exception 2015-02-15 18:02:59 +02:00
030eddb244 Add alias to "tool-teensy" 2015-02-15 16:00:19 +02:00
0047c79fcd Add missed "tool-teensy" to Teensy development platform 2015-02-15 15:58:53 +02:00
cf925b0338 Improve "run" command: env details, timing // Resolve #74 2015-02-15 00:27:28 +02:00
2093960719 Setup minimal "click" version to 3.0 2015-02-15 00:10:59 +02:00
8fffc5ee9c Pass main exceptions to STDERR 2015-02-14 22:26:13 +02:00
88f0b51312 Enable linker "cyclic dependencies" for all platforms 2015-02-14 22:14:49 +02:00
2bfb1d5569 Remove ino-converted file 2015-02-14 20:18:34 +02:00
7a3b43040f Make examples cross-boards, add README 2015-02-14 20:17:04 +02:00
d2ccbf7b7a Remove "framework" alias for all "framework-*" packages
Development platform can contain more then 1 framework
2015-02-14 19:25:02 +02:00
55ad753bf1 Refactor $PLATFORMFW_DIR logic in SCons env 2015-02-14 19:23:59 +02:00
efcb205116 Revert linker "start-group" flag 2015-02-14 19:10:50 +02:00
7470fd3fdd Re-structure "atmelavr-and-arduino" examples 2015-02-14 17:57:46 +02:00
102e3f98de Add openCM3 framework to "titivate" platform 2015-02-14 16:37:44 +02:00
b55dc0917d Fix bug with deleting ".pioenvs" when it doesn't exist 2015-02-14 16:34:00 +02:00
061d7af2ed Improve semiversion detection 2015-02-14 16:21:35 +02:00
ae50b9212f Cleanup automatically .pioenvs when platformio.ini has been changed // Issue #74 2015-02-14 00:12:16 +02:00
2e90ab8092 Improve PlatformIO upgrading and detecting of new version // Resolve #63 2015-02-13 23:55:08 +02:00
f186488fc3 Updated framework-arduino AVR & SAM to 1.6 stable version 2015-02-13 23:10:00 +02:00
1a94952b20 Restore my commits 2015-02-13 23:01:01 +02:00
2c1a864390 Revert "pytest" env 2015-02-13 22:28:16 +02:00
7f258a3f4c Disable pytest env temporary 2015-02-13 19:59:42 +02:00
b57375b8af Fix bug with auto-installing "titiva" platform 2015-02-13 19:04:31 +02:00
3bfe2914f5 Add "pytest" environment 2015-02-13 18:41:48 +02:00
ac14103870 Merge pull request #75 from valeros/develop
Add integration test for "examples" / issue #2
2015-02-13 18:40:09 +02:00
68db70e6bb Merge branch 'feature/tests' into develop 2015-02-13 18:35:21 +02:00
67f1e32652 Add integration test for "examples" 2015-02-13 18:35:09 +02:00
3525c3cca0 Merge branch 'develop' of https://github.com/valeros/platformio into develop 2015-02-12 14:46:53 +02:00
302d1eb15c Merge branch 'develop' of https://github.com/ivankravets/platformio into develop 2015-02-12 14:44:01 +02:00
bea577beb9 Fix pylint warnings 2015-02-12 14:43:29 +02:00
7f2e6a02f0 Refactor get_boards method with exception handler 2015-02-12 14:43:28 +02:00
f9ec259742 Avoid errors when "upload speed" and "upload protocol" are missed in board definition file 2015-02-12 14:43:28 +02:00
3179e90aea Update settings list 2015-02-12 14:43:27 +02:00
80002dc85c Fill history with the closed issues 2015-02-12 14:43:27 +02:00
fa44827bff Enhance Arduino and Adafruit example 2015-02-12 14:42:13 +02:00
dd18b49604 Revert HISTORY.rst 2015-02-12 14:38:06 +02:00
7bad31c532 Merge branch 'develop' of https://github.com/ivankravets/platformio into develop
Conflicts:
	HISTORY.rst
2015-02-12 14:35:46 +02:00
42caf7865c Fix pylint warnings 2015-02-12 14:32:05 +02:00
d76f0bef77 Refactor get_boards method with exception handler 2015-02-12 14:24:31 +02:00
821ede1d23 Avoid errors when "upload speed" and "upload protocol" are missed in board definition file 2015-02-12 13:26:37 +02:00
0e46dc2222 Update settings list 2015-02-12 00:15:36 +02:00
121f66b2a1 Fill history with the closed issues 2015-02-11 22:48:46 +02:00
d1a2570283 Fix console output for an example 2015-02-11 20:06:05 +02:00
3a7dec1463 Enhance Arduino and Adafruit example 2015-02-11 20:06:04 +02:00
42f05979e3 Fixed AttributeError: 'module' object has no attribute 'disable_warnings' when a version of requests package is less then 2.4.0 2015-02-11 20:06:04 +02:00
86b6b6886b Fix console output for an example 2015-02-11 16:09:01 +02:00
e18552dadc Merge branch 'develop' of https://github.com/ivankravets/platformio into develop 2015-02-11 16:05:45 +02:00
c62bd88963 Enhance Arduino and Adafruit example 2015-02-11 16:04:26 +02:00
cf2a7af7e3 Fixed AttributeError: 'module' object has no attribute 'disable_warnings' when a version of requests package is less then 2.4.0 2015-02-11 12:59:12 +02:00
b289d0ba42 Merge pull request #64 from valeros/develop
Output compiled size and static memory usage // Resolve #59
2015-02-09 19:59:50 +02:00
d7405c44ca Output compiled size and static memory usage 2015-02-09 19:57:39 +02:00
2bce970809 Fix UnicodeEncodeError when SourceForge doesn't response 2015-02-08 22:49:29 +02:00
ebd2e31efe Reorganise examples 2015-02-08 21:55:26 +02:00
34f7b8b19a Merge pull request #62 from valeros/develop
Add support for Teensy development platform
2015-02-06 18:56:00 +02:00
184df4d5bb Rename "sam" development platform to "atmelsam" 2015-02-06 18:50:02 +02:00
25380a7e98 Merge branch 'feature/teensy' into develop 2015-02-06 18:43:58 +02:00
fcf4b0d303 Merge branch 'develop' of https://github.com/ivankravets/platformio into feature/teensy
Conflicts:
	platformio/builder/scripts/frameworks/arduino.py
2015-02-06 18:43:50 +02:00
70839abf88 Finalize with Teensy platform 2015-02-06 18:34:29 +02:00
8a3ad923e1 Merge pull request #61 from valeros/develop
Add support for Atmel SAM development platform
2015-02-06 18:18:21 +02:00
15416a9447 Merge branch 'feature/sam' into develop 2015-02-06 18:13:07 +02:00
14355cb7d4 Finalize with Atmel SAM platform 2015-02-06 18:12:56 +02:00
7cdb8b0c7d Resolve uploading and major improvements 2015-02-05 20:13:21 +02:00
6fac35fced Cleanup 2015-02-05 20:00:56 +02:00
2280c01dc7 Initial support of SAM platform 2015-02-05 15:58:12 +02:00
3f062f72a2 Merge commit 'a884db0825f8c66b694b15fe8900515f9837744a' into develop
Conflicts:
	platformio/builder/scripts/frameworks/arduino.py
2015-02-05 15:56:54 +02:00
2ab49d7f24 Initial support for Teensy 3 2015-02-04 20:39:38 +02:00
9a221085d4 Fix optional board "extra_flags" and "ldscript" 2015-02-04 20:29:07 +02:00
9721172481 Fix optional board "extra_flags" and "ldscript" 2015-02-04 20:23:50 +02:00
a884db0825 Move ARDUINO_ARCH define to extra flags 2015-02-04 14:44:47 +02:00
5a13454244 Reorder options 2015-02-03 19:36:35 +02:00
dc341f9350 Move "board" build option to extra flags 2015-02-03 19:36:22 +02:00
a9781293f9 Maintain upgrading to 0.11.0 2015-02-03 18:45:07 +02:00
2a84aec59e Fix bug with package without alias 2015-02-03 18:44:24 +02:00
68cec0448e Merge pull request #60 from valeros/develop
Add STM32 platform with CMSIS, SPL and OpenCM3 frameworks
2015-02-03 14:49:53 +02:00
2487dab7eb Merge branch 'feature/platform-stm32' into develop 2015-02-03 14:45:00 +02:00
423dc248bc Reorganize examples with STM32 and new frameworks 2015-02-03 14:43:27 +02:00
c402cc7c62 Add support for STM32 CMSIS, SPL and OpenCM3 frameworks 2015-02-03 14:32:12 +02:00
4a5b6fc190 Implement STM32 platform with support for Discovery boards 2015-02-03 14:24:59 +02:00
f176fe759d Cleanup whitespaces 2015-02-03 14:24:27 +02:00
3442b11b3d Implement STM32 platform with support for Discovery boards 2015-02-03 14:24:15 +02:00
2c51c2928a Move "energia-dependent" linker entry to Energia framework 2015-02-03 14:12:56 +02:00
6acc183111 Add dependent "ldscripts" package 2015-02-03 14:08:47 +02:00
ab27592e5d Merge branch 'develop' of https://github.com/ivankravets/platformio into feature/platform-stm32 2015-02-03 14:06:40 +02:00
85afbdb8a7 Merge branch 'develop' of https://github.com/ivankravets/platformio into develop 2015-02-03 14:04:29 +02:00
c05418f47e Resolve #56 / Compiling error if space in Windows user folder 2015-02-03 13:54:31 +02:00
d57cc7b156 Keep Scons env state between SConscripts 2015-02-03 13:50:08 +02:00
eeb58da1cb Allow to ignore files when build library 2015-02-03 13:42:58 +02:00
cf823c471d Resolve #58 with handling assembly files 2015-02-02 14:41:37 +02:00
2227267ff6 Merge branch 'develop' of https://github.com/ivankravets/platformio into develop 2015-02-02 13:13:56 +02:00
9e36975d5f Merge branch 'develop' of https://github.com/ivankravets/platformio into feature/platform-stm32 2015-02-02 13:13:34 +02:00
297f132a0c Allow multiple frameworks for env 2015-02-02 13:12:18 +02:00
8b3979c993 Merge branch 'develop' of https://github.com/ivankravets/platformio into feature/platform-stm32 2015-02-02 13:05:25 +02:00
a9b98afa42 Merge branch 'develop' of https://github.com/ivankravets/platformio into develop 2015-02-02 13:05:08 +02:00
9bd4047425 Revert "cyclic dependencies" flag to "atmelavr" platform 2015-01-31 23:22:24 +02:00
666c6c70ca Improve "cyclic dependencies" for "Library Dependencies Finder" // Resolve #50 2015-01-31 23:13:53 +02:00
a7fc184662 Remove unused import 2015-01-31 22:45:50 +02:00
673c484fa7 Ask about "auto-uploading" within "platformio init" command 2015-01-31 22:42:52 +02:00
977f30d617 Added new boards to "atmelavr" platform: Arduino NG, Arduino BT, Arduino Esplora, Arduino Ethernet, Arduino Robot Control, Arduino Robot Motor and Arduino Yun 2015-01-31 17:40:48 +02:00
49b7cf6008 Enable by default "lib cyclic dependencies" for atmelavr platform // Resolve #50 2015-01-31 17:34:17 +02:00
4bb513e460 Apply "ignore_pattern" for BuildLibrary to variant directory 2015-01-31 17:19:07 +02:00
8926e27c46 Fix bug with "ignore_pattern" for BuildLibrary when path contains "examples" 2015-01-30 23:24:37 +02:00
63870fd825 Add support for ARM-based credit-card computers: Raspberry Pi, BeagleBoard and CubieBoard 2015-01-29 23:55:17 +02:00
f06cbebf63 Merge branch 'develop' of https://github.com/ivankravets/platformio into feature/platform-stm32 2015-01-29 18:54:50 +02:00
6e93806b12 Allow args/kwargs for exec command 2015-01-29 18:54:28 +02:00
00f75c753d Fix home dir path for Windows 2015-01-29 18:50:12 +02:00
8c253137a7 Merge branch 'develop' of https://github.com/ivankravets/platformio into feature/platform-stm32 2015-01-29 16:43:26 +02:00
fc7bbc3f20 Merge branch 'develop' of https://github.com/ivankravets/platformio into develop 2015-01-29 16:42:35 +02:00
0aea0ec1ed Merge branch 'develop' into feature/platform-stm32 2015-01-29 16:29:02 +02:00
1921164ba3 Refactored *Library Dependency Finder* // Resolve #48 #50 #55 2015-01-29 16:09:17 +02:00
d5a7fcf75f Expand warning for all OS about obsolate "setuptools" 2015-01-29 14:05:02 +02:00
1ae23085d4 Allow to ignore some libs from "Library Dependency Finder" 2015-01-29 12:49:46 +02:00
d2ad023b52 Apply "isort" 2015-01-29 12:45:26 +02:00
abd6ff9145 Apply "isort" 2015-01-29 12:45:10 +02:00
93273e922f Merge pull request #53 from MrCustomizer/develop
Fixing handling of relative library paths
2015-01-24 17:27:12 +02:00
ef76822773 expand path first, then get absolute path 2015-01-24 16:14:44 +01:00
87e1b09088 sort imports 2015-01-24 16:04:53 +01:00
f84b113b5e fixing handling of relative paths 2015-01-24 08:53:34 +01:00
c71026d135 Add support for board's build "extra_flags" 2015-01-20 17:42:38 +02:00
c452302735 Move "ldscript" to own package 2015-01-20 17:41:49 +02:00
04726fd871 Add support for stm32 boards 2015-01-19 19:28:37 +02:00
2820e5a243 Fix an issue with the libraries that are git repositories // Resolve #49 2015-01-16 18:41:44 +02:00
5dee9ae4ef Update colorama to 0.3.3 2015-01-13 21:40:34 +02:00
ccb0a6262d Fix PyLint "Too many branches" notice 2015-01-10 20:10:48 +02:00
8baae82b35 Fix multiple definition of "main" function 2015-01-10 19:48:07 +02:00
e8b87a0168 Add "--json-output" option to "platformio boards" command // Resolve issue #42 2015-01-10 16:20:09 +02:00
c8c1c7a83f Split long description 2015-01-08 23:52:24 +02:00
e8746232f6 Describe how to create own development platform 2015-01-08 23:21:30 +02:00
dcf325f64e Improve QuickStart steps 2015-01-08 20:12:42 +02:00
2672f2c7f6 Return to 0.11.0-dev 2015-01-06 18:34:31 +02:00
09493ce196 Merge branch 'release/v0.10.2' 2015-01-06 18:33:36 +02:00
78575f12d5 Merge branch 'release/v0.10.2' into develop 2015-01-06 18:33:36 +02:00
be224d2d8a Bump to 0.10.2 (resolve issue #42, #45) 2015-01-06 18:32:06 +02:00
4b7a7d0cf0 Fix an exception during platformio upgrade under Windows OS // Resolve #45 2015-01-06 17:45:07 +02:00
8c53cf1d3c Fix an issue with `--json-output` // Resolve #42 2015-01-05 22:58:55 +02:00
09159c3ac0 Add notice about Engduino Library 2015-01-03 01:16:19 +02:00
0f1cd87deb Return to 0.11.0-dev 2015-01-02 23:19:26 +02:00
e0cb0003dc Merge branch 'release/v0.10.1' into develop 2015-01-02 23:18:15 +02:00
23017a22ec Merge branch 'release/v0.10.1' 2015-01-02 23:18:14 +02:00
6c86bb4167 Bump to 0.10.1 (resolve issue #42) 2015-01-02 23:17:30 +02:00
ca31230928 Improve lib scanner 2015-01-02 23:14:45 +02:00
01f8795981 Add "--json-output" option to "platformio list", "platformio serialports list" and "platformio lib list" cmds // Resolve #42 2015-01-02 21:03:14 +02:00
2566879a99 Fix indention 2015-01-02 20:27:34 +02:00
418b693fe0 Fix missing auto-uploading by default within init command 2015-01-02 20:25:30 +02:00
8686936a07 Revert lowercase to Quickstart 2015-01-02 17:18:32 +02:00
79b8e6c24e Mention "boards" command on QuickStart page 2015-01-02 15:19:44 +02:00
8c2dd44f44 Update platformio.ini for the examples 2015-01-02 00:16:29 +02:00
f172019edc Disable blink for "thanks" 2015-01-01 22:57:02 +02:00
44bf3e8479 Start 0.11.0-dev 2015-01-01 21:04:27 +02:00
17d6c02d83 Merge branch 'release/v0.10.0' 2015-01-01 21:00:27 +02:00
bd6a57095a Merge branch 'release/v0.10.0' into develop 2015-01-01 21:00:27 +02:00
68733a447a Bump to 0.10.0 (resolve issues: #11, #21, #35, #37, #38, #39, #40, #43 ) 2015-01-01 20:57:47 +02:00
1fb0644f51 Happy New Year to copyrights :) 2015-01-01 19:50:45 +02:00
c74d10b2e3 Migrate to PlatformIO open-source ORG domain 2014-12-30 23:22:42 +02:00
95582d16a6 Rename Twitter account to @PlatformIO_Org 2014-12-30 14:02:20 +02:00
e8628443f0 Correct spelling 2014-12-29 20:27:11 +02:00
af191834d1 Allow to initialise project with the specified embedded boards // Resolve #21 2014-12-29 20:22:01 +02:00
82744afe58 Allow auto-installation of platforms when prompts are disabled // Resolve #43 2014-12-29 15:10:31 +02:00
c109857707 Correct Engduino names 2014-12-28 23:49:46 +02:00
740f609ca8 Added docs for Engduino boards 2014-12-28 23:38:45 +02:00
1b7065d8c1 Added support for *Engduino* boards // Resolve #38 2014-12-28 23:38:18 +02:00
f78f5b454b Parse libs in header files 2014-12-28 23:09:07 +02:00
c3686b4098 Improve compatibility with Arduino bundled libs 2014-12-28 22:58:27 +02:00
9cfa4e40d0 Cleanup extra_flags 2014-12-28 22:57:36 +02:00
4a5903849e Automatic detection of port on "serialports monitor" // Resolve #37 2014-12-28 20:57:05 +02:00
200944ebb3 Fix lint warning with unused argument 2014-12-28 20:43:29 +02:00
7af9f50426 Fix firmware uploading to Arduino Leonardo-based boards // Resolve #40 2014-12-28 20:41:21 +02:00
fe60369b6a Fix pre-configured settings for Arduino boards and ATmega 328 MCU 2014-12-28 20:03:43 +02:00
15acca7b57 Mention about "boards" command in the platform page 2014-12-28 00:06:54 +02:00
2aa4d0af33 Implement 'boards' command // Resolve #11 2014-12-27 23:59:20 +02:00
01bbfcced0 Update "requests" to 2.5.1 2014-12-26 23:49:21 +02:00
65895e658f Fix bug with Arduino's USB boards // Resolve issue #40 2014-12-26 23:48:07 +02:00
0241d65460 Avoid SSL connection to packages manifest file // Resolve #39 2014-12-24 22:12:42 +02:00
060e1764cb Fix urllib3's SSL warning under Python <= 2.7.2 // Resolve #39 2014-12-24 21:36:11 +02:00
9dcc774bfd Add example with uploading firmware via USB programmer (USBasp) // Resolve #35 2014-12-19 19:53:25 +02:00
11b26b3730 Clarify when lib not found by search request 2014-12-16 23:45:00 +02:00
d9a7537d5d Add example to lib search with the "excluding" operator 2014-12-14 19:47:19 +02:00
d68937afe0 Reduce terminate timeout 2014-12-14 19:46:40 +02:00
43441a431e Improve Telemetry service 2014-12-14 00:39:33 +02:00
9e4618ca7e Finally fix issue #18 - Compilation fails on Windows 2014-12-13 22:54:50 +02:00
69cde35fb7 Start 0.10.0-dev 2014-12-10 23:13:41 +02:00
ac02348833 Merge branch 'release/v0.9.2' 2014-12-10 23:12:27 +02:00
311c07e857 Merge branch 'release/v0.9.2' into develop 2014-12-10 23:12:27 +02:00
34c0ccb29f Ready for v0.9.2 2014-12-10 23:11:05 +02:00
efac8ec940 Fix compilation bug on Windows with installed MSVC // Issue #18 2014-12-10 23:07:02 +02:00
4f56bf66db Fix compilation bug on Windows with installed MSVC 2014-12-10 23:01:48 +02:00
3157ceaa47 Add new setting enable_prompts and avoid blocking / Resolve #34 2014-12-10 22:32:22 +02:00
2b2ceb60cc Replace "dark blue" with "cyan" colour / Resolve #33 2014-12-10 21:40:39 +02:00
4f3c4e0901 Update "requests" to 2.5.0 2014-12-10 21:31:50 +02:00
5442ee459d Fix enable/disable telemetry service 2014-12-06 19:00:36 +02:00
63dcb5586c Start 0.10.0-dev 2014-12-05 00:12:44 +02:00
e521a691ae Merge branch 'release/v0.9.1' 2014-12-05 00:04:38 +02:00
b653aca20f Merge branch 'release/v0.9.1' into develop 2014-12-05 00:04:38 +02:00
e0120bc86e Ready for v0.9.1 2014-12-05 00:02:09 +02:00
0dff38fcdd Upgrade Eclipse Project Examples to latest Luna and PlatformIO releases 2014-12-04 23:57:52 +02:00
d8863d1861 Code improvements 2014-12-04 23:17:45 +02:00
8596d271a2 Cleanup click-based source code 2014-12-03 20:16:50 +02:00
affb47b82e Ask user to install platform when it hasn't been installed yet 2014-12-03 20:15:52 +02:00
61e07fe169 Improve documentation 2014-12-03 14:56:24 +02:00
caf6746e89 Fix "OSError: [Errno 2] No such file or directory" when PlatformIO isn't installed properly 2014-12-03 14:18:22 +02:00
f1f6817615 Merge branch 'develop' of https://github.com/ivankravets/platformio into develop 2014-12-03 14:16:47 +02:00
06f4e5c835 Merge pull request #32 from franciscoruiz/eclipse-ide-examples-tiva
Fixed example for Eclipse IDE with Tiva board
2014-12-03 13:25:00 +02:00
0aeb2e89de Register "serialports" like multicommand 2014-12-03 12:46:24 +02:00
d1513169fc More clarifications about NotPlatformProject 2014-12-03 12:45:23 +02:00
2af34821aa Made main.c compliant with Energy
Complaining about main() defined twice
2014-12-03 00:31:34 +00:00
e1ad6072dd Set platformio as builder for the project
Both for building and cleaning
2014-12-03 00:29:44 +00:00
c69c889a26 Fixed paths to included files for toolchain and framework 2014-12-03 00:28:17 +00:00
2be4bc4817 Fixed reference to non-existing image in README 2014-12-03 00:24:35 +00:00
32d422bd97 Simplify SF URL to manifest file 2014-12-01 23:21:21 +02:00
be0eb901db Start 0.10.0-dev 2014-12-01 23:11:16 +02:00
ce1b32e4e9 Merge branch 'release/v0.9.0' 2014-12-01 23:04:54 +02:00
e2a4f48953 Merge branch 'release/v0.9.0' into develop 2014-12-01 23:04:54 +02:00
2bc68df958 Preparation for v0.9.0 2014-12-01 23:04:26 +02:00
ba00ee20c2 Switch to SF Storage 2014-12-01 22:45:53 +02:00
107a849f88 Correct dynamic library name 2014-12-01 16:40:46 +02:00
ddab7046ca Don't show obsolate version in =dev mode 2014-12-01 16:33:35 +02:00
e49d4e2722 Fix #28: bug with code builder and built-in Arduino libraries 2014-12-01 16:11:30 +02:00
3c9e809b58 Improve "init" command. Resolve #31 2014-11-30 18:14:18 +02:00
a82d09e816 Trim spaces 2014-11-30 18:13:45 +02:00
6b9cbde8eb Improve telemetry for run env command 2014-11-30 17:00:30 +02:00
22297b9cfd Implement "platformio settings" command 2014-11-29 22:58:10 +02:00
d8837e4756 Allow "upload_port" auto-detecting 2014-11-29 22:56:08 +02:00
bcfb007c90 Added Migration Manager which simplifies process with upgrading to a major release 2014-11-29 22:55:32 +02:00
33d87367e7 Add Telemetry Service 2014-11-29 22:48:15 +02:00
257f751dfa Implement ApplicationState Manager 2014-11-29 22:39:44 +02:00
e41226fcbc Remove copyrights from use's file 2014-11-27 22:25:40 +02:00
4efb798371 Add ready for compilers 2014-11-27 22:22:39 +02:00
f8f47886d3 Resolve issue #27 with LICENSE 2014-11-27 22:17:48 +02:00
dec78d29e8 Improve install/uninstall commands 2014-11-24 22:24:19 +02:00
102175215c Allow for search args to be empty 2014-11-24 21:59:25 +02:00
cd2cc16fcf Improve support for 3-rd party platforms 2014-11-24 21:36:44 +02:00
b103dc01c0 Refactored Package Manager 2014-11-22 23:55:17 +02:00
f8ed09c3ad Improve installation section 2014-11-21 21:06:32 +02:00
7f918da87d Fix SHA1 package verification under Cygwin Env. Resolve #26 2014-11-21 18:13:02 +02:00
32230c6b60 Add pic for colourful output 2014-11-15 20:18:50 +02:00
d8b00eef97 Improve PlatformIO ideas 2014-11-15 20:12:27 +02:00
2b1b64c5c1 Add 'sudo' notice 2014-11-14 00:17:09 +02:00
145fcb63e2 Improve installation 2014-11-14 00:12:23 +02:00
6748fb974b Add pics to IDE page 2014-11-12 19:33:35 +02:00
da234bf228 Update project title 2014-11-07 22:22:18 +02:00
c821cdefa4 Add logo, improve texts 2014-11-07 22:14:44 +02:00
7eb86305d4 Add "user Guide" shortcut to lib menu 2014-11-06 20:21:48 +02:00
66b5299b56 Update Twitter link 2014-11-05 20:58:35 +02:00
fcd0528a9e Fix trademark issues 2014-10-27 22:47:53 +02:00
99929d7fa6 Fix "repository" field and "type" attribute 2014-10-24 22:59:15 +03:00
6c7be9b339 Improve lib examples 2014-10-22 23:52:17 +03:00
73004d0ad8 Switch to 0.9.0-dev branch 2014-10-19 18:01:27 +03:00
c867f9a90a Merge branch 'release/v0.8.0' 2014-10-19 17:59:44 +03:00
7f7620a08c Merge branch 'release/v0.8.0' into develop 2014-10-19 17:59:44 +03:00
416bf8e7af Ready for v0.8.0 2014-10-19 17:58:35 +03:00
b3eebf717d Correct 7-th example for lib search command 2014-10-19 17:56:08 +03:00
baef85aed1 Fix PyLint warnings from the last CI build 2014-10-19 00:21:10 +03:00
2d6c0ef66d Avoid trademark issues in library.json; switch to PlatformIO Library Registry ID logic
Resolve issue #17
2014-10-19 00:14:11 +03:00
4f817a5b61 Describe new fields: frameworks, platforms, authors and dependencies 2014-10-18 20:03:38 +03:00
01d415cc7f Avoid trademarks issues 2014-10-15 22:33:23 +03:00
d13bf3325b Update "colorama" to 0.3.2 2014-10-08 23:10:34 +03:00
0e62ad1600 Cleanup citate 2014-10-08 17:44:20 +03:00
700c6c9b3e Improve citrate 2014-10-08 17:42:02 +03:00
ac02703f5f Disable checking for link anchors 2014-10-08 17:41:48 +03:00
1f80b6746e Fix links 2014-10-07 16:13:24 +03:00
9f87342e30 Add Arduino & Energia IDEs 2014-10-07 16:11:12 +03:00
13d6616b55 Update README.rst 2014-10-06 23:35:52 +03:00
81700523ed Update README.rst 2014-10-06 23:35:38 +03:00
7f1827f1e5 Switch to v0.8.0 2014-10-06 23:33:45 +03:00
8d491b4146 Merge branch 'release/v0.7.1' 2014-10-06 23:28:12 +03:00
0ea57b8bca Merge branch 'release/v0.7.1' into develop 2014-10-06 23:28:12 +03:00
466026b5c6 Update project description, history and etc 2014-10-06 23:27:49 +03:00
c90ef9919b Improve title 2014-10-06 16:21:24 +03:00
8649114546 Fix link to Web Library Search site 2014-10-06 16:15:40 +03:00
dcfa899520 Fix make directory operation for invalid library name 2014-10-06 14:09:22 +03:00
2e03d27d27 Update "requests" to 2.4.3 2014-10-06 13:57:40 +03:00
9ead140b6e Fix lib update crashing when no libs are installed (resolve issue #19) 2014-10-05 23:34:40 +03:00
719e03da16 Expand user path from lib_dir 2014-10-04 23:30:51 +03:00
6a775f3951 Skip "platformio" section from "run" process 2014-10-04 18:53:59 +03:00
7de5166694 Change "print" function to Py2.x 2014-10-03 19:54:02 +03:00
907a72d3bd Move to latest version of SCons 2014-10-03 19:48:17 +03:00
024be2e094 Automatic detection of port on upload (resolve #15) 2014-10-03 19:47:34 +03:00
1c4b97c2f2 Fix lint warning with anomalous backslash 2014-09-30 20:58:30 +03:00
2a7e67b8e4 Fix bug with order for "includes" in conversation from INO/PDE to CPP 2014-09-30 20:55:08 +03:00
09761004dd Ready for 0.8.0-dev 2014-09-24 22:33:40 +03:00
6404b02a5d Merge branch 'release/v0.7.0' 2014-09-24 22:25:58 +03:00
766bc44b23 Merge branch 'release/v0.7.0' into develop 2014-09-24 22:25:58 +03:00
c14dbb5ef1 Resolve #6. Ready for 0.7.0 2014-09-24 22:25:44 +03:00
9c2dbf73f3 Implement lib-search pagination, dependencies uninstalling 2014-09-24 22:18:19 +03:00
c0c3c8efcd Add 'examples' field 2014-09-24 21:40:37 +03:00
24ec2dc9e4 Update PlatformIO Website URLs 2014-09-12 19:27:56 +03:00
97a42a357a Merge branch 'develop' of https://github.com/ivankravets/platformio into develop 2014-09-12 19:19:46 +03:00
2dddbfc074 Correction 2014-09-12 19:18:49 +03:00
f77c195f3d Update "requests" to 2.4.1 2014-09-12 19:18:11 +03:00
70493a7721 Update PlatformIO Website URLs 2014-09-12 19:17:31 +03:00
1e1fac2fc1 Merge branch 'develop' of https://github.com/ivankravets/platformio into develop 2014-09-09 23:16:55 +03:00
fbe014f687 Corrections 2014-09-09 23:16:36 +03:00
fd2571da04 Updated "click" to 3.3 2014-09-08 22:15:05 +03:00
813c818477 Implement "lib register" command 2014-09-08 22:02:57 +03:00
c4b28ab252 Rename section of source location 2014-09-08 15:37:04 +03:00
ac66f62262 Rename to "creating" 2014-09-07 19:38:00 +03:00
727ec2f4dc Add citation block 2014-09-07 18:22:52 +03:00
995a25478b Improvements 2014-09-07 18:14:33 +03:00
5fa265374c Rename "create" page 2014-09-07 15:09:32 +03:00
369622f3fb Correct source code locations 2014-09-06 23:55:48 +03:00
6fdc47beda Describe how to create new library and share it 2014-09-06 23:51:28 +03:00
f316308860 Describe "dependencies" field from library.json 2014-09-06 22:27:33 +03:00
2ac4b9a590 Fill history with Library Manager record 2014-09-06 22:19:51 +03:00
23bc5188b3 Fill Library Config information 2014-09-06 22:13:16 +03:00
1631770b85 Describe "lib_dir" option 2014-09-06 18:46:19 +03:00
849a49f665 Add Library Manager documentation 2014-09-06 13:44:45 +03:00
be710cefd8 Implement installing dependence libs 2014-09-06 12:53:17 +03:00
a98dc5bc29 Implement --keyword and --author options for library search command 2014-09-06 12:12:13 +03:00
46fb576c9d Switch package manifest to dl.platformio 2014-09-05 21:55:47 +03:00
b370d38192 Merge branch 'feature/library-manager' into develop 2014-09-05 21:39:41 +03:00
716ff3df86 Merge branch 'develop' of https://github.com/ivankravets/platformio into feature/library-manager 2014-09-05 21:31:37 +03:00
c784c7ab47 Typo fix 2014-09-05 21:27:10 +03:00
bac0a5ebb1 Implement lib commands: install, uninstall, show, update, list 2014-09-04 18:58:12 +03:00
3c030edc38 Grammar fix 2014-09-04 18:57:13 +03:00
35e7c8b3a7 Seek for library in user's lib directory 2014-09-04 18:56:32 +03:00
855df959ee Parse .pde as .ino file 2014-09-04 18:55:56 +03:00
3d179fe1a7 Implement "lib search" command 2014-09-03 23:03:49 +03:00
69b73935d0 Updated "requests" to 2.4.0 2014-09-01 10:30:01 +03:00
a7bc72aa41 Improve installation section 2014-08-28 21:20:15 +03:00
5f539fdf7b Re-tested with Click 3.2 2014-08-23 11:51:18 +03:00
78bf6c0e23 Italic correction 2014-08-22 18:05:27 +03:00
768eea8a6d Implemented new `[platformio]` section for Configuration File | Resolve #14 2014-08-22 17:57:28 +03:00
e4ba030a0c Expand an URL to get-platformio.py 2014-08-13 16:36:38 +03:00
ad6acb28ae Disable PyLint stupid warning 2014-08-13 11:55:25 +03:00
63d9914652 Test passed with new click 3.1 2014-08-13 11:37:50 +03:00
c41be4b294 Add notice about examples on the web 2014-08-12 19:29:57 +03:00
9cec1069d6 Rename Miscellaneous section to Raspduino 2014-08-11 15:58:39 +03:00
1b359b7587 Add new examples to ProjectConfFile + improve Quickstart 2014-08-11 12:20:08 +03:00
80e21f61d3 Minor docs improvement 2014-08-09 23:40:32 +03:00
0323fe7b90 Preparation for 0.7.0-dev 2014-08-09 23:29:37 +03:00
fcef78ed0d Merge branch 'release/v0.6.0' into develop 2014-08-09 23:21:02 +03:00
301 changed files with 17797 additions and 17944 deletions

1
.gitignore vendored
View File

@ -6,3 +6,4 @@
examples/ide-eclipse/.metadata
examples/ide-eclipse/RemoteSystemsTempFiles
docs/_build
dist

6
.gitmodules vendored Normal file
View File

@ -0,0 +1,6 @@
[submodule "examples/atmelavr-and-arduino/arduino-external-libs/lib/Adafruit-PCD8544-Nokia-5110-LCD-library"]
path = examples/atmelavr-and-arduino/arduino-external-libs/lib/Adafruit-PCD8544-Nokia-5110-LCD-library
url = https://github.com/adafruit/Adafruit-PCD8544-Nokia-5110-LCD-library.git
[submodule "examples/atmelavr-and-arduino/arduino-external-libs/lib/Adafruit-GFX-Library"]
path = examples/atmelavr-and-arduino/arduino-external-libs/lib/Adafruit-GFX-Library
url = https://github.com/adafruit/Adafruit-GFX-Library.git

View File

@ -38,7 +38,7 @@ load-plugins=
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
disable=C0103,C0111,E0611,F0401,I0011,R0801,R0903
disable=C0103,C0111,E0611,F0401,I0011,R0801,R0903,R0922
[REPORTS]

View File

@ -1,9 +1,16 @@
cache:
directories:
- $HOME/.platformio
language: python
python: 2.7
python:
- "2.7"
env:
- TOX_ENV=docs
- TOX_ENV=lint
- TOX_ENV=py26
- TOX_ENV=py27
install:
- pip install tox

View File

@ -1,10 +1,248 @@
Release History
===============
1.2.0 (2015-03-20)
------------------
* Added full support of `mbed <http://docs.platformio.org/en/latest/frameworks/mbed.html>`__
framework including libraries: *RTOS, Ethernet, DSP, FAT, USB*.
* Added `freescalekinetis <http://docs.platformio.org/en/latest/platforms/freescalekinetis.html>`_
development platform with Freescale Kinetis Freedom boards
* Added `nordicnrf51 <http://docs.platformio.org/en/latest/platforms/nordicnrf51.html>`_
development platform with supported boards from *JKSoft, Nordic, RedBearLab,
Switch Science*
* Added `nxplpc <http://docs.platformio.org/en/latest/platforms/nxplpc.html>`_
development platform with supported boards from *CQ Publishing, Embedded
Artists, NGX Technologies, NXP, Outrageous Circuits, SeeedStudio,
Solder Splash Labs, Switch Science, u-blox*
* Added support for *ST Nucleo* boards to
`ststm32 <http://docs.platformio.org/en/latest/platforms/ststm32.html>`__
development platform
* Created new `Frameworks <http://docs.platformio.org/en/latest/frameworks/index.html>`__
page in documentation and added to `PlatformIO Web Site <http://platformio.org>`_
(`issue #115 <https://github.com/ivankravets/platformio/issues/115>`_)
* Introduced online `Embedded Boards Explorer <http://platformio.org/#!/boards>`_
* Automatically append define ``-DPLATFORMIO=%version%`` to
builder (`issue #105 <https://github.com/ivankravets/platformio/issues/105>`_)
* Renamed ``stm32`` development platform to
`ststm32 <http://docs.platformio.org/en/latest/platforms/ststm32.html>`__
* Renamed ``opencm3`` framework to
`libopencm3 <http://docs.platformio.org/en/latest/frameworks/libopencm3.html>`__
* Fixed uploading for `atmelsam <http://docs.platformio.org/en/latest/platforms/atmelsam.html>`__
development platform
* Fixed re-arranging the ``*.ino/pde`` files when converting to ``*.cpp``
(`issue #100 <https://github.com/ivankravets/platformio/issues/100>`_)
1.1.0 (2015-03-05)
------------------
* Implemented ``PLATFORMIO_*`` environment variables
(`issue #102 <https://github.com/ivankravets/platformio/issues/102>`_)
* Added support for *SainSmart* boards to
`atmelsam <http://docs.platformio.org/en/latest/platforms/atmelsam.html#boards>`__
development platform
* Added
`Project Configuration <http://docs.platformio.org/en/latest/projectconf.html>`__
option named `envs_dir <http://docs.platformio.org/en/latest/projectconf.html#envs-dir>`__
* Disabled "prompts" automatically for *Continuous Integration* systems
(`issue #103 <https://github.com/ivankravets/platformio/issues/103>`_)
* Fixed firmware uploading for
`atmelavr <http://docs.platformio.org/en/latest/platforms/atmelavr.html#boards>`__
boards which work within ``usbtiny`` protocol
* Fixed uploading for *Digispark* board (`issue #106 <https://github.com/ivankravets/platformio/issues/106>`_)
1.0.1 (2015-02-27)
------------------
**PlatformIO 1.0 - recommended for production**
* Changed development status from ``beta`` to ``Production/Stable``
* Added support for *ARM*-based credit-card sized computers:
`Raspberry Pi <http://www.raspberrypi.org>`_,
`BeagleBone <http://beagleboard.org>`_ and `CubieBoard <http://cubieboard.org>`_
* Added `atmelsam <http://docs.platformio.org/en/latest/platforms/atmelsam.html>`__
development platform with supported boards: *Arduino Due and Digistump DigiX*
(`issue #71 <https://github.com/ivankravets/platformio/issues/71>`_)
* Added `ststm32 <http://docs.platformio.org/en/latest/platforms/ststm32.html>`__
development platform with supported boards: *Discovery kit for STM32L151/152,
STM32F303xx, STM32F407/417 lines* and `libOpenCM3 Framework <http://www.libopencm3.org>`_
(`issue #73 <https://github.com/ivankravets/platformio/issues/73>`_)
* Added `teensy <http://docs.platformio.org/en/latest/platforms/teensy.html>`_
development platform with supported boards: *Teensy 2.x & 3.x*
(`issue #72 <https://github.com/ivankravets/platformio/issues/72>`_)
* Added new *Arduino* boards to
`atmelavr <http://docs.platformio.org/en/latest/platforms/atmelavr.html#boards>`__
platform: *Arduino NG, Arduino BT, Arduino Esplora, Arduino Ethernet,
Arduino Robot Control, Arduino Robot Motor and Arduino Yun*
* Added support for *Adafruit* boards to
`atmelavr <http://docs.platformio.org/en/latest/platforms/atmelavr.html#boards>`__
platform: *Adafruit Flora and Adafruit Trinkets*
(`issue #65 <https://github.com/ivankravets/platformio/issues/65>`_)
* Added support for *Digispark* boards to
`atmelavr <http://docs.platformio.org/en/latest/platforms/atmelavr.html#boards>`__
platform: *Digispark USB Development Board and Digispark Pro*
(`issue #47 <https://github.com/ivankravets/platformio/issues/47>`_)
* Covered code with tests (`issue #2 <https://github.com/ivankravets/platformio/issues/2>`_)
* Refactored *Library Dependency Finder* (issues
`#48 <https://github.com/ivankravets/platformio/issues/48>`_,
`#50 <https://github.com/ivankravets/platformio/issues/50>`_,
`#55 <https://github.com/ivankravets/platformio/pull/55>`_)
* Added `src_dir <http://docs.platformio.org/en/latest/projectconf.html#src-dir>`__
option to ``[platformio]`` section of
`platformio.ini <http://docs.platformio.org/en/latest/projectconf.html>`__
which allows to redefine location to project's source directory
(`issue #83 <https://github.com/ivankravets/platformio/issues/83>`_)
* Added ``--json-output`` option to
`platformio boards <http://docs.platformio.org/en/latest/userguide/cmd_boards.html>`__
and `platformio search <http://docs.platformio.org/en/latest/userguide/cmd_search.html>`__
commands which allows to return the output in `JSON <http://en.wikipedia.org/wiki/JSON>`_ format
(`issue #42 <https://github.com/ivankravets/platformio/issues/42>`_)
* Allowed to ignore some libs from *Library Dependency Finder* via
`ignore_libs <http://docs.platformio.org/en/latest/projectconf.html#ignore-libs>`_ option
* Improved `platformio run <http://docs.platformio.org/en/latest/userguide/cmd_run.html>`__
command: asynchronous output for build process, timing and detailed
information about environment configuration
(`issue #74 <https://github.com/ivankravets/platformio/issues/74>`_)
* Output compiled size and static memory usage with
`platformio run <http://docs.platformio.org/en/latest/userguide/cmd_run.html>`__
command (`issue #59 <https://github.com/ivankravets/platformio/issues/59>`_)
* Updated `framework-arduino` AVR & SAM to 1.6 stable version
* Fixed an issue with the libraries that are git repositories
(`issue #49 <https://github.com/ivankravets/platformio/issues/49>`_)
* Fixed handling of assembly files
(`issue #58 <https://github.com/ivankravets/platformio/issues/58>`_)
* Fixed compiling error if space is in user's folder
(`issue #56 <https://github.com/ivankravets/platformio/issues/56>`_)
* Fixed `AttributeError: 'module' object has no attribute 'disable_warnings'`
when a version of `requests` package is less then 2.4.0
* Fixed bug with invalid process's "return code" when PlatformIO has internal
error (`issue #81 <https://github.com/ivankravets/platformio/issues/81>`_)
* Several bug fixes, increased stability and performance improvements
0.10.2 (2015-01-06)
-------------------
* Fixed an issue with ``--json-output``
(`issue #42 <https://github.com/ivankravets/platformio/issues/42>`_)
* Fixed an exception during
`platformio upgrade <http://docs.platformio.org/en/latest/userguide/cmd_upgrade.html>`__
under Windows OS (`issue #45 <https://github.com/ivankravets/platformio/issues/45>`_)
0.10.1 (2015-01-02)
-------------------
* Added ``--json-output`` option to
`platformio list <http://docs.platformio.org/en/latest/userguide/cmd_list.html>`__,
`platformio serialports list <http://docs.platformio.org/en/latest/userguide/cmd_serialports.html>`__ and
`platformio lib list <http://docs.platformio.org/en/latest/userguide/lib/cmd_list.html>`__
commands which allows to return the output in `JSON <http://en.wikipedia.org/wiki/JSON>`_ format
(`issue #42 <https://github.com/ivankravets/platformio/issues/42>`_)
* Fixed missing auto-uploading by default after `platformio init <http://docs.platformio.org/en/latest/userguide/cmd_init.html>`__
command
0.10.0 (2015-01-01)
-------------------
**Happy New Year!**
* Implemented `platformio boards <http://docs.platformio.org/en/latest/userguide/cmd_boards.html>`_
command (`issue #11 <https://github.com/ivankravets/platformio/issues/11>`_)
* Added support of *Engduino* boards for
`atmelavr <http://docs.platformio.org/en/latest/platforms/atmelavr.html#engduino>`__
platform (`issue #38 <https://github.com/ivankravets/platformio/issues/38>`_)
* Added ``--board`` option to `platformio init <http://docs.platformio.org/en/latest/userguide/cmd_init.html>`__
command which allows to initialise project with the specified embedded boards
(`issue #21 <https://github.com/ivankravets/platformio/issues/21>`_)
* Added `example with uploading firmware <http://docs.platformio.org/en/latest/projectconf.html#examples>`_
via USB programmer (USBasp) for
`atmelavr <http://docs.platformio.org/en/latest/platforms/atmelavr.html>`_
*MCUs* (`issue #35 <https://github.com/ivankravets/platformio/issues/35>`_)
* Automatic detection of port on `platformio serialports monitor <http://docs.platformio.org/en/latest/userguide/cmd_serialports.html#platformio-serialports-monitor>`_
(`issue #37 <https://github.com/ivankravets/platformio/issues/37>`_)
* Allowed auto-installation of platforms when prompts are disabled (`issue #43 <https://github.com/ivankravets/platformio/issues/43>`_)
* Fixed urllib3's *SSL* warning under Python <= 2.7.2 (`issue #39 <https://github.com/ivankravets/platformio/issues/39>`_)
* Fixed bug with *Arduino USB* boards (`issue #40 <https://github.com/ivankravets/platformio/issues/40>`_)
0.9.2 (2014-12-10)
------------------
* Replaced "dark blue" by "cyan" colour for the texts (`issue #33 <https://github.com/ivankravets/platformio/issues/33>`_)
* Added new setting `enable_prompts <http://docs.platformio.org/en/latest/userguide/cmd_settings.html>`_
and allowed to disable all *PlatformIO* prompts (useful for cloud compilers)
(`issue #34 <https://github.com/ivankravets/platformio/issues/34>`_)
* Fixed compilation bug on *Windows* with installed *MSVC* (`issue #18 <https://github.com/ivankravets/platformio/issues/18>`_)
0.9.1 (2014-12-05)
------------------
* Ask user to install platform (when it hasn't been installed yet) within
`platformio run <http://docs.platformio.org/en/latest/userguide/cmd_run.html>`__
and `platformio show <http://docs.platformio.org/en/latest/userguide/cmd_show.html>`_ commands
* Improved main `documentation <http://docs.platformio.org>`_
* Fixed "*OSError: [Errno 2] No such file or directory*" within
`platformio run <http://docs.platformio.org/en/latest/userguide/cmd_run.html>`__
command when PlatformIO isn't installed properly
* Fixed example for `Eclipse IDE with Tiva board <https://github.com/ivankravets/platformio/tree/develop/examples/ide-eclipse>`_
(`issue #32 <https://github.com/ivankravets/platformio/pull/32>`_)
* Upgraded `Eclipse Project Examples <https://github.com/ivankravets/platformio/tree/develop/examples/ide-eclipse>`_
to latest *Luna* and *PlatformIO* releases
0.9.0 (2014-12-01)
------------------
* Implemented `platformio settings <http://docs.platformio.org/en/latest/userguide/cmd_settings.html>`_ command
* Improved `platformio init <http://docs.platformio.org/en/latest/userguide/cmd_init.html>`_ command.
Added new option ``--project-dir`` where you can specify another path to
directory where new project will be initialized (`issue #31 <https://github.com/ivankravets/platformio/issues/31>`_)
* Added *Migration Manager* which simplifies process with upgrading to a
major release
* Added *Telemetry Service* which should help us make *PlatformIO* better
* Implemented *PlatformIO AppState Manager* which allow to have multiple
``.platformio`` states.
* Refactored *Package Manager*
* Download Manager: fixed SHA1 verification within *Cygwin Environment*
(`issue #26 <https://github.com/ivankravets/platformio/issues/26>`_)
* Fixed bug with code builder and built-in Arduino libraries
(`issue #28 <https://github.com/ivankravets/platformio/issues/28>`_)
0.8.0 (2014-10-19)
------------------
* Avoided trademark issues in `library.json <http://docs.platformio.org/en/latest/librarymanager/config.html>`_
with the new fields: `frameworks <http://docs.platformio.org/en/latest/librarymanager/config.html#frameworks>`_,
`platforms <http://docs.platformio.org/en/latest/librarymanager/config.html#platforms>`_
and `dependencies <http://docs.platformio.org/en/latest/librarymanager/config.html#dependencies>`_
(`issue #17 <https://github.com/ivankravets/platformio/issues/17>`_)
* Switched logic from "Library Name" to "Library Registry ID" for all
`platformio lib <http://docs.platformio.org/en/latest/userguide/lib/index.html>`_
commands (install, uninstall, update and etc.)
* Renamed ``author`` field to `authors <http://docs.platformio.org/en/latest/librarymanager/config.html#authors>`_
and allowed to setup multiple authors per library in `library.json <http://docs.platformio.org/en/latest/librarymanager/config.html>`_
* Added option to specify "maintainer" status in `authors <http://docs.platformio.org/en/latest/librarymanager/config.html#authors>`_ field
* New filters/options for `platformio lib search <http://docs.platformio.org/en/latest/userguide/lib/cmd_search.html>`_
command: ``--framework`` and ``--platform``
0.7.1 (2014-10-06)
------------------
* Fixed bug with order for includes in conversation from INO/PDE to CPP
* Automatic detection of port on upload (`issue #15 <https://github.com/ivankravets/platformio/issues/15>`_)
* Fixed lib update crashing when no libs are installed (`issue #19 <https://github.com/ivankravets/platformio/issues/19>`_)
0.7.0 (2014-09-24)
------------------
* Implemented new `[platformio] <http://docs.platformio.org/en/latest/projectconf.html#platformio>`_
section for Configuration File with `home_dir <http://docs.platformio.org/en/latest/projectconf.html#home-dir>`_
option (`issue #14 <https://github.com/ivankravets/platformio/issues/14>`_)
* Implemented *Library Manager* (`issue #6 <https://github.com/ivankravets/platformio/issues/6>`_)
0.6.0 (2014-08-09)
------------------
* Implemented ``serialports monitor`` (`issue #10 <https://github.com/ivankravets/platformio/issues/10>`_)
* Implemented `platformio serialports monitor <http://docs.platformio.org/en/latest/userguide/cmd_serialports.html#platformio-serialports-monitor>`_ (`issue #10 <https://github.com/ivankravets/platformio/issues/10>`_)
* Fixed an issue ``ImportError: No module named platformio.util`` (`issue #9 <https://github.com/ivankravets/platformio/issues/9>`_)
* Fixed bug with auto-conversation from Arduino \*.ino to \*.cpp
@ -15,28 +253,32 @@ Release History
* Disabled default warning flag "-Wall"
* Added auto-conversation from \*.ino to valid \*.cpp for Arduino/Energia
frameworks (`issue #7 <https://github.com/ivankravets/platformio/issues/7>`_)
* Added `Arduino example <https://github.com/ivankravets/platformio/tree/develop/examples/arduino-adafruit-library>`_
with external library (Adafruit CC3000)
* Implemented ``platformio upgrade`` command and "auto-check" for the latest
* Added `Arduino example <https://github.com/ivankravets/platformio/tree/develop/examples/>`_
with external library (*Adafruit CC3000*)
* Implemented `platformio upgrade <http://docs.platformio.org/en/latest/userguide/cmd_upgrade.html>`_
command and "auto-check" for the latest
version (`issue #8 <https://github.com/ivankravets/platformio/issues/8>`_)
* Fixed an issue with "auto-reset" for Raspduino board
* Fixed an issue with "auto-reset" for *Raspduino* board
* Fixed a bug with nested libs building
0.4.0 (2014-07-31)
------------------
* Implemented ``serialports`` command
* Implemented `platformio serialports <http://docs.platformio.org/en/latest/userguide/cmd_serialports.html>`_ command
* Allowed to put special build flags only for ``src`` files via
``srcbuild_flags`` environment option
`srcbuild_flags <http://docs.platformio.org/en/latest/projectconf.html#srcbuild-flags>`_
environment option
* Allowed to override some of settings via system environment variables
such as: ``$PIOSRCBUILD_FLAGS`` and ``$PIOENVS_DIR``
* Added ``--upload-port`` option for ``platformio run`` command
* Implemented (especially for `SmartAnthill <http://smartanthill.ikravets.com/>`_)
``platformio run -t uploadlazy`` target (no dependencies to framework libs,
ELF and etc.)
* Allowed to skip default packages via ``platformio install --skip-default-package`` flag
* Added tools for Raspberry Pi platform
* Added support for Microduino and Raspduino boards in ``atmelavr`` platform
such as: ``PLATFORMIO_SRCBUILD_FLAGS`` and ``PLATFORMIO_ENVS_DIR``
* Added ``--upload-port`` option for `platformio run <http://docs.platformio.org/en/latest/userguide/cmd_run.html#cmdoption--upload-port>`__ command
* Implemented (especially for `SmartAnthill <http://docs.smartanthill.ikravets.com/>`_)
`platformio run -t uploadlazy <http://docs.platformio.org/en/latest/userguide/cmd_run.html>`_
target (no dependencies to framework libs, ELF and etc.)
* Allowed to skip default packages via `platformio install --skip-default-package <http://docs.platformio.org/en/latest/userguide/cmd_install.html#cmdoption--skip-default>`_
option
* Added tools for *Raspberry Pi* platform
* Added support for *Microduino* and *Raspduino* boards in
`atmelavr <http://docs.platformio.org/en/latest/platforms/atmelavr.html>`_ platform
0.3.1 (2014-06-21)
@ -60,7 +302,7 @@ Release History
* Resolved `issue #1 "Build referred libraries" <https://github.com/ivankravets/platformio/issues/1>`_
* Renamed project's "libs" directory to "lib"
* Added `arduino-internal-library <https://github.com/ivankravets/platformio/tree/develop/examples/arduino-internal-library>`_ example
* Added `arduino-internal-library <https://github.com/ivankravets/platformio/tree/develop/examples/>`_ example
* Changed to beta status

View File

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2014 Ivan Kravets
Copyright (c) 2014-2015 Ivan Kravets
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -7,75 +7,137 @@ PlatformIO
.. image:: https://gemnasium.com/ivankravets/platformio.png
:target: https://gemnasium.com/ivankravets/platformio
:alt: Dependency Status
.. image:: https://pypip.in/version/platformio/badge.png
.. image:: https://pypip.in/version/platformio/badge.png?style=flat
:target: https://pypi.python.org/pypi/platformio/
:alt: Latest Version
.. image:: https://pypip.in/download/platformio/badge.png
.. image:: https://pypip.in/download/platformio/badge.png?style=flat
:target: https://pypi.python.org/pypi/platformio/
:alt: Downloads
.. image:: https://pypip.in/license/platformio/badge.png
.. image:: https://pypip.in/license/platformio/badge.png?style=flat
:target: https://pypi.python.org/pypi/platformio/
:alt: License
`Documentation <http://docs.platformio.ikravets.com>`_ /
`PDF <https://media.readthedocs.org/pdf/platformio/latest/platformio.pdf>`_ |
`Website + Library Search <http://platformio.org>`_ |
`Documentation <http://docs.platformio.org>`_ |
`Project Examples <https://github.com/ivankravets/platformio/tree/develop/examples>`_ |
`Bugs/Questions <https://github.com/ivankravets/platformio/issues>`_ |
`Blog <http://www.ikravets.com/category/computer-life/platformio>`_ |
`Twitter <https://twitter.com/smartanthill>`_
`Twitter <https://twitter.com/PlatformIO_Org>`_
**PlatformIO** is a cross-platform code builder and library manager.
.. image:: https://raw.githubusercontent.com/ivankravets/platformio/develop/docs/_static/platformio-logo.png
:target: http://platformio.org
* `Quickstart <http://docs.platformio.ikravets.com/en/latest/quickstart.html>`_
* `Installation <http://docs.platformio.ikravets.com/en/latest/installation.html>`_
* `Project Configuration File <http://docs.platformio.ikravets.com/en/latest/projectconf.html>`_
* `Platforms & Embedded Boards <http://docs.platformio.ikravets.com/en/latest/platforms/index.html>`_
* `User Guide <http://docs.platformio.ikravets.com/en/latest/userguide/index.html>`_
* `IDE Integration <http://docs.platformio.ikravets.com/en/latest/ide.html>`_
* `Release History <http://docs.platformio.ikravets.com/en/latest/history.html>`_
`PlatformIO <http://platformio.org>`_ is a cross-platform code builder
and the missing library manager.
You have no need to install any *IDE* or compile any tool chains. *PlatformIO*
* `Get Started <http://platformio.org/#!/get-started>`_
* `Web 2.0 Library Search <http://platformio.org/#!/lib>`_
* `Development Platforms <http://platformio.org/#!/platforms>`_
* `Frameworks <http://platformio.org/#!/frameworks>`_
* `Embedded Boards <http://platformio.org/#!/boards>`_
* `Library Manager <http://docs.platformio.org/en/latest/librarymanager/index.html>`_
* `User Guide <http://docs.platformio.org/en/latest/userguide/index.html>`_
* `IDE Integration <http://docs.platformio.org/en/latest/ide.html>`_
* `Release History <http://docs.platformio.org/en/latest/history.html>`_
You have **no need** to install any *IDE* or compile any tool chains. *PlatformIO*
has pre-built different development platforms including: compiler, debugger,
uploader (for embedded boards) and many other useful tools.
**PlatformIO** allows developer to compile the same code with different
platforms using only one command
`platformio run <http://docs.platformio.ikravets.com/en/latest/userguide/cmd_run.html>`_.
Use whenever. *Run everywhere.*
-------------------------------
*PlatformIO* is written in pure *Python* and **doesn't depend** on any
additional libraries/tools from an operation system. It allows you to use
*PlatformIO* beginning from *PC (Mac, Linux, Win)* and ending with credit-card
sized computers (`Raspberry Pi <http://www.raspberrypi.org>`_,
`BeagleBone <http://beagleboard.org>`_,
`CubieBoard <http://cubieboard.org>`_).
Embedded Development. *Easier Than Ever.*
-----------------------------------------
*PlatformIO* is well suited for embedded development and has pre-configured
settings for most popular `Embedded Boards <http://platformio.org/#!/boards>`_.
* Colourful `command-line output <https://raw.githubusercontent.com/ivankravets/platformio/develop/examples/platformio-examples.png>`_
* Built-in `Serial Port Monitor <http://docs.platformio.org/en/latest/userguide/cmd_serialports.html#platformio-serialports-monitor>`_
* Configurable `build -flags/-options <http://docs.platformio.org/en/latest/projectconf.html#build-flags>`_
* Automatic **firmware uploading**
* Integration with `development environments (IDE) <http://docs.platformio.org/en/latest/ide.html>`_
* Ready for **Cloud Compiling** and **Continuous Integration**
* Pre-built tool chains, frameworks for the popular `Hardware Platforms <http://platformio.org/#!/platforms>`_
.. image:: https://raw.githubusercontent.com/ivankravets/platformio-web/develop/app/images/platformio-embedded-development.png
:target: http://platformio.org
:alt: PlatformIO Embedded Development Process
The Missing Library Manager. *It's here!*
-----------------------------------------
*PlatformIO Library Manager* is the missing library manager for development
platforms which allows you to organize and have up-to-date external libraries.
* Friendly `Command-Line Interface <http://docs.platformio.org/en/latest/librarymanager/index.html>`_
* Modern `Web 2.0 Library Search <http://platformio.org/#!/lib>`_
* Open Source `Library Registry API <https://github.com/ivankravets/platformio-api>`_
* Library Crawler based on `library.json <http://docs.platformio.org/en/latest/librarymanager/config.html>`_
specification
* Library **dependency management**
* Automatic library updating
.. image:: https://raw.githubusercontent.com/ivankravets/platformio-web/develop/app/images/platformio-library-manager.png
:target: http://platformio.org
:alt: PlatformIO Library Manager Architecture
Smart Code Builder. *Fast and Reliable.*
----------------------------------------
*PlatformIO Code Builder* is built-on a next-generation software construction
tool named `SCons <http://www.scons.org/>`_. Think of *SCons* as an improved,
cross-platform substitute for the classic *Make* utility.
* Reliable, automatic *dependency analysis*
* Reliable detection of *build changes*
* Improved support for *parallel builds*
* Ability to share *built files in a cache*
* Lookup for external libraries which are installed via `Library Manager <http://docs.platformio.org/en/latest/librarymanager/index.html>`_
.. image:: https://raw.githubusercontent.com/ivankravets/platformio-web/develop/app/images/platformio-scons-builder.png
:target: http://platformio.org
:alt: PlatformIO Code Builder Architecture
Single source code. *Multiple platforms.*
-----------------------------------------
*PlatformIO* allows developer to compile the same code with different
development platforms using the *Only One Command*
`platformio run <http://docs.platformio.org/en/latest/userguide/cmd_run.html>`_.
This happens due to
`Project Configuration File <http://docs.platformio.ikravets.com/en/latest/projectconf.html>`_
where you can setup different environments with specific
options: platform type, firmware uploading settings, pre-built framework
and many more.
`Project Configuration File (platformio.ini) <http://docs.platformio.org/en/latest/projectconf.html>`_
where you can setup different environments with specific options (platform
type, firmware uploading settings, pre-built framework, build flags and many
more).
.. image:: examples/platformio-examples.png
:target: https://github.com/ivankravets/platformio/raw/develop/examples/platformio-examples.png
:alt: Examples
:width: 730px
It has support for the most popular embedded platforms:
**PlatformIO** is well suited for **embedded development**. It can:
* `Atmel AVR <http://platformio.org/#!/platforms/atmelavr>`_
* `Atmel SAM <http://platformio.org/#!/platforms/atmelsam>`_
* `Freescale Kinetis <http://platformio.org/#!/platforms/freescalekinetis>`_
* `Nordic nRF51 <http://platformio.org/#!/platforms/nordicnrf51>`_
* `NXP LPC. <http://platformio.org/#!/platforms/nxplpc>`_
* `ST STM32 <http://platformio.org/#!/platforms/ststm32>`_
* `Teensy <http://platformio.org/#!/platforms/teensy>`_
* `TI MSP430 <http://platformio.org/#!/platforms/timsp430>`_
* `TI TIVA C <http://platformio.org/#!/platforms/titiva>`_
* Automatically analyse dependency
* Reliably detect build changes
* Build framework or library source code to static library
* Build *ELF* (executable and linkable firmware)
* Convert *ELF* to *HEX* or *BIN* file
* Extract *EEPROM* data
* Upload firmware to your device
Frameworks:
It has support for many popular embedded platforms like these:
* ``atmelavr`` `Atmel AVR <http://en.wikipedia.org/wiki/Atmel_AVR>`_
(including `Arduino <http://www.arduino.cc>`_ based boards)
* ``timsp430`` `TI MSP430 <http://www.ti.com/lsds/ti/microcontroller/16-bit_msp430/overview.page>`_
(including `MSP430 LaunchPads <http://www.ti.com/ww/en/launchpad/launchpads-msp430.html>`_)
* ``titiva`` `TI TIVA C <http://www.ti.com/lsds/ti/microcontroller/tiva_arm_cortex/c_series/overview.page>`_
(including `TIVA C Series LaunchPads <http://www.ti.com/ww/en/launchpad/launchpads-connected.html>`_)
* `Arduino <http://platformio.org/#!/frameworks/arduino>`_
* `CMSIS <http://platformio.org/#!/frameworks/cmsis>`_
* `libOpenCM3 <http://platformio.org/#!/frameworks/libopencm3>`_
* `Energia <http://platformio.org/#!/frameworks/energia>`_
* `SPL <http://platformio.org/#!/frameworks/spl>`_
* `mbed <http://platformio.org/#!/frameworks/mbed>`_
Licence
-------
Copyright (C) 2014 Ivan Kravets
Copyright (C) 2014-2015 Ivan Kravets
Licenced under the MIT Licence.

BIN
docs/_static/ide-platformio-arduino.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

BIN
docs/_static/ide-platformio-eclipse.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 KiB

BIN
docs/_static/ide-platformio-energia.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

BIN
docs/_static/ide-platformio-vim.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

BIN
docs/_static/platformio-logo.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -45,7 +45,7 @@ master_doc = 'index'
# General information about the project.
project = u'PlatformIO'
copyright = u'2014, Ivan Kravets'
copyright = u'2014-2015, Ivan Kravets'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@ -274,4 +274,5 @@ if not on_rtd: # only import and set the theme if we're building docs locally
# A timeout value, in seconds, for the linkcheck builder
# http://sphinx-doc.org/config.html#confval-linkcheck_timeout
linkcheck_timeout = 30
linkcheck_timeout = 10
linkcheck_anchors = False

120
docs/envvars.rst Normal file
View File

@ -0,0 +1,120 @@
.. _envvars:
Environment variables
=====================
`Environment variables <http://en.wikipedia.org/wiki/Environment_variable>`_
are a set of dynamic named values that can affect the way running processes
will behave on a computer.
*PlatformIO* handles variables which start with ``PLATFORMIO_`` prefix. They
have the **HIGHEST PRIORITY**.
.. contents::
General
-------
PlatformIO uses *General* environment variables for the common
operations/commands.
.. _envvar_CI:
CI
~~
PlatformIO handles ``CI`` variable which is setup by
`Continuous Integration <http://en.wikipedia.org/wiki/Continuous_integration>`_
(Travis, Circle and etc.) systems.
Currently, PlatformIO uses it to disable prompts.
In other words, ``CI=true`` automatically setup
:ref:`PLATFORMIO_SETTING_ENABLE_PROMPTS=false <envvar_PLATFORMIO_SETTING_ENABLE_PROMPTS>`.
.. _envvar_PLATFORMIO_HOME_DIR:
PLATFORMIO_HOME_DIR
~~~~~~~~~~~~~~~~~~~
Allows to override :ref:`projectconf` option
:ref:`projectconf_pio_home_dir`.
.. _envvar_PLATFORMIO_LIB_DIR:
PLATFORMIO_LIB_DIR
~~~~~~~~~~~~~~~~~~
Allows to override :ref:`projectconf` option
:ref:`projectconf_pio_lib_dir`.
.. _envvar_PLATFORMIO_SRC_DIR:
PLATFORMIO_SRC_DIR
~~~~~~~~~~~~~~~~~~
Allows to override :ref:`projectconf` option
:ref:`projectconf_pio_src_dir`.
.. _envvar_PLATFORMIO_ENVS_DIR:
PLATFORMIO_ENVS_DIR
~~~~~~~~~~~~~~~~~~~
Allows to override :ref:`projectconf` option
:ref:`projectconf_pio_envs_dir`.
Builder
-------
.. _envvar_PLATFORMIO_SRCBUILD_FLAGS:
PLATFORMIO_SRCBUILD_FLAGS
~~~~~~~~~~~~~~~~~~~~~~~~~
Allows to override :ref:`projectconf` option
:ref:`projectconf_srcbuild_flags`.
Settings
--------
Allows to override PlatformIO settings. You can manage them via
:ref:`cmd_settings` command.
PLATFORMIO_SETTING_AUTO_UPDATE_LIBRARIES
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Allows to override setting :ref:`setting_auto_update_libraries`.
PLATFORMIO_SETTING_AUTO_UPDATE_PLATFORMS
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Allows to override setting :ref:`setting_auto_update_platforms`.
PLATFORMIO_SETTING_CHECK_LIBRARIES_INTERVAL
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Allows to override setting :ref:`setting_check_libraries_interval`.
PLATFORMIO_SETTING_CHECK_PLATFORMIO_INTERVAL
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Allows to override setting :ref:`setting_check_platformio_interval`.
PLATFORMIO_SETTING_CHECK_PLATFORMS_INTERVAL
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Allows to override setting :ref:`setting_check_platforms_interval`.
.. _envvar_PLATFORMIO_SETTING_ENABLE_PROMPTS:
PLATFORMIO_SETTING_ENABLE_PROMPTS
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Allows to override setting :ref:`setting_enable_prompts`.
PLATFORMIO_SETTING_ENABLE_TELEMETRY
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Allows to override setting :ref:`setting_enable_telemetry`.

602
docs/frameworks/arduino.rst Normal file
View File

@ -0,0 +1,602 @@
.. _framework_arduino:
Framework ``arduino``
=====================
Arduino Framework allows writing cross-platform software to control devices attached to a wide range of Arduino boards to create all kinds of creative coding, interactive objects, spaces or physical experiences.
For more detailed information please visit `vendor site <http://arduino.cc/en/Reference/HomePage>`_.
.. contents::
Platforms
---------
.. list-table::
:header-rows: 1
* - Name
- Description
* - :ref:`platform_atmelavr`
- Atmel AVR 8- and 32-bit MCUs deliver a unique combination of performance, power efficiency and design flexibility. Optimized to speed time to market-and easily adapt to new ones-they are based on the industrys most code-efficient architecture for C and assembly programming.
* - :ref:`platform_atmelsam`
- Atmel | SMART offers Flash- based ARM products based on the ARM Cortex-M0+, Cortex-M3 and Cortex-M4 architectures, ranging from 8KB to 2MB of Flash including a rich peripheral and feature mix.
* - :ref:`platform_teensy`
- Teensy is a complete USB-based microcontroller development system, in a very small footprint, capable of implementing many types of projects. All programming is done via the USB port. No special programmer is needed, only a standard "Mini-B" USB cable and a PC or Macintosh with a USB port.
* - :ref:`platform_timsp430`
- MSP430 microcontrollers (MCUs) from Texas Instruments (TI) are 16-bit, RISC-based, mixed-signal processors designed for ultra-low power. These MCUs offer the lowest power consumption and the perfect mix of integrated peripherals for thousands of applications.
Boards
------
.. note::
* You can list pre-configured boards by :ref:`cmd_boards` command or
`PlatformIO Boards Explorer <http://platformio.org/#!/boards>`_
* For more detailed ``board`` information please scroll tables below by horizontal.
Adafruit
~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``flora8``
- `Adafruit Flora <http://www.adafruit.com/product/659>`_
- ATMEGA32U4
- 8 MHz
- 32 Kb
- 2.5 Kb
* - ``protrinket3``
- `Pro Trinket 3V/12MHz (USB) <http://www.adafruit.com/products/2010>`_
- ATMEGA328P
- 12 MHz
- 32 Kb
- 2 Kb
* - ``protrinket3ftdi``
- `Pro Trinket 3V/12MHz (FTDI) <http://www.adafruit.com/products/2010>`_
- ATMEGA328P
- 16 MHz
- 32 Kb
- 2 Kb
* - ``protrinket5``
- `Pro Trinket 5V/16MHz (USB) <http://www.adafruit.com/products/2000>`_
- ATMEGA328P
- 16 MHz
- 32 Kb
- 2 Kb
* - ``protrinket5ftdi``
- `Pro Trinket 5V/16MHz (USB) <http://www.adafruit.com/products/2000>`_
- ATMEGA328P
- 16 MHz
- 32 Kb
- 2 Kb
* - ``trinket3``
- `Adafruit Trinket 3V/8MHz <http://www.adafruit.com/products/1500>`_
- ATTINY85
- 8 MHz
- 8 Kb
- 0.5 Kb
* - ``trinket5``
- `Adafruit Trinket 5V/16MHz <http://www.adafruit.com/products/1501>`_
- ATTINY85
- 16 MHz
- 8 Kb
- 0.5 Kb
Arduino
~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``LilyPadUSB``
- `LilyPad Arduino USB <http://arduino.cc/en/Main/ArduinoBoardLilyPadUSB>`_
- ATMEGA32U4
- 8 MHz
- 32 Kb
- 2.5 Kb
* - ``atmegangatmega168``
- `Arduino NG or older ATmega168 <http://arduino.cc/en/main/boards>`_
- ATMEGA168
- 16 MHz
- 16 Kb
- 1 Kb
* - ``atmegangatmega8``
- `Arduino NG or older ATmega8 <http://arduino.cc/en/main/boards>`_
- ATMEGA8
- 16 MHz
- 8 Kb
- 1 Kb
* - ``btatmega168``
- `Arduino BT ATmega168 <http://arduino.cc/en/main/boards>`_
- ATMEGA168
- 16 MHz
- 16 Kb
- 1 Kb
* - ``btatmega328``
- `Arduino BT ATmega328 <http://arduino.cc/en/main/boards>`_
- ATMEGA328P
- 16 MHz
- 32 Kb
- 2 Kb
* - ``diecimilaatmega168``
- `Arduino Duemilanove or Diecimila ATmega168 <http://arduino.cc/en/Main/ArduinoBoardDiecimila>`_
- ATMEGA168
- 16 MHz
- 16 Kb
- 1 Kb
* - ``diecimilaatmega328``
- `Arduino Duemilanove or Diecimila ATmega328 <http://arduino.cc/en/Main/ArduinoBoardDiecimila>`_
- ATMEGA328P
- 16 MHz
- 32 Kb
- 2 Kb
* - ``due``
- `Arduino Due (Programming Port) <http://arduino.cc/en/Main/arduinoBoardDue>`_
- AT91SAM3X8E
- 84 MHz
- 512 Kb
- 32 Kb
* - ``dueUSB``
- `Arduino Due (USB Native Port) <http://arduino.cc/en/Main/arduinoBoardDue>`_
- AT91SAM3X8E
- 84 MHz
- 512 Kb
- 32 Kb
* - ``esplora``
- `Arduino Esplora <http://arduino.cc/en/Main/ArduinoBoardEsplora>`_
- ATMEGA32U4
- 16 MHz
- 32 Kb
- 2.5 Kb
* - ``ethernet``
- `Arduino Ethernet <http://arduino.cc/en/Main/ArduinoBoardEthernet>`_
- ATMEGA328P
- 16 MHz
- 32 Kb
- 2 Kb
* - ``fio``
- `Arduino Fio <http://arduino.cc/en/Main/ArduinoBoardFio>`_
- ATMEGA328P
- 8 MHz
- 32 Kb
- 2 Kb
* - ``leonardo``
- `Arduino Leonardo <http://arduino.cc/en/Main/arduinoBoardLeonardo>`_
- ATMEGA32U4
- 16 MHz
- 32 Kb
- 2.5 Kb
* - ``lilypadatmega168``
- `LilyPad Arduino ATmega168 <http://arduino.cc/en/Main/ArduinoBoardLilyPad>`_
- ATMEGA168
- 8 MHz
- 16 Kb
- 1 Kb
* - ``lilypadatmega328``
- `LilyPad Arduino ATmega328 <http://arduino.cc/en/Main/ArduinoBoardLilyPad>`_
- ATMEGA328P
- 8 MHz
- 32 Kb
- 2 Kb
* - ``megaADK``
- `Arduino Mega ADK <http://arduino.cc/en/Main/ArduinoBoardMegaADK>`_
- ATMEGA2560
- 16 MHz
- 256 Kb
- 8 Kb
* - ``megaatmega1280``
- `Arduino Mega or Mega 2560 ATmega1280 <http://arduino.cc/en/Main/arduinoBoardMega>`_
- ATMEGA1280
- 16 MHz
- 128 Kb
- 8 Kb
* - ``megaatmega2560``
- `Arduino Mega or Mega 2560 ATmega2560 (Mega 2560) <http://arduino.cc/en/Main/arduinoBoardMega2560>`_
- ATMEGA2560
- 16 MHz
- 256 Kb
- 8 Kb
* - ``micro``
- `Arduino Micro <http://arduino.cc/en/Main/ArduinoBoardMicro>`_
- ATMEGA32U4
- 16 MHz
- 32 Kb
- 2.5 Kb
* - ``miniatmega168``
- `Arduino Mini ATmega168 <http://arduino.cc/en/Main/ArduinoBoardMini>`_
- ATMEGA168
- 16 MHz
- 16 Kb
- 1 Kb
* - ``miniatmega328``
- `Arduino Mini ATmega328 <http://arduino.cc/en/Main/ArduinoBoardMini>`_
- ATMEGA328P
- 16 MHz
- 32 Kb
- 2 Kb
* - ``nanoatmega168``
- `Arduino Nano ATmega168 <http://arduino.cc/en/Main/ArduinoBoardNano>`_
- ATMEGA168
- 16 MHz
- 16 Kb
- 1 Kb
* - ``nanoatmega328``
- `Arduino Nano ATmega328 <http://arduino.cc/en/Main/ArduinoBoardNano>`_
- ATMEGA328P
- 16 MHz
- 32 Kb
- 2 Kb
* - ``pro16MHzatmega168``
- `Arduino Pro or Pro Mini ATmega168 (5V, 16 MHz) <http://arduino.cc/en/Main/ArduinoBoardProMini>`_
- ATMEGA168
- 16 MHz
- 16 Kb
- 1 Kb
* - ``pro16MHzatmega328``
- `Arduino Pro or Pro Mini ATmega328 (5V, 16 MHz) <http://arduino.cc/en/Main/ArduinoBoardProMini>`_
- ATMEGA328P
- 16 MHz
- 32 Kb
- 2 Kb
* - ``pro8MHzatmega168``
- `Arduino Pro or Pro Mini ATmega168 (3.3V, 8 MHz) <http://arduino.cc/en/Main/ArduinoBoardProMini>`_
- ATMEGA168
- 8 MHz
- 16 Kb
- 1 Kb
* - ``pro8MHzatmega328``
- `Arduino Pro or Pro Mini ATmega328 (3.3V, 8 MHz) <http://arduino.cc/en/Main/ArduinoBoardProMini>`_
- ATMEGA328P
- 8 MHz
- 32 Kb
- 2 Kb
* - ``robotControl``
- `Arduino Robot Control <http://arduino.cc/en/Main/Robot>`_
- ATMEGA32U4
- 16 MHz
- 32 Kb
- 2.5 Kb
* - ``robotMotor``
- `Arduino Robot Motor <http://arduino.cc/en/Main/Robot>`_
- ATMEGA32U4
- 16 MHz
- 32 Kb
- 2.5 Kb
* - ``uno``
- `Arduino Uno <http://arduino.cc/en/Main/ArduinoBoardUno>`_
- ATMEGA328P
- 16 MHz
- 32 Kb
- 2 Kb
* - ``yun``
- `Arduino Yun <http://arduino.cc/en/Main/ArduinoBoardYun>`_
- ATMEGA32U4
- 16 MHz
- 32 Kb
- 2.5 Kb
BitWizard
~~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``raspduino``
- `Raspduino <http://www.bitwizard.nl/wiki/index.php/Raspduino>`_
- ATMEGA328P
- 16 MHz
- 32 Kb
- 2 Kb
Digistump
~~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``digispark-pro``
- `Digispark Pro (Default 16 MHz) <http://digistump.com/products/109>`_
- ATTINY167
- 16 MHz
- 16 Kb
- 0.5 Kb
* - ``digispark-pro32``
- `Digispark Pro (16 MHz) (32 byte buffer) <http://digistump.com/products/109>`_
- ATTINY167
- 16 MHz
- 16 Kb
- 0.5 Kb
* - ``digispark-pro64``
- `Digispark Pro (16 MHz) (64 byte buffer) <http://digistump.com/products/109>`_
- ATTINY167
- 16 MHz
- 16 Kb
- 0.5 Kb
* - ``digispark-tiny``
- `Digispark (Default - 16 MHz) <http://digistump.com/products/1>`_
- ATTINY85
- 16 MHz
- 8 Kb
- 0.5 Kb
* - ``digix``
- `Digistump DigiX <http://digistump.com/products/50>`_
- AT91SAM3X8E
- 84 MHz
- 512 Kb
- 28 Kb
Engduino
~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``engduinov1``
- `Engduino 1 <http://www.engduino.org>`_
- ATMEGA32U4
- 8 MHz
- 32 Kb
- 2.5 Kb
* - ``engduinov2``
- `Engduino 2 <http://www.engduino.org>`_
- ATMEGA32U4
- 8 MHz
- 32 Kb
- 2.5 Kb
* - ``engduinov3``
- `Engduino 3 <http://www.engduino.org>`_
- ATMEGA32U4
- 8 MHz
- 32 Kb
- 2.5 Kb
Microduino
~~~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``1284p16m``
- `Microduino Core+ (ATmega1284P@16M,5V) <https://www.microduino.cc/wiki/index.php?title=Microduino-Core%2B>`_
- ATMEGA1284P
- 16 MHz
- 128 Kb
- 16 Kb
* - ``1284p8m``
- `Microduino Core+ (ATmega1284P@8M,3.3V) <https://www.microduino.cc/wiki/index.php?title=Microduino-Core%2B>`_
- ATMEGA1284P
- 8 MHz
- 128 Kb
- 16 Kb
* - ``168pa16m``
- `Microduino Core (Atmega168PA@16M,5V) <https://www.microduino.cc/wiki/index.php?title=Microduino-Core>`_
- ATMEGA168P
- 16 MHz
- 16 Kb
- 1 Kb
* - ``168pa8m``
- `Microduino Core (Atmega168PA@8M,3.3V) <https://www.microduino.cc/wiki/index.php?title=Microduino-Core>`_
- ATMEGA168P
- 8 MHz
- 16 Kb
- 1 Kb
* - ``328p16m``
- `Microduino Core (Atmega328P@16M,5V) <https://www.microduino.cc/wiki/index.php?title=Microduino-Core>`_
- ATMEGA328P
- 16 MHz
- 32 Kb
- 2 Kb
* - ``328p8m``
- `Microduino Core (Atmega328P@8M,3.3V) <https://www.microduino.cc/wiki/index.php?title=Microduino-Core>`_
- ATMEGA328P
- 8 MHz
- 32 Kb
- 2 Kb
* - ``32u416m``
- `Microduino Core USB (ATmega32U4@16M,5V) <https://www.microduino.cc/wiki/index.php?title=Microduino-CoreUSB>`_
- ATMEGA32U4
- 16 MHz
- 32 Kb
- 2.5 Kb
* - ``644pa16m``
- `Microduino Core+ (Atmega644PA@16M,5V) <https://www.microduino.cc/wiki/index.php?title=Microduino-Core%2B>`_
- ATMEGA644P
- 16 MHz
- 64 Kb
- 4 Kb
* - ``644pa8m``
- `Microduino Core+ (Atmega644PA@8M,3.3V) <https://www.microduino.cc/wiki/index.php?title=Microduino-Core%2B>`_
- ATMEGA644P
- 8 MHz
- 64 Kb
- 4 Kb
PanStamp
~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``panStampAVR``
- `PanStamp AVR <http://www.panstamp.com/product/panstamp-avr/>`_
- ATMEGA328P
- 8 MHz
- 32 Kb
- 2 Kb
* - ``panStampNRG``
- `PanStamp NRG 1.1 <http://www.panstamp.com/product/197/>`_
- CC430F5137
- 12 MHz
- 32 Kb
- 4 Kb
SainSmart
~~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``sainSmartDue``
- `SainSmart Due (Programming Port) <http://www.sainsmart.com/arduino/control-boards/sainsmart-due-atmel-sam3x8e-arm-cortex-m3-board-black.html>`_
- AT91SAM3X8E
- 84 MHz
- 512 Kb
- 32 Kb
* - ``sainSmartDueUSB``
- `SainSmart Due (USB Native Port) <http://www.sainsmart.com/arduino/control-boards/sainsmart-due-atmel-sam3x8e-arm-cortex-m3-board-black.html>`_
- AT91SAM3X8E
- 84 MHz
- 512 Kb
- 32 Kb
Teensy
~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``teensy20``
- `Teensy 2.0 <https://www.pjrc.com/store/teensy.html>`_
- ATMEGA32U4
- 16 MHz
- 32 Kb
- 2.5 Kb
* - ``teensy20pp``
- `Teensy++ 2.0 <https://www.pjrc.com/store/teensypp.html>`_
- AT90USB1286
- 16 MHz
- 128 Kb
- 8 Kb
* - ``teensy30``
- `Teensy 3.0 <https://www.pjrc.com/store/teensy3.html>`_
- MK20DX128
- 48 MHz
- 128 Kb
- 16 Kb
* - ``teensy31``
- `Teensy 3.1 <https://www.pjrc.com/store/teensy31.html>`_
- MK20DX256
- 72 MHz
- 256 Kb
- 64 Kb

62
docs/frameworks/cmsis.rst Normal file
View File

@ -0,0 +1,62 @@
.. _framework_cmsis:
Framework ``cmsis``
===================
The ARM Cortex Microcontroller Software Interface Standard (CMSIS) is a vendor-independent hardware abstraction layer for the Cortex-M processor series and specifies debugger interfaces. The CMSIS enables consistent and simple software interfaces to the processor for interface peripherals, real-time operating systems, and middleware. It simplifies software re-use, reducing the learning curve for new microcontroller developers and cutting the time-to-market for devices.
For more detailed information please visit `vendor site <http://www.arm.com/products/processors/cortex-m/cortex-microcontroller-software-interface-standard.php>`_.
.. contents::
Platforms
---------
.. list-table::
:header-rows: 1
* - Name
- Description
* - :ref:`platform_ststm32`
- The STM32 family of 32-bit Flash MCUs based on the ARM Cortex-M processor is designed to offer new degrees of freedom to MCU users. It offers a 32-bit product range that combines very high performance, real-time capabilities, digital signal processing, and low-power, low-voltage operation, while maintaining full integration and ease of development.
Boards
------
.. note::
* You can list pre-configured boards by :ref:`cmd_boards` command or
`PlatformIO Boards Explorer <http://platformio.org/#!/boards>`_
* For more detailed ``board`` information please scroll tables below by horizontal.
ST
~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``disco_f303vc``
- `STM32F3DISCOVERY <http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF254044>`_
- STM32F303VCT6
- 72 MHz
- 256 Kb
- 48 Kb
* - ``disco_f407vg``
- `STM32F4DISCOVERY <http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF252419>`_
- STM32F407VGT6
- 168 MHz
- 1024 Kb
- 128 Kb
* - ``disco_l152rb``
- `STM32LDISCOVERY <http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF258515>`_
- STM32L152RBT6
- 32 MHz
- 128 Kb
- 16 Kb

114
docs/frameworks/energia.rst Normal file
View File

@ -0,0 +1,114 @@
.. _framework_energia:
Framework ``energia``
=====================
Energia framework enables pretty much anyone to start easily creating microcontroller-based projects and applications. Its easy-to-use libraries and functions provide developers of all experience levels to start blinking LEDs, buzzing buzzers and sensing sensors more quickly than ever before.
For more detailed information please visit `vendor site <http://energia.nu/reference/>`_.
.. contents::
Platforms
---------
.. list-table::
:header-rows: 1
* - Name
- Description
* - :ref:`platform_timsp430`
- MSP430 microcontrollers (MCUs) from Texas Instruments (TI) are 16-bit, RISC-based, mixed-signal processors designed for ultra-low power. These MCUs offer the lowest power consumption and the perfect mix of integrated peripherals for thousands of applications.
* - :ref:`platform_titiva`
- Texas Instruments TM4C12x MCUs offer the industrys most popular ARM Cortex-M4 core with scalable memory and package options, unparalleled connectivity peripherals, advanced application functions, industry-leading analog integration, and extensive software solutions.
Boards
------
.. note::
* You can list pre-configured boards by :ref:`cmd_boards` command or
`PlatformIO Boards Explorer <http://platformio.org/#!/boards>`_
* For more detailed ``board`` information please scroll tables below by horizontal.
TI
~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``lplm4f120h5qr``
- `LaunchPad (Stellaris) w/ lm4f120 (80MHz) <http://www.ti.com/tool/ek-lm4f120xl>`_
- LPLM4F120H5QR
- 80 MHz
- 256 Kb
- 32 Kb
* - ``lpmsp430f5529``
- `LaunchPad w/ msp430f5529 (16MHz) <http://www.ti.com/ww/en/launchpad/launchpads-msp430-msp-exp430f5529lp.html>`_
- MSP430F5529
- 16 MHz
- 128 Kb
- 1 Kb
* - ``lpmsp430f5529_25``
- `LaunchPad w/ msp430f5529 (25MHz) <http://www.ti.com/ww/en/launchpad/launchpads-msp430-msp-exp430f5529lp.html>`_
- MSP430F5529
- 25 MHz
- 128 Kb
- 1 Kb
* - ``lpmsp430fr5739``
- `FraunchPad w/ msp430fr5739 <http://www.ti.com/tool/msp-exp430fr5739>`_
- MSP430FR5739
- 16 MHz
- 16 Kb
- 1 Kb
* - ``lpmsp430fr5969``
- `LaunchPad w/ msp430fr5969 <http://www.ti.com/ww/en/launchpad/launchpads-msp430-msp-exp430fr5969.html>`_
- MSP430FR5969
- 8 MHz
- 64 Kb
- 1 Kb
* - ``lpmsp430g2231``
- `LaunchPad w/ msp430g2231 (1 MHz) <http://www.ti.com/ww/en/launchpad/launchpads-msp430-msp-exp430g2.html>`_
- MSP430G2231
- 1 MHz
- 2 Kb
- 0.125 Kb
* - ``lpmsp430g2452``
- `LaunchPad w/ msp430g2452 (16MHz) <http://www.ti.com/ww/en/launchpad/launchpads-msp430-msp-exp430g2.html>`_
- MSP430G2452
- 16 MHz
- 8 Kb
- 0.25 Kb
* - ``lpmsp430g2553``
- `LaunchPad w/ msp430g2553 (16MHz) <http://www.ti.com/ww/en/launchpad/launchpads-msp430-msp-exp430g2.html>`_
- MSP430G2553
- 16 MHz
- 16 Kb
- 0.5 Kb
* - ``lptm4c1230c3pm``
- `LaunchPad (Tiva C) w/ tm4c123 (80MHz) <http://www.ti.com/ww/en/launchpad/launchpads-connected-ek-tm4c123gxl.html>`_
- LPTM4C1230C3PM
- 80 MHz
- 256 Kb
- 32 Kb
* - ``lptm4c1294ncpdt``
- `LaunchPad (Tiva C) w/ tm4c129 (120MHz) <http://www.ti.com/ww/en/launchpad/launchpads-connected-ek-tm4c1294xl.html>`_
- LPTM4C1294NCPDT
- 120 MHz
- 1024 Kb
- 256 Kb

14
docs/frameworks/index.rst Normal file
View File

@ -0,0 +1,14 @@
.. _frameworks:
Frameworks
==========
.. toctree::
:maxdepth: 2
arduino
cmsis
energia
libopencm3
mbed
spl

View File

@ -0,0 +1,99 @@
.. _framework_libopencm3:
Framework ``libopencm3``
========================
The libOpenCM3 framework aims to create a free/libre/open-source firmware library for various ARM Cortex-M0(+)/M3/M4 microcontrollers, including ST STM32, Ti Tiva and Stellaris, NXP LPC 11xx, 13xx, 15xx, 17xx parts, Atmel SAM3, Energy Micro EFM32 and others.
For more detailed information please visit `vendor site <http://www.libopencm3.org/wiki/Main_Page>`_.
.. contents::
Platforms
---------
.. list-table::
:header-rows: 1
* - Name
- Description
* - :ref:`platform_ststm32`
- The STM32 family of 32-bit Flash MCUs based on the ARM Cortex-M processor is designed to offer new degrees of freedom to MCU users. It offers a 32-bit product range that combines very high performance, real-time capabilities, digital signal processing, and low-power, low-voltage operation, while maintaining full integration and ease of development.
* - :ref:`platform_titiva`
- Texas Instruments TM4C12x MCUs offer the industrys most popular ARM Cortex-M4 core with scalable memory and package options, unparalleled connectivity peripherals, advanced application functions, industry-leading analog integration, and extensive software solutions.
Boards
------
.. note::
* You can list pre-configured boards by :ref:`cmd_boards` command or
`PlatformIO Boards Explorer <http://platformio.org/#!/boards>`_
* For more detailed ``board`` information please scroll tables below by horizontal.
ST
~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``disco_f303vc``
- `STM32F3DISCOVERY <http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF254044>`_
- STM32F303VCT6
- 72 MHz
- 256 Kb
- 48 Kb
* - ``disco_f407vg``
- `STM32F4DISCOVERY <http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF252419>`_
- STM32F407VGT6
- 168 MHz
- 1024 Kb
- 128 Kb
* - ``disco_l152rb``
- `STM32LDISCOVERY <http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF258515>`_
- STM32L152RBT6
- 32 MHz
- 128 Kb
- 16 Kb
TI
~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``lplm4f120h5qr``
- `LaunchPad (Stellaris) w/ lm4f120 (80MHz) <http://www.ti.com/tool/ek-lm4f120xl>`_
- LPLM4F120H5QR
- 80 MHz
- 256 Kb
- 32 Kb
* - ``lptm4c1230c3pm``
- `LaunchPad (Tiva C) w/ tm4c123 (80MHz) <http://www.ti.com/ww/en/launchpad/launchpads-connected-ek-tm4c123gxl.html>`_
- LPTM4C1230C3PM
- 80 MHz
- 256 Kb
- 32 Kb
* - ``lptm4c1294ncpdt``
- `LaunchPad (Tiva C) w/ tm4c129 (120MHz) <http://www.ti.com/ww/en/launchpad/launchpads-connected-ek-tm4c1294xl.html>`_
- LPTM4C1294NCPDT
- 120 MHz
- 1024 Kb
- 256 Kb

548
docs/frameworks/mbed.rst Normal file
View File

@ -0,0 +1,548 @@
.. _framework_mbed:
Framework ``mbed``
==================
The mbed framework The mbed SDK has been designed to provide enough hardware abstraction to be intuitive and concise, yet powerful enough to build complex projects. It is built on the low-level ARM CMSIS APIs, allowing you to code down to the metal if needed. In addition to RTOS, USB and Networking libraries, a cookbook of hundreds of reusable peripheral and module libraries have been built on top of the SDK by the mbed Developer Community.
For more detailed information please visit `vendor site <http://mbed.org/>`_.
.. contents::
Platforms
---------
.. list-table::
:header-rows: 1
* - Name
- Description
* - :ref:`platform_freescalekinetis`
- Freescale Kinetis Microcontrollers is family of multiple hardware- and software-compatible ARM Cortex-M0+, Cortex-M4 and Cortex-M7-based MCU series. Kinetis MCUs offer exceptional low-power performance, scalability and feature integration.
* - :ref:`platform_nordicnrf51`
- The Nordic nRF51 Series is a family of highly flexible, multi-protocol, system-on-chip (SoC) devices for ultra-low power wireless applications. nRF51 Series devices support a range of protocol stacks including Bluetooth Smart (previously called Bluetooth low energy), ANT and proprietary 2.4GHz protocols such as Gazell.
* - :ref:`platform_nxplpc`
- The NXP LPC is a family of 32-bit microcontroller integrated circuits by NXP Semiconductors. The LPC chips are grouped into related series that are based around the same 32-bit ARM processor core, such as the Cortex-M4F, Cortex-M3, Cortex-M0+, or Cortex-M0. Internally, each microcontroller consists of the processor core, static RAM memory, flash memory, debugging interface, and various peripherals.
* - :ref:`platform_ststm32`
- The STM32 family of 32-bit Flash MCUs based on the ARM Cortex-M processor is designed to offer new degrees of freedom to MCU users. It offers a 32-bit product range that combines very high performance, real-time capabilities, digital signal processing, and low-power, low-voltage operation, while maintaining full integration and ease of development.
Boards
------
.. note::
* You can list pre-configured boards by :ref:`cmd_boards` command or
`PlatformIO Boards Explorer <http://platformio.org/#!/boards>`_
* For more detailed ``board`` information please scroll tables below by horizontal.
CQ Publishing
~~~~~~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``lpc11u35_501``
- `TG-LPC11U35-501 <https://developer.mbed.org/platforms/TG-LPC11U35-501/>`_
- LPC11U35
- 48 MHz
- 64 Kb
- 10 Kb
Embedded Artists
~~~~~~~~~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``lpc11u35``
- `EA LPC11U35 QuickStart Board <https://developer.mbed.org/platforms/EA-LPC11U35/>`_
- LPC11U35
- 48 MHz
- 64 Kb
- 10 Kb
* - ``lpc4088``
- `EA LPC4088 QuickStart Board <https://developer.mbed.org/platforms/EA-LPC4088/>`_
- LPC4088
- 120 MHz
- 512 Kb
- 96 Kb
* - ``lpc4088_dm``
- `EA LPC4088 Display Module <https://developer.mbed.org/platforms/EA-LPC4088-Display-Module/>`_
- LPC4088
- 120 MHz
- 512 Kb
- 96 Kb
Freescale
~~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``IBMEthernetKit``
- `Ethernet IoT Starter Kit <http://developer.mbed.org/platforms/IBMEthernetKit/>`_
- MK64FN1M0VLL12
- 120 MHz
- 1024 Kb
- 256 Kb
* - ``frdm_k20d50m``
- `Freescale Kinetis FRDM-K20D50M <https://developer.mbed.org/platforms/FRDM-K20D50M/>`_
- MK20DX128VLH5
- 48 MHz
- 128 Kb
- 16 Kb
* - ``frdm_k22f``
- `Freescale Kinetis FRDM-K22F <https://developer.mbed.org/platforms/FRDM-K22F/>`_
- MK22FN512VLH12
- 120 MHz
- 512 Kb
- 128 Kb
* - ``frdm_k64f``
- `Freescale Kinetis FRDM-K64F <https://developer.mbed.org/platforms/FRDM-K64F/>`_
- MK64FN1M0VLL12
- 120 MHz
- 1024 Kb
- 256 Kb
* - ``frdm_kl05z``
- `Freescale Kinetis FRDM-KL05Z <https://developer.mbed.org/platforms/FRDM-KL05Z/>`_
- MKL05Z32VFM4
- 48 MHz
- 32 Kb
- 4 Kb
* - ``frdm_kl25z``
- `Freescale Kinetis FRDM-KL25Z <https://developer.mbed.org/platforms/KL25Z/>`_
- MKL25Z128VLK4
- 48 MHz
- 128 Kb
- 16 Kb
* - ``frdm_kl46z``
- `Freescale Kinetis FRDM-KL46Z <https://developer.mbed.org/platforms/FRDM-KL46Z/>`_
- MKL46Z256VLL4
- 48 MHz
- 256 Kb
- 32 Kb
JKSoft
~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``wallBotBLE``
- `JKSoft Wallbot BLE <https://developer.mbed.org/platforms/JKSoft-Wallbot-BLE/>`_
- NRF51822
- 16 MHz
- 128 Kb
- 16 Kb
NGX Technologies
~~~~~~~~~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``blueboard_lpc11u24``
- `BlueBoard-LPC11U24 <https://developer.mbed.org/platforms/BlueBoard-LPC11U24/>`_
- LPC11U24
- 48 MHz
- 32 Kb
- 8 Kb
NXP
~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``lpc11u24``
- `mbed LPC11U24 <https://developer.mbed.org/platforms/mbed-LPC11U24/>`_
- LPC11U24
- 48 MHz
- 32 Kb
- 8 Kb
* - ``lpc1549``
- `LPCXpresso1549 <https://developer.mbed.org/platforms/LPCXpresso1549/>`_
- LPC1549
- 72 MHz
- 256 Kb
- 36 Kb
* - ``lpc1768``
- `mbed LPC1768 <http://developer.mbed.org/platforms/mbed-LPC1768/>`_
- LPC1768
- 96 MHz
- 512 Kb
- 32 Kb
Nordic
~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``nrf51_dk``
- `Nordic nRF51-DK <https://developer.mbed.org/platforms/Nordic-nRF51-DK/>`_
- NRF51822
- 32 MHz
- 256 Kb
- 32 Kb
* - ``nrf51_dongle``
- `Nordic nRF51-Dongle <https://developer.mbed.org/platforms/Nordic-nRF51-Dongle/>`_
- NRF51822
- 32 MHz
- 256 Kb
- 32 Kb
* - ``nrf51_mkit``
- `Nordic nRF51822-mKIT <http://developer.mbed.org/platforms/Nordic-nRF51822/>`_
- NRF51822
- 16 MHz
- 128 Kb
- 16 Kb
Outrageous Circuits
~~~~~~~~~~~~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``mbuino``
- `Outrageous Circuits mBuino <https://developer.mbed.org/platforms/Outrageous-Circuits-mBuino/>`_
- LPC11U24
- 48 MHz
- 32 Kb
- 8 Kb
RedBearLab
~~~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``redBearLab``
- `RedBearLab nRF51822 <https://developer.mbed.org/platforms/RedBearLab-nRF51822/>`_
- NRF51822
- 16 MHz
- 256 Kb
- 16 Kb
* - ``redBearLabBLENano``
- `RedBearLab BLE Nano <https://developer.mbed.org/platforms/RedBearLab-BLE-Nano/>`_
- NRF51822
- 16 MHz
- 256 Kb
- 16 Kb
ST
~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``disco_f051r8``
- `STM32F0DISCOVERY <http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF253215>`_
- STM32F051R8T6
- 48 MHz
- 64 Kb
- 8 Kb
* - ``disco_f100rb``
- `STM32VLDISCOVERY <http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF250863>`_
- STM32F100RBT6
- 24 MHz
- 128 Kb
- 8 Kb
* - ``disco_f303vc``
- `STM32F3DISCOVERY <http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF254044>`_
- STM32F303VCT6
- 72 MHz
- 256 Kb
- 48 Kb
* - ``disco_f334c8``
- `32F3348DISCOVERY <http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF260318>`_
- STM32F334C8T6
- 72 MHz
- 64 Kb
- 16 Kb
* - ``disco_f401vc``
- `32F401CDISCOVERY <http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF259098>`_
- STM32F401VCT6
- 84 MHz
- 256 Kb
- 64 Kb
* - ``disco_f407vg``
- `STM32F4DISCOVERY <http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF252419>`_
- STM32F407VGT6
- 168 MHz
- 1024 Kb
- 128 Kb
* - ``disco_f429zi``
- `32F429IDISCOVERY <http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF259090>`_
- STM32F429ZIT6
- 180 MHz
- 2048 Kb
- 256 Kb
* - ``nucleo_f030r8``
- `ST Nucleo F030R8 <https://developer.mbed.org/platforms/ST-Nucleo-F030R8/>`_
- STM32F030R8T6
- 48 MHz
- 64 Kb
- 8 Kb
* - ``nucleo_f070rb``
- `ST Nucleo F070RB <https://developer.mbed.org/platforms/ST-Nucleo-F070RB/>`_
- STM32F070RBT6
- 48 MHz
- 128 Kb
- 16 Kb
* - ``nucleo_f072rb``
- `ST Nucleo F072RB <https://developer.mbed.org/platforms/ST-Nucleo-F072RB/>`_
- STM32F072RBT6
- 48 MHz
- 128 Kb
- 16 Kb
* - ``nucleo_f091rc``
- `ST Nucleo F091RC <https://developer.mbed.org/platforms/ST-Nucleo-F091RC/>`_
- STM32F091RCT6
- 48 MHz
- 256 Kb
- 32 Kb
* - ``nucleo_f103rb``
- `ST Nucleo F103RB <https://developer.mbed.org/platforms/ST-Nucleo-F103RB/>`_
- STM32F103RBT6
- 72 MHz
- 128 Kb
- 20 Kb
* - ``nucleo_f302r8``
- `ST Nucleo F302R8 <https://developer.mbed.org/platforms/ST-Nucleo-F302R8/>`_
- STM32F302R8T6
- 72 MHz
- 64 Kb
- 16 Kb
* - ``nucleo_f303re``
- `ST Nucleo F303RE <http://developer.mbed.org/platforms/ST-Nucleo-F303RE/>`_
- STM32F303RET6
- 72 MHz
- 512 Kb
- 64 Kb
* - ``nucleo_f334r8``
- `ST Nucleo F334R8 <https://developer.mbed.org/platforms/ST-Nucleo-F334R8/>`_
- STM32F334R8T6
- 72 MHz
- 64 Kb
- 16 Kb
* - ``nucleo_f401re``
- `ST Nucleo F401RE <https://developer.mbed.org/platforms/ST-Nucleo-F401RE/>`_
- STM32F401RET6
- 84 MHz
- 512 Kb
- 96 Kb
* - ``nucleo_f411re``
- `ST Nucleo F411RE <https://developer.mbed.org/platforms/ST-Nucleo-F411RE/>`_
- STM32F411RET6
- 100 MHz
- 512 Kb
- 128 Kb
* - ``nucleo_l053r8``
- `ST Nucleo L053R8 <https://developer.mbed.org/platforms/ST-Nucleo-L053R8/>`_
- STM32L053R8T6
- 48 MHz
- 64 Kb
- 8 Kb
* - ``nucleo_l152re``
- `ST Nucleo L152RE <https://developer.mbed.org/platforms/ST-Nucleo-L152RE/>`_
- STM32L152RET6
- 32 MHz
- 512 Kb
- 80 Kb
SeeedStudio
~~~~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``seeedTinyBLE``
- `Seeed Tiny BLE <http://developer.mbed.org/platforms/Seeed-Tiny-BLE/>`_
- NRF51822
- 16 MHz
- 256 Kb
- 16 Kb
* - ``seeeduinoArchPro``
- `Seeeduino-Arch-Pro <https://developer.mbed.org/platforms/Seeeduino-Arch-Pro/>`_
- LPC1768
- 96 MHz
- 512 Kb
- 32 Kb
Solder Splash Labs
~~~~~~~~~~~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``dipcortexm0``
- `DipCortex M0 <https://developer.mbed.org/platforms/DipCortex-M0/>`_
- LPC11U24
- 50 MHz
- 32 Kb
- 8 Kb
Switch Science
~~~~~~~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``hrm1017``
- `Switch Science mbed HRM1017 <https://developer.mbed.org/platforms/mbed-HRM1017/>`_
- NRF51822
- 16 MHz
- 256 Kb
- 16 Kb
* - ``lpc1114fn28``
- `mbed LPC1114FN28 <https://developer.mbed.org/platforms/LPC1114FN28/>`_
- LPC1114FN28
- 48 MHz
- 32 Kb
- 4 Kb
u-blox
~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``ubloxc027``
- `u-blox C027 <https://developer.mbed.org/platforms/u-blox-C027/>`_
- LPC1768
- 96 MHz
- 512 Kb
- 32 Kb

62
docs/frameworks/spl.rst Normal file
View File

@ -0,0 +1,62 @@
.. _framework_spl:
Framework ``spl``
=================
The ST Standard Peripheral Library provides a set of functions for handling the peripherals on the STM32 Cortex-M3 family. The idea is to save the user (the new user, in particular) having to deal directly with the registers.
For more detailed information please visit `vendor site <http://www.st.com/web/en/catalog/tools/FM147/CL1794/SC961/SS1743?sc=stm32embeddedsoftware>`_.
.. contents::
Platforms
---------
.. list-table::
:header-rows: 1
* - Name
- Description
* - :ref:`platform_ststm32`
- The STM32 family of 32-bit Flash MCUs based on the ARM Cortex-M processor is designed to offer new degrees of freedom to MCU users. It offers a 32-bit product range that combines very high performance, real-time capabilities, digital signal processing, and low-power, low-voltage operation, while maintaining full integration and ease of development.
Boards
------
.. note::
* You can list pre-configured boards by :ref:`cmd_boards` command or
`PlatformIO Boards Explorer <http://platformio.org/#!/boards>`_
* For more detailed ``board`` information please scroll tables below by horizontal.
ST
~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``disco_f303vc``
- `STM32F3DISCOVERY <http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF254044>`_
- STM32F303VCT6
- 72 MHz
- 256 Kb
- 48 Kb
* - ``disco_f407vg``
- `STM32F4DISCOVERY <http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF252419>`_
- STM32F407VGT6
- 168 MHz
- 1024 Kb
- 128 Kb
* - ``disco_l152rb``
- `STM32LDISCOVERY <http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF258515>`_
- STM32L152RBT6
- 32 MHz
- 128 Kb
- 16 Kb

View File

@ -3,20 +3,47 @@
IDE Integration
===============
.. contents::
Arduino IDE
-----------
.. image:: _static/ide-platformio-arduino.png
:target: http://www.ikravets.com/computer-life/platformio/2014/10/07/integration-of-platformio-library-manager-to-arduino-and-energia-ides
* `Integration of PlatformIO library manager to Arduino IDE <http://www.ikravets.com/computer-life/platformio/2014/10/07/integration-of-platformio-library-manager-to-arduino-and-energia-ides>`_
Eclipse
-------
`Building and debugging Atmel AVR (Arduino-based) project using Eclipse IDE+PlatformIO <http://www.ikravets.com/computer-life/programming/2014/06/20/building-and-debugging-atmel-avr-arduino-based-project-using-eclipse-ideplatformio>`_
.. image:: _static/ide-platformio-eclipse.png
:target: http://www.ikravets.com/computer-life/programming/2014/06/20/building-and-debugging-atmel-avr-arduino-based-project-using-eclipse-ideplatformio
* `Building and debugging Atmel AVR (Arduino-based) project using Eclipse IDE+PlatformIO <http://www.ikravets.com/computer-life/programming/2014/06/20/building-and-debugging-atmel-avr-arduino-based-project-using-eclipse-ideplatformio>`_
* `More examples (TI MSP430, TI TIVA and etc) <https://github.com/ivankravets/platformio/tree/develop/examples/ide-eclipse>`_
Energia IDE
-----------
.. image:: _static/ide-platformio-energia.png
:target: http://www.ikravets.com/computer-life/platformio/2014/10/07/integration-of-platformio-library-manager-to-arduino-and-energia-ides
* `Integration of PlatformIO library manager to Energia IDE <http://www.ikravets.com/computer-life/platformio/2014/10/07/integration-of-platformio-library-manager-to-arduino-and-energia-ides>`_
VIM
---
.. image:: _static/ide-platformio-vim.png
Recommended bundles:
* Syntax highlight - `Arduino-syntax-file <https://github.com/vim-scripts/Arduino-syntax-file>`_
* Code Completion - `YouCompleteMe <https://github.com/Valloric/YouCompleteMe>`_
* Code Completion - `YouCompleteMe <https://github.com/Valloric/YouCompleteMe>`_ (see configuration example by **Anthony Ford** `PlatformIO/YouCompleteMe Integration <https://gist.github.com/ajford/f551b2b6fd4d6b6e1ef2>`_)
* Syntax checking - `Syntastic <https://github.com/scrooloose/syntastic>`_
Put to the project directory ``Makefile`` wrapper with contents:
.. code-block:: make

View File

@ -1,11 +1,15 @@
PlatformIO: A cross-platform code builder and library manager
=============================================================
PlatformIO: A cross-platform code builder and the missing library manager
=========================================================================
.. image:: _static/platformio-logo.png
:target: http://platformio.org
`Website + Library Search <http://platformio.org>`_ |
`Project Examples <https://github.com/ivankravets/platformio/tree/develop/examples>`_ |
`Source Code <https://github.com/ivankravets/platformio>`_ |
`Bugs/Questions <https://github.com/ivankravets/platformio/issues>`_ |
`Issues <https://github.com/ivankravets/platformio/issues>`_ |
`Blog <http://www.ikravets.com/category/computer-life/platformio>`_ |
`Twitter <https://twitter.com/smartanthill>`_
`Twitter <https://twitter.com/PlatformIO_Org>`_
You have no need to install any *IDE* or compile any tool chains. *PlatformIO*
has pre-built different development platforms including: compiler, debugger,
@ -17,19 +21,31 @@ platforms using only one command :ref:`cmd_run`. This happens due to
options: platform type, firmware uploading settings, pre-built framework
and many more.
Each platform consists of packages which are located in own repository.
Due to :ref:`cmd_update` command you will have up-to-date development
instruments.
Embedded Development. *Easier Than Ever.*
-----------------------------------------
**PlatformIO** is well suited for **embedded development**. It can:
* Colourful command-line output
* Built-in :ref:`Serial Port Monitor <cmd_serialports_monitor>`
* Configurable build :ref:`-flags/-options <projectconf_build_flags>`
* Integration with :ref:`development environments (IDE) <ide>`
* Pre-built tool chains, :ref:`frameworks` for the popular Hardware Platforms
* Automatically analyse dependency
* Reliably detect build changes
* Build framework or library source code to static library
* Build *ELF* (executable and linkable firmware)
* Convert *ELF* to *HEX* or *BIN* file
* Extract *EEPROM* data
* Upload firmware to your device
Smart Code Builder. *Fast and Reliable.*
----------------------------------------
* Reliable, automatic dependency analysis and detection of build changes
* Improved support for parallel builds
* Ability to share built files in a cache
* Lookup for external libraries which are installed via :ref:`librarymanager`
The Missing Library Manager. *It's here!*
-----------------------------------------
* Friendly Command-Line Interface
* Modern `Web 2.0 Library Search <http://platformio.org/#!/lib>`_
* Library dependency management
* Automatic library updating
* It runs on Windows, Mac OS X, and Linux (+ARM).
Contents
@ -41,7 +57,10 @@ Contents
quickstart
installation
projectconf
platforms/index
envvars
Platforms & Boards <platforms/index>
frameworks/index
librarymanager/index
userguide/index
ide
history

View File

@ -3,37 +3,65 @@
Installation
============
*PlatformIO* is written in `Python <https://www.python.org>`_ and works with
versions 2.6 and 2.7 on Unix/Linux, OS X, Windows and Credit-card ARM-based
computers (Raspberry Pi).
**PlatformIO** is written in `Python <https://www.python.org/downloads/>`_ and
works on Mac OS X, Linux, Windows OS and *ARM*-based credit-card sized
computers (`Raspberry Pi <http://www.raspberrypi.org>`_,
`BeagleBone <http://beagleboard.org>`_,
`CubieBoard <http://cubieboard.org>`_).
.. contents::
System requirements
-------------------
* **Operating systems:**
* Mac OS X
* Linux, +ARM
* Windows
* `Python 2.6 or Python 2.7 <https://www.python.org/downloads/>`_
All commands below should be executed in
`Command-line <http://en.wikipedia.org/wiki/Command-line_interface>`_
application in your *OS*:
application:
* *Unix/Linux/OS X* this is *Terminal* application.
* *Mac OS X / Linux* this is *Terminal* application.
* *Windows* this is
`Command Prompt <http://en.wikipedia.org/wiki/Command_Prompt>`_ (``cmd.exe``)
application.
.. warning::
If you are going to run *PlatformIO* from **subprocess**, you **MUST
DISABLE** all prompts. It will allow you to avoid blocking.
There are a few options:
Super-Quick
-----------
- using environment variable :ref:`PLATFORMIO_SETTING_ENABLE_PROMPTS=No <envvar_PLATFORMIO_SETTING_ENABLE_PROMPTS>`
- disable global setting ``enable_prompts`` via :ref:`cmd_settings` command
- masking under Continuous Integration system via environment variable
:ref:`CI=true <envvar_CI>`.
Please *choose one of* the following:
Super-Quick (Mac / Linux)
-------------------------
To install or upgrade *PlatformIO* paste that at a *Terminal* prompt
(**you might need** to run ``sudo`` first):
.. code-block:: bash
python -c "$(curl -fsSL https://raw.githubusercontent.com/ivankravets/platformio/master/scripts/get-platformio.py)"
Installer Script (Mac / Linux / Windows)
----------------------------------------
To install or upgrade *PlatformIO*, download
`get-platformio.py <https://raw.githubusercontent.com/ivankravets/platformio/develop/scripts/get-platformio.py>`_ script.
Then run the following (which may require administrator access):
`get-platformio.py <https://raw.githubusercontent.com/ivankravets/platformio/develop/scripts/get-platformio.py>`_
script. Then run the following (you might need to run ``sudo`` first):
.. code-block:: bash
$ python get-platformio.py
An alternative short version for *Mac/Linux* users:
.. code-block:: bash
$ curl -L http://bit.ly/1lpanta | python
python get-platformio.py
On *Windows OS* it may look like:
@ -43,9 +71,11 @@ On *Windows OS* it may look like:
C:\Python27\python.exe get-platformio.py
.. warning::
If you have an error ``pkg_resources.DistributionNotFound`` try to
uninstall *PlatformIO* ``$ pip uninstall platformio``, then install it via
``$ easy_install platformio``.
If you have an error ``pkg_resources.DistributionNotFound`` please
upgrade *SetupTools* package: ``$ [sudo] pip uninstall setuptools``
and ``$ [sudo] pip install setuptools``.
Then re-install *PlatformIO*: ``$ [sudo] pip uninstall platformio``
and ``$ [sudo] pip install platformio``.
Full Guide
@ -90,3 +120,24 @@ For upgrading the ``platformio`` to new version please use this command:
$ pip install -U platformio
Development Version
-------------------
.. warning::
We don't recommend to use ``develop`` version in production.
1. If you had have already installed PlatformIO, please uninstall it:
.. code-block:: bash
$ pip uninstall platformio
2. Install the latest PlatformIO from the ``develop`` branch:
.. code-block:: bash
$ pip install https://github.com/ivankravets/platformio/archive/develop.zip
If you want to be up-to-date with the latest ``develop`` version of PlatformIO,
then you need to perform step #2 each time if you see the new commits in
`PlatformIO GitHub repository <https://github.com/ivankravets/platformio/commits/develop>`_.

View File

@ -0,0 +1,307 @@
.. |PIOAPICR| replace:: *PlatformIO Library Registry Crawler*
.. _library_config:
library.json
============
``library.json`` is a manifest file of development library.
Initially it was
developed for :ref:`librarymanager`, but later was accepted by worldwide embedded
community like a **standard library specification**.
A data in ``library.json`` should be represented
in `JSON-style <http://en.wikipedia.org/wiki/JSON>`_ via
`associative array <http://en.wikipedia.org/wiki/Associative_array>`_
(name/value pairs). An order doesn't matter. The allowable fields
(names from pairs) are described below.
.. contents::
.. _libjson_name:
``name``
--------
**Required** | Type: ``String`` | Max. Length: 50
A name of the library.
* Must be unique.
* Should be slug style for simplicity, consistency and compatibility.
Example: *Arduino-SPI*
* Title Case, Aa-z, can contain digits and dashes (but not start/end
with them).
* Consecutive dashes are not allowed.
.. _libjson_description:
``description``
---------------
**Required** | Type: ``String`` | Max. Length: 255
The field helps users to identify and search for your library with a brief
description. Describe the hardware devices (sensors, boards and etc.) which
are suitable with it.
.. _libjson_keywords:
``keywords``
------------
**Required** | Type: ``String`` | Max. Length: 255
Used for search by keyword. Helps to make your library easier to discover
without people needing to know its name.
The keyword should be lowercased, can contain a-z, digits and dash (but not
start/end with them). A list from the keywords can be specified with
separator ``,``
.. _libjson_authors:
``authors``
-----------
*Required* if :ref:`libjson_repository` field is not defined | Type: ``Object``
or ``Array``
An author contact information
* ``name`` Full name (**Required**)
* ``email``
* ``url`` An author's contact page
* ``maintainer`` Specify "maintainer" status
Examples:
.. code-block:: javascript
"authors":
{
"name": "John Smith",
"email": "me@john-smith.com",
"url": "http://www.john-smith/contact"
}
...
"authors":
[
{
"name": "John Smith",
"email": "me@john-smith.com",
"url": "http://www.john-smith/contact"
},
{
"name": "Andrew Smith",
"email": "me@andrew-smith.com",
"url": "http://www.andrew-smith/contact",
"maintainer": true
}
]
.. note::
You can omit :ref:`libjson_authors` field and define
:ref:`libjson_repository` field. Only *GitHub-based* repository is
supported now. In this case
|PIOAPICR| will use information from
`GitHub API Users <https://developer.github.com/v3/users/>`_.
.. _libjson_repository:
``repository``
--------------
*Required* if :ref:`libjson_downloadurl` field is not defined | Type: ``Object``
The repository in which the source code can be found.
Example:
.. code-block:: javascript
"repository":
{
"type": "git",
"url": "https://github.com/foo/bar.git"
}
.. _libjson_downloadurl:
``downloadUrl``
---------------
*Required* if :ref:`libjson_repository` field is not defined | Type: ``String``
It is the *HTTP URL* to the archived source code of library. It should end
with the type of archive (``.zip`` or ``.tar.gz``).
.. _libjson_version:
``version``
-----------
*Required* if :ref:`libjson_repository` field is not defined | Type: ``String``
| Max. Length: 20
A version of the current library source code.
* Can contain a-z, digits, dots or dash.
* `Semantic Versioning <http://semver.org>`_ is recommended.
* A `CVS <http://en.wikipedia.org/wiki/Concurrent_Versions_System>`_
revision from the latest commit. Example: ``13`` (*SVN*) or first 10
chars of *SHA* digest ``e4564b7da4`` (*Git*).
.. note::
You can omit :ref:`libjson_version` field and define
:ref:`libjson_repository` field. In this case
|PIOAPICR| will use the *CVS*-revision from the latest commit.
.. _libjson_include:
``include``
-----------
*Optional* | Type: ``String`` or ``Array`` |
`Glob Pattern <http://en.wikipedia.org/wiki/Glob_(programming)>`_
If :ref:`libjson_include` field is a type of ``String``, then
|PIOAPICR| will recognize it like a "relative path inside
repository/archive to library source code". See example below where the only
source code from the relative directory ``LibrarySourceCodeHere`` will be
included.
.. code-block:: javascript
"include": "some/child/dir/LibrarySourceCodeHere"
If :ref:`libjson_include` field is a type of ``Array``, then
|PIOAPICR| firstly will apply :ref:`libjson_exclude` filter and
then include only directories/files which match with :ref:`libjson_include`
patterns.
Example:
.. code-block:: javascript
"include":
[
"dir/*.[ch]pp",
"dir/examples/*",
"*/*/*.h"
]
Pattern Meaning
.. list-table::
:header-rows: 1
* - Pattern
- Meaning
* - ``*``
- matches everything
* - ``?``
- matches any single character
* - ``[seq]``
- matches any character in seq
* - ``[!seq]``
- matches any character not in seq
.. _libjson_exclude:
``exclude``
-----------
*Optional* | Type: ``String`` or ``Array`` |
`Glob Pattern <http://en.wikipedia.org/wiki/Glob_(programming)>`_
Exclude the directories and files which match with :ref:`libjson_exclude`
patterns.
.. _libjson_frameworks:
``frameworks``
--------------
*Optional* | Type: ``String`` or ``Array``
A list with compatible frameworks. The available framework types are defined in
the :ref:`platforms` section.
.. _libjson_platforms:
``platforms``
-------------
*Optional* | Type: ``String`` or ``Array``
A list with compatible platforms. The available platform types are
defined in :ref:`platforms` section.
.. _libjson_dependencies:
``dependencies``
----------------
*Optional* | Type: ``Array`` or ``Object``
A list of dependent libraries. They will be installed automatically with
:ref:`cmd_lib_install` command.
Allowed requirements for dependent library:
* ``name`` | Type: ``String``
* ``authors`` | Type: ``String`` or ``Array``
* ``frameworks`` | Type: ``String`` or ``Array``
* ``platforms`` | Type: ``String`` or ``Array``
Example:
.. code-block:: javascript
"dependencies":
[
{
"name": "Library-Foo",
"authors":
[
"Jhon Smith",
"Andrew Smith"
]
},
{
"name": "Library-Bar",
"frameworks": "FrameworkFoo, FrameworkBar"
}
]
.. _libjson_examples:
``examples``
----------------
*Optional* | Type: ``String`` or ``Array`` |
`Glob Pattern <http://en.wikipedia.org/wiki/Glob_(programming)>`_
A list of example patterns. This field is predefined with default value:
.. code-block:: javascript
"examples": [
"[Ee]xamples/*/*.ini",
"[Ee]xamples/*/*.pde"
]

View File

@ -0,0 +1,136 @@
.. _library_creating:
.. |PIOAPICR| replace:: *PlatformIO Library Registry Crawler*
Creating Library
================
*PlatformIO* :ref:`librarymanager` doesn't have any requirements to a library
source code structure. The only one requirement is library's manifest file -
:ref:`library_config`. It can be located inside your library or in the another
location where |PIOAPICR| will have *HTTP* access.
.. contents::
Source Code Location
--------------------
There are a several ways how to share your library with the whole world
(see `examples <https://github.com/ivankravets/platformio-libmirror/tree/master/configs>`_).
You can hold a lot of libraries (split into separated folders) inside one of
the repository/archive. In this case please use :ref:`libjson_include`
field to specify the relative path to your library's source code.
At GitHub
^^^^^^^^^
**Recommended**
If a library source code is located at `GitHub <https://github.com>`_, then
you **need to specify** only these fields in the :ref:`library_config`:
* :ref:`libjson_name`
* :ref:`libjson_keywords`
* :ref:`libjson_description`
* :ref:`libjson_repository`
|PIOAPICR| will populate the rest fields, like :ref:`libjson_version` or
:ref:`libjson_authors` with an actual information from *GitHub*.
Example:
.. code-block:: javascript
{
"name": "IRremote",
"keywords": "infrared, ir, remote",
"description": "Send and receive infrared signals with multiple protocols",
"repository":
{
"type": "git",
"url": "https://github.com/shirriff/Arduino-IRremote.git"
},
"frameworks": "arduino",
"platforms": "atmelavr"
}
Under CVS (SVN/GIT)
^^^^^^^^^^^^^^^^^^^
|PIOAPICR| can operate with a library source code that is under *CVS* control.
The list of **required** fields in the :ref:`library_config` will look like:
* :ref:`libjson_name`
* :ref:`libjson_keywords`
* :ref:`libjson_description`
* :ref:`libjson_authors`
* :ref:`libjson_repository`
Example:
.. code-block:: javascript
{
"name": "XBee",
"keywords": "xbee, protocol, radio",
"description": "Arduino library for communicating with XBees in API mode",
"authors":
{
"name": "Andrew Rapp",
"email": "andrew.rapp@gmail.com",
"url": "https://code.google.com/u/andrew.rapp@gmail.com/"
},
"repository":
{
"type": "git",
"url": "https://code.google.com/p/xbee-arduino/"
},
"frameworks": "arduino",
"platforms": "atmelavr"
}
Self-hosted
^^^^^^^^^^^
You can manually archive (*Zip, Tar.Gz*) your library source code and host it
in the *Internet*. Then you should specify the additional fields,
like :ref:`libjson_version` and :ref:`libjson_downloadurl`. The final list
of **required** fields in the :ref:`library_config` will look like:
* :ref:`libjson_name`
* :ref:`libjson_keywords`
* :ref:`libjson_description`
* :ref:`libjson_authors`
* :ref:`libjson_version`
* :ref:`libjson_downloadurl`
.. code-block:: javascript
{
"name": "OneWire",
"keywords": "onewire, 1-wire, bus, sensor, temperature, ibutton",
"description": "Control devices (from Dallas Semiconductor) that use the One Wire protocol (DS18S20, DS18B20, DS2408 and etc)",
"authors":
{
"name": "Paul Stoffregen",
"url": "http://www.pjrc.com/teensy/td_libs_OneWire.html"
},
"version": "2.2",
"downloadUrl": "http://www.pjrc.com/teensy/arduino_libraries/OneWire.zip",
"include": "OneWire",
"frameworks": "arduino",
"platforms": "atmelavr"
}
Register
--------
The registration requirements:
* A library must adhere to the :ref:`library_config` specification.
* There must be public *HTTP* access to the library :ref:`library_config` file.
Now, you can :ref:`register <cmd_lib_register>` your library and allow others
to :ref:`install <cmd_lib_install>` it.

View File

@ -0,0 +1,25 @@
.. _librarymanager:
Library Manager
===============
..
*"The missing library manager for development platforms"* [#]_
*PlatformIO Library Manager* allows you to organize external embedded libraries.
You can search for new libraries via :ref:`Command Line interface <cmd_lib_search>`
or `Web 2.0 Library Search <http://platformio.org/#!/lib>`_.
You don't need to bother for finding the latest version of library. Due to
:ref:`cmd_lib_update` command you will have up-to-date external libraries.
.. toctree::
:maxdepth: 2
config
creating
User Guide <../userguide/lib/index.rst>
.. [#] Inspired by `npm <https://www.npmjs.com/>`_ and `bower
<http://bower.io>`_ package managers for web.

View File

@ -2,12 +2,9 @@
Platform ``atmelavr``
=====================
Atmel AVR 8- and 32-bit MCUs deliver a unique combination of performance, power efficiency and design flexibility. Optimized to speed time to market-and easily adapt to new ones-they are based on the industrys most code-efficient architecture for C and assembly programming.
`Atmel AVR® 8- and 32-bit MCUs <http://www.atmel.com/products/microcontrollers/avr/default.aspx>`_
deliver a unique combination of performance, power efficiency and design
flexibility. Optimized to speed time to market—and easily adapt to new
ones—they are based on the industry's most code-efficient architecture for
C and assembly programming.
For more detailed information please visit `vendor site <http://www.atmel.com/products/microcontrollers/avr/default.aspx>`_.
.. contents::
@ -18,49 +15,107 @@ Packages
:header-rows: 1
* - Name
- Alias
- Contents
* - ``toolchain-atmelavr``
- toolchain
- `avr-gcc <https://gcc.gnu.org/wiki/avr-gcc>`_,
`GDB <http://www.gnu.org/software/gdb/>`_,
`AVaRICE <http://avarice.sourceforge.net>`_,
`SimulAVR <http://www.nongnu.org/simulavr/>`_
- `avr-gcc <https://gcc.gnu.org/wiki/avr-gcc>`_, `GDB <http://www.gnu.org/software/gdb/>`_, `AVaRICE <http://avarice.sourceforge.net/>`_, `SimulAVR <http://www.nongnu.org/simulavr/>`_
* - ``tool-avrdude``
- uploader
- `AVRDUDE <http://www.nongnu.org/avrdude/>`_
* - ``framework-arduinoavr``
-
- See below in :ref:`atmelavr_frameworks`
- `Arduino Wiring-based Framework (AVR Core, 1.6) <http://arduino.cc/en/Reference/HomePage>`_
* - ``tool-micronucleus``
- `Micronucleus <https://github.com/micronucleus/micronucleus>`_
.. warning::
**Linux Users:** Don't forget to install "udev" rules file
`99-platformio-udev.rules <https://github.com/ivankravets/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
.. note::
You can install ``atmelavr`` platform with these packages
via :ref:`cmd_install` command.
.. _atmelavr_frameworks:
Frameworks
----------
.. list-table::
:header-rows: 1
* - Type ``framework``
- Name
- Reference
* - ``arduino``
- Arduino Wiring-based Framework (AVR Core, 1.5.x branch)
- `Documentation <http://arduino.cc/en/Reference/HomePage>`_
* - Name
- Description
* - :ref:`framework_arduino`
- Arduino Framework allows writing cross-platform software to control devices attached to a wide range of Arduino boards to create all kinds of creative coding, interactive objects, spaces or physical experiences.
Boards
------
.. note::
For more detailed ``board`` information please scroll tables below by
horizontal.
* You can list pre-configured boards by :ref:`cmd_boards` command or
`PlatformIO Boards Explorer <http://platformio.org/#!/boards>`_
* For more detailed ``board`` information please scroll tables below by
horizontal.
Adafruit
~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``flora8``
- `Adafruit Flora <http://www.adafruit.com/product/659>`_
- ATMEGA32U4
- 8 MHz
- 32 Kb
- 2.5 Kb
* - ``protrinket3``
- `Pro Trinket 3V/12MHz (USB) <http://www.adafruit.com/products/2010>`_
- ATMEGA328P
- 12 MHz
- 32 Kb
- 2 Kb
* - ``protrinket3ftdi``
- `Pro Trinket 3V/12MHz (FTDI) <http://www.adafruit.com/products/2010>`_
- ATMEGA328P
- 16 MHz
- 32 Kb
- 2 Kb
* - ``protrinket5``
- `Pro Trinket 5V/16MHz (USB) <http://www.adafruit.com/products/2000>`_
- ATMEGA328P
- 16 MHz
- 32 Kb
- 2 Kb
* - ``protrinket5ftdi``
- `Pro Trinket 5V/16MHz (USB) <http://www.adafruit.com/products/2000>`_
- ATMEGA328P
- 16 MHz
- 32 Kb
- 2 Kb
* - ``trinket3``
- `Adafruit Trinket 3V/8MHz <http://www.adafruit.com/products/1500>`_
- ATTINY85
- 8 MHz
- 8 Kb
- 0.5 Kb
* - ``trinket5``
- `Adafruit Trinket 5V/16MHz <http://www.adafruit.com/products/1501>`_
- ATTINY85
- 16 MHz
- 8 Kb
- 0.5 Kb
Arduino
~~~~~~~
@ -70,153 +125,308 @@ Arduino
* - Type ``board``
- Name
- Microcontroller ``board_mcu``
- Frequency ``board_f_cpu``
- Microcontroller
- Frequency
- Flash
- RAM
* - ``diecimilaatmega168``
- `Arduino Diecimila or Duemilanove (ATmega168)
<http://arduino.cc/en/Main/ArduinoBoardDiecimila>`_
- ATmega168 ``atmega168``
- 16 MHz ``16000000L``
* - ``LilyPadUSB``
- `LilyPad Arduino USB <http://arduino.cc/en/Main/ArduinoBoardLilyPadUSB>`_
- ATMEGA32U4
- 8 MHz
- 32 Kb
- 2.5 Kb
* - ``atmegangatmega168``
- `Arduino NG or older ATmega168 <http://arduino.cc/en/main/boards>`_
- ATMEGA168
- 16 MHz
- 16 Kb
- 1 Kb
* - ``atmegangatmega8``
- `Arduino NG or older ATmega8 <http://arduino.cc/en/main/boards>`_
- ATMEGA8
- 16 MHz
- 8 Kb
- 1 Kb
* - ``btatmega168``
- `Arduino BT ATmega168 <http://arduino.cc/en/main/boards>`_
- ATMEGA168
- 16 MHz
- 16 Kb
- 1 Kb
* - ``btatmega328``
- `Arduino BT ATmega328 <http://arduino.cc/en/main/boards>`_
- ATMEGA328P
- 16 MHz
- 32 Kb
- 2 Kb
* - ``diecimilaatmega168``
- `Arduino Duemilanove or Diecimila ATmega168 <http://arduino.cc/en/Main/ArduinoBoardDiecimila>`_
- ATMEGA168
- 16 MHz
- 16 Kb
- 1 Kb
* - ``diecimilaatmega328``
- `Arduino Diecimila or Duemilanove (ATmega328)
<http://arduino.cc/en/Main/ArduinoBoardDiecimila>`_
- ATmega328 ``atmega328``
- 16 MHz ``16000000L``
- `Arduino Duemilanove or Diecimila ATmega328 <http://arduino.cc/en/Main/ArduinoBoardDiecimila>`_
- ATMEGA328P
- 16 MHz
- 32 Kb
- 2 Kb
* - ``esplora``
- `Arduino Esplora <http://arduino.cc/en/Main/ArduinoBoardEsplora>`_
- ATMEGA32U4
- 16 MHz
- 32 Kb
- 2.5 Kb
* - ``ethernet``
- `Arduino Ethernet <http://arduino.cc/en/Main/ArduinoBoardEthernet>`_
- ATMEGA328P
- 16 MHz
- 32 Kb
- 2 Kb
* - ``fio``
- `Arduino Fio
<http://arduino.cc/en/Main/ArduinoBoardFio>`_
- ATmega328P ``atmega328p``
- 8 MHz ``8000000L``
- `Arduino Fio <http://arduino.cc/en/Main/ArduinoBoardFio>`_
- ATMEGA328P
- 8 MHz
- 32 Kb
- 2 Kb
* - ``leonardo``
- `Arduino Leonardo <http://arduino.cc/en/Main/arduinoBoardLeonardo>`_
- ATmega32u4 ``atmega32u4``
- 16 MHz ``16000000L``
- 32 Kb
- 2.5 Kb
* - ``LilyPadUSB``
- `Arduino LilyPad USB
<http://arduino.cc/en/Main/ArduinoBoardLilyPadUSB>`_
- ATmega32u4 ``atmega32u4``
- 8 MHz ``8000000L``
- ATMEGA32U4
- 16 MHz
- 32 Kb
- 2.5 Kb
* - ``lilypadatmega168``
- `Arduino LilyPad (ATmega168)
<http://arduino.cc/en/Main/ArduinoBoardLilyPad>`_
- ATmega168 ``atmega168``
- 8 MHz ``8000000L``
- `LilyPad Arduino ATmega168 <http://arduino.cc/en/Main/ArduinoBoardLilyPad>`_
- ATMEGA168
- 8 MHz
- 16 Kb
- 1 Kb
* - ``lilypadatmega328``
- `Arduino LilyPad (ATmega328)
<http://arduino.cc/en/Main/ArduinoBoardLilyPad>`_
- ATmega328P ``atmega328p``
- 8 MHz ``8000000L``
- `LilyPad Arduino ATmega328 <http://arduino.cc/en/Main/ArduinoBoardLilyPad>`_
- ATMEGA328P
- 8 MHz
- 32 Kb
- 2 Kb
* - ``megaADK``
- `Arduino Mega ADK <http://arduino.cc/en/Main/ArduinoBoardMegaADK>`_
- ATMEGA2560
- 16 MHz
- 256 Kb
- 8 Kb
* - ``megaatmega1280``
- `Arduino Mega (ATmega1280)
<http://arduino.cc/en/Main/arduinoBoardMega>`_
- ATmega1280 ``atmega1280``
- 16 MHz ``16000000L``
- `Arduino Mega or Mega 2560 ATmega1280 <http://arduino.cc/en/Main/arduinoBoardMega>`_
- ATMEGA1280
- 16 MHz
- 128 Kb
- 8 Kb
* - ``megaatmega2560``
- `Arduino Mega (ATmega2560)
<http://arduino.cc/en/Main/arduinoBoardMega2560>`_
- ATmega2560 ``atmega2560``
- 16 MHz ``16000000L``
- 256 Kb
- 8 Kb
* - ``megaADK``
- `Arduino Mega ADK
<http://arduino.cc/en/Main/ArduinoBoardMegaADK>`_
- ATmega2560 ``atmega2560``
- 16 MHz ``16000000L``
- `Arduino Mega or Mega 2560 ATmega2560 (Mega 2560) <http://arduino.cc/en/Main/arduinoBoardMega2560>`_
- ATMEGA2560
- 16 MHz
- 256 Kb
- 8 Kb
* - ``micro``
- `Arduino Micro
<http://arduino.cc/en/Main/ArduinoBoardMicro>`_
- ATmega32u4 ``atmega32u4``
- 16 MHz ``16000000L``
- `Arduino Micro <http://arduino.cc/en/Main/ArduinoBoardMicro>`_
- ATMEGA32U4
- 16 MHz
- 32 Kb
- 2.5 Kb
* - ``miniatmega168``
- `Arduino Mini (ATmega168)
<http://arduino.cc/en/Main/ArduinoBoardMini>`_
- ATmega168 ``atmega168``
- 16 MHz ``16000000L``
- `Arduino Mini ATmega168 <http://arduino.cc/en/Main/ArduinoBoardMini>`_
- ATMEGA168
- 16 MHz
- 16 Kb
- 1 Kb
* - ``miniatmega328``
- `Arduino Mini (ATmega328P)
<http://arduino.cc/en/Main/ArduinoBoardMini>`_
- ATmega328P ``atmega328p``
- 16 MHz ``16000000L``
- `Arduino Mini ATmega328 <http://arduino.cc/en/Main/ArduinoBoardMini>`_
- ATMEGA328P
- 16 MHz
- 32 Kb
- 2 Kb
* - ``nanoatmega168``
- `Arduino Nano (ATmega168)
<http://arduino.cc/en/Main/ArduinoBoardNano>`_
- ATmega168 ``atmega168``
- 16 MHz ``16000000L``
- `Arduino Nano ATmega168 <http://arduino.cc/en/Main/ArduinoBoardNano>`_
- ATMEGA168
- 16 MHz
- 16 Kb
- 1 Kb
* - ``nanoatmega328``
- `Arduino Nano (ATmega328P)
<http://arduino.cc/en/Main/ArduinoBoardNano>`_
- ATmega328P ``atmega328p``
- 16 MHz ``16000000L``
- `Arduino Nano ATmega328 <http://arduino.cc/en/Main/ArduinoBoardNano>`_
- ATMEGA328P
- 16 MHz
- 32 Kb
- 2 Kb
* - ``pro8MHzatmega168``
- `Arduino Pro or Pro Mini (ATmega168, 3.3V)
<http://arduino.cc/en/Main/ArduinoBoardProMini>`_
- ATmega168 ``atmega168``
- 8 MHz ``8000000L``
- 16 Kb
- 1 Kb
* - ``pro16MHzatmega168``
- `Arduino Pro or Pro Mini (ATmega168, 5V)
<http://arduino.cc/en/Main/ArduinoBoardProMini>`_
- ATmega168 ``atmega168``
- 16 MHz ``16000000L``
- `Arduino Pro or Pro Mini ATmega168 (5V, 16 MHz) <http://arduino.cc/en/Main/ArduinoBoardProMini>`_
- ATMEGA168
- 16 MHz
- 16 Kb
- 1 Kb
* - ``pro8MHzatmega328``
- `Arduino Pro or Pro Mini (ATmega328P, 3.3V)
<http://arduino.cc/en/Main/ArduinoBoardProMini>`_
- ATmega328P ``atmega328p``
- 8 MHz ``8000000L``
- 32 Kb
- 2 Kb
* - ``pro16MHzatmega328``
- `Arduino Pro or Pro Mini (ATmega328P, 5V)
<http://arduino.cc/en/Main/ArduinoBoardProMini>`_
- ATmega328P ``atmega328p``
- 16 MHz ``16000000L``
- `Arduino Pro or Pro Mini ATmega328 (5V, 16 MHz) <http://arduino.cc/en/Main/ArduinoBoardProMini>`_
- ATMEGA328P
- 16 MHz
- 32 Kb
- 2 Kb
* - ``pro8MHzatmega168``
- `Arduino Pro or Pro Mini ATmega168 (3.3V, 8 MHz) <http://arduino.cc/en/Main/ArduinoBoardProMini>`_
- ATMEGA168
- 8 MHz
- 16 Kb
- 1 Kb
* - ``pro8MHzatmega328``
- `Arduino Pro or Pro Mini ATmega328 (3.3V, 8 MHz) <http://arduino.cc/en/Main/ArduinoBoardProMini>`_
- ATMEGA328P
- 8 MHz
- 32 Kb
- 2 Kb
* - ``robotControl``
- `Arduino Robot Control <http://arduino.cc/en/Main/Robot>`_
- ATMEGA32U4
- 16 MHz
- 32 Kb
- 2.5 Kb
* - ``robotMotor``
- `Arduino Robot Motor <http://arduino.cc/en/Main/Robot>`_
- ATMEGA32U4
- 16 MHz
- 32 Kb
- 2.5 Kb
* - ``uno``
- `Arduino Uno
<http://arduino.cc/en/Main/ArduinoBoardUno>`_
- ATmega328P ``atmega328p``
- 16 MHz ``16000000L``
- `Arduino Uno <http://arduino.cc/en/Main/ArduinoBoardUno>`_
- ATMEGA328P
- 16 MHz
- 32 Kb
- 2 Kb
More detailed information you can find here
`Arduino boards <http://arduino.cc/en/Main/Products>`_.
* - ``yun``
- `Arduino Yun <http://arduino.cc/en/Main/ArduinoBoardYun>`_
- ATMEGA32U4
- 16 MHz
- 32 Kb
- 2.5 Kb
BitWizard
~~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``raspduino``
- `Raspduino <http://www.bitwizard.nl/wiki/index.php/Raspduino>`_
- ATMEGA328P
- 16 MHz
- 32 Kb
- 2 Kb
Digistump
~~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``digispark-pro``
- `Digispark Pro (Default 16 MHz) <http://digistump.com/products/109>`_
- ATTINY167
- 16 MHz
- 16 Kb
- 0.5 Kb
* - ``digispark-pro32``
- `Digispark Pro (16 MHz) (32 byte buffer) <http://digistump.com/products/109>`_
- ATTINY167
- 16 MHz
- 16 Kb
- 0.5 Kb
* - ``digispark-pro64``
- `Digispark Pro (16 MHz) (64 byte buffer) <http://digistump.com/products/109>`_
- ATTINY167
- 16 MHz
- 16 Kb
- 0.5 Kb
* - ``digispark-tiny``
- `Digispark (Default - 16 MHz) <http://digistump.com/products/1>`_
- ATTINY85
- 16 MHz
- 8 Kb
- 0.5 Kb
Engduino
~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``engduinov1``
- `Engduino 1 <http://www.engduino.org>`_
- ATMEGA32U4
- 8 MHz
- 32 Kb
- 2.5 Kb
* - ``engduinov2``
- `Engduino 2 <http://www.engduino.org>`_
- ATMEGA32U4
- 8 MHz
- 32 Kb
- 2.5 Kb
* - ``engduinov3``
- `Engduino 3 <http://www.engduino.org>`_
- ATMEGA32U4
- 8 MHz
- 32 Kb
- 2.5 Kb
Microduino
~~~~~~~~~~
@ -226,95 +436,90 @@ Microduino
* - Type ``board``
- Name
- Microcontroller ``board_mcu``
- Frequency ``board_f_cpu``
- Microcontroller
- Frequency
- Flash
- RAM
* - ``168pa8m``
- `Microduino Core (ATmega168P, 3.3V)
<http://www.microduino.cc/wiki/index.php?title=Microduino-Core>`_
- ATmega168P ``atmega168p``
- 8 MHz ``8000000L``
- 16 Kb
- 1 Kb
* - ``168pa16m``
- `Microduino Core (ATmega168P, 5V)
<http://www.microduino.cc/wiki/index.php?title=Microduino-Core>`_
- ATmega168P ``atmega168p``
- 16 MHz ``16000000L``
- 16 Kb
- 1 Kb
* - ``328p8m``
- `Microduino Core (ATmega328P, 3.3V)
<http://www.microduino.cc/wiki/index.php?title=Microduino-Core>`_
- ATmega328P ``atmega328p``
- 8 MHz ``8000000L``
- 32 Kb
- 2 Kb
* - ``328p16m``
- `Microduino Core (ATmega328P, 5V)
<http://www.microduino.cc/wiki/index.php?title=Microduino-Core>`_
- ATmega328P ``atmega328p``
- 16 MHz ``16000000L``
- 32 Kb
- 2 Kb
* - ``644pa8m``
- `Microduino Core+ (ATmega644PA, 3.3V)
<http://www.microduino.cc/wiki/index.php?title=Microduino-Core%2B>`_
- ATmega644PA ``atmega644p``
- 8 MHz ``8000000L``
- 64 Kb
- 4 Kb
* - ``644pa16m``
- `Microduino Core+ (ATmega644PA, 5V)
<http://www.microduino.cc/wiki/index.php?title=Microduino-Core%2B>`_
- ATmega644PA ``atmega644p``
- 16 MHz ``16000000L``
- 64 Kb
- 4 Kb
* - ``1284p8m``
- `Microduino Core+ (Atmega1284P, 3.3V)
<http://www.microduino.cc/wiki/index.php?title=Microduino-Core%2B>`_
- Atmega1284P ``atmega1284p``
- 8 MHz ``8000000L``
- 128 Kb
- 16 Kb
* - ``1284p16m``
- `Microduino Core+ (Atmega1284P, 5V)
<http://www.microduino.cc/wiki/index.php?title=Microduino-Core%2B>`_
- Atmega1284P ``atmega1284p``
- 16 MHz ``16000000L``
- `Microduino Core+ (ATmega1284P@16M,5V) <https://www.microduino.cc/wiki/index.php?title=Microduino-Core%2B>`_
- ATMEGA1284P
- 16 MHz
- 128 Kb
- 16 Kb
* - ``1284p8m``
- `Microduino Core+ (ATmega1284P@8M,3.3V) <https://www.microduino.cc/wiki/index.php?title=Microduino-Core%2B>`_
- ATMEGA1284P
- 8 MHz
- 128 Kb
- 16 Kb
* - ``168pa16m``
- `Microduino Core (Atmega168PA@16M,5V) <https://www.microduino.cc/wiki/index.php?title=Microduino-Core>`_
- ATMEGA168P
- 16 MHz
- 16 Kb
- 1 Kb
* - ``168pa8m``
- `Microduino Core (Atmega168PA@8M,3.3V) <https://www.microduino.cc/wiki/index.php?title=Microduino-Core>`_
- ATMEGA168P
- 8 MHz
- 16 Kb
- 1 Kb
* - ``328p16m``
- `Microduino Core (Atmega328P@16M,5V) <https://www.microduino.cc/wiki/index.php?title=Microduino-Core>`_
- ATMEGA328P
- 16 MHz
- 32 Kb
- 2 Kb
* - ``328p8m``
- `Microduino Core (Atmega328P@8M,3.3V) <https://www.microduino.cc/wiki/index.php?title=Microduino-Core>`_
- ATMEGA328P
- 8 MHz
- 32 Kb
- 2 Kb
* - ``32u416m``
- `Microduino-Core USB
<http://www.microduino.cc/wiki/index.php?title=Microduino-CoreUSB>`_
- ATmega32u4 ``atmega32u4``
- 16 MHz ``16000000L``
- `Microduino Core USB (ATmega32U4@16M,5V) <https://www.microduino.cc/wiki/index.php?title=Microduino-CoreUSB>`_
- ATMEGA32U4
- 16 MHz
- 32 Kb
- 2.5 Kb
* - ``644pa16m``
- `Microduino Core+ (Atmega644PA@16M,5V) <https://www.microduino.cc/wiki/index.php?title=Microduino-Core%2B>`_
- ATMEGA644P
- 16 MHz
- 64 Kb
- 4 Kb
More detailed information you can find here
`Microduino boards <http://www.microduino.cc/wiki/index.php?title=Main_Page>`_.
* - ``644pa8m``
- `Microduino Core+ (Atmega644PA@8M,3.3V) <https://www.microduino.cc/wiki/index.php?title=Microduino-Core%2B>`_
- ATMEGA644P
- 8 MHz
- 64 Kb
- 4 Kb
Miscellaneous
~~~~~~~~~~~~~
PanStamp
~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller ``board_mcu``
- Frequency ``board_f_cpu``
- Microcontroller
- Frequency
- Flash
- RAM
* - ``raspduino``
- `Raspduino
<http://www.bitwizard.nl/wiki/index.php/Raspduino>`_
- ATmega328P ``atmega328p``
- 16 MHz ``16000000L``
* - ``panStampAVR``
- `PanStamp AVR <http://www.panstamp.com/product/panstamp-avr/>`_
- ATMEGA328P
- 8 MHz
- 32 Kb
- 2 Kb

130
docs/platforms/atmelsam.rst Normal file
View File

@ -0,0 +1,130 @@
.. _platform_atmelsam:
Platform ``atmelsam``
=====================
Atmel | SMART offers Flash- based ARM products based on the ARM Cortex-M0+, Cortex-M3 and Cortex-M4 architectures, ranging from 8KB to 2MB of Flash including a rich peripheral and feature mix.
For more detailed information please visit `vendor site <http://www.atmel.com/products/microcontrollers/arm/default.aspx>`_.
.. contents::
Packages
--------
.. list-table::
:header-rows: 1
* - Name
- Contents
* - ``framework-arduinosam``
- `Arduino Wiring-based Framework (SAM Core, 1.6) <http://arduino.cc/en/Reference/HomePage>`_
* - ``ldscripts``
- `Linker Scripts <https://sourceware.org/binutils/docs/ld/Scripts.html>`_
* - ``toolchain-gccarmnoneeabi``
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_
* - ``tool-bossac``
- `BOSSA CLI <https://sourceforge.net/projects/b-o-s-s-a/>`_
.. warning::
**Linux Users:** Don't forget to install "udev" rules file
`99-platformio-udev.rules <https://github.com/ivankravets/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
Frameworks
----------
.. list-table::
:header-rows: 1
* - Name
- Description
* - :ref:`framework_arduino`
- Arduino Framework allows writing cross-platform software to control devices attached to a wide range of Arduino boards to create all kinds of creative coding, interactive objects, spaces or physical experiences.
Boards
------
.. note::
* You can list pre-configured boards by :ref:`cmd_boards` command or
`PlatformIO Boards Explorer <http://platformio.org/#!/boards>`_
* For more detailed ``board`` information please scroll tables below by
horizontal.
Arduino
~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``due``
- `Arduino Due (Programming Port) <http://arduino.cc/en/Main/arduinoBoardDue>`_
- AT91SAM3X8E
- 84 MHz
- 512 Kb
- 32 Kb
* - ``dueUSB``
- `Arduino Due (USB Native Port) <http://arduino.cc/en/Main/arduinoBoardDue>`_
- AT91SAM3X8E
- 84 MHz
- 512 Kb
- 32 Kb
Digistump
~~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``digix``
- `Digistump DigiX <http://digistump.com/products/50>`_
- AT91SAM3X8E
- 84 MHz
- 512 Kb
- 28 Kb
SainSmart
~~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``sainSmartDue``
- `SainSmart Due (Programming Port) <http://www.sainsmart.com/arduino/control-boards/sainsmart-due-atmel-sam3x8e-arm-cortex-m3-board-black.html>`_
- AT91SAM3X8E
- 84 MHz
- 512 Kb
- 32 Kb
* - ``sainSmartDueUSB``
- `SainSmart Due (USB Native Port) <http://www.sainsmart.com/arduino/control-boards/sainsmart-due-atmel-sam3x8e-arm-cortex-m3-board-black.html>`_
- AT91SAM3X8E
- 84 MHz
- 512 Kb
- 32 Kb

View File

@ -0,0 +1,285 @@
.. _platform_creating:
Creating Platform
=================
*PlatformIO* was developed like a tool which would build the same source code
for the different development platforms via single command :ref:`cmd_run`
without any dependent software or requirements.
For this purpose *PlatformIO* uses own pre-configured platforms data:
build scripts, tool chains, the settings for the most popular embedded
boards and etc. These data are pre-built and packaged to the different
``packages``. It allows *PlatformIO* to have multiple development platforms
which can use the same packages(tool chains, frameworks), but have
different/own build scripts, uploader and etc.
.. note::
If you want to change some build flags for the existing
:ref:`Platforms <platforms>`, you don't need to create (or duplicate) own
development platforms! Please use :ref:`projectconf_build_flags` option.
**Step-by-Step Manual**
1. Chose :ref:`platform_creating_packages` for platform
2. Create :ref:`platform_creating_manifest_file`
3. Create :ref:`platform_creating_build_script`
4. Finish with the :ref:`platform_creating_installation`.
.. contents::
.. _platform_creating_packages:
Packages
--------
*PlatformIO* has pre-built packages for the most popular operation systems:
*Mac OS*, *Linux (+ARM)* and *Windows*.
.. list-table::
:header-rows: 1
* - Name
- Alias
- Contents
* - ``toolchain-gccarmnoneeabi``
- toolchain
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded/>`_,
`GDB <http://www.gnu.org/software/gdb/>`_
* - ``toolchain-atmelavr``
- toolchain
- `avr-gcc <https://gcc.gnu.org/wiki/avr-gcc>`_,
`GDB <http://www.gnu.org/software/gdb/>`_,
`AVaRICE <http://avarice.sourceforge.net>`_,
`SimulAVR <http://www.nongnu.org/simulavr/>`_
* - ``toolchain-timsp430``
- toolchain
- `msp-gcc <http://sourceforge.net/projects/mspgcc/>`_,
`GDB <http://www.gnu.org/software/gdb/>`_
* - ``tool-avrdude``
- uploader
- `AVRDUDE <http://www.nongnu.org/avrdude/>`_
* - ``tool-bossac``
- uploader
- `BOSSA CLI <https://sourceforge.net/projects/b-o-s-s-a/>`_
* - ``tool-micronucleus``
- uploader
- `Micronucleus <https://github.com/micronucleus/micronucleus>`_
* - ``tool-mspdebug``
- uploader
- `MSPDebug <http://mspdebug.sourceforge.net>`_
* - ``tool-lm4flash``
- uploader
- `Flash Programmer <http://www.ti.com/tool/lmflashprogrammer>`_
* - ``tool-stlink``
- uploader
- `STLink <https://github.com/texane/stlink>`_
* - ``tool-teensy``
- uploader
- `Teensy Loader <https://www.pjrc.com/teensy/loader.html>`_
* - ``framework-arduinoavr``
-
- `Arduino Wiring-based Framework (AVR Core, 1.6 branch) <http://arduino.cc/en/Reference/HomePage>`_
* - ``framework-arduinosam``
-
- `Arduino Wiring-based Framework (SAM Core, 1.6 branch) <http://arduino.cc/en/Reference/HomePage>`_
* - ``framework-arduinoteensy``
-
- `Arduino Wiring-based Framework <http://arduino.cc/en/Reference/HomePage>`_
* - ``framework-energiamsp430``
-
- `Energia Wiring-based Framework (MSP430 Core) <http://energia.nu/reference/>`_
* - ``framework-energiativa``
-
- `Energia Wiring-based Framework (LM4F Core) <http://energia.nu/reference/>`_
* - ``framework-cmsis``
-
- `Vendor-independent hardware abstraction layer for the Cortex-M processor series <http://www.arm.com/products/processors/cortex-m/cortex-microcontroller-software-interface-standard.php>`_
* - ``framework-spl``
-
- `Standard Peripheral Library for STM32 MCUs <http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1743/PF257890>`_
* - ``framework-opencm3``
-
- `libOpenCM3 Framework <http://www.libopencm3.org>`_
.. _platform_creating_manifest_file:
Manifest File
-------------
A platform manifest file is a `Python <https://www.python.org>`_ script with the
next requirements:
1. The file should have ``.py`` extension
2. The **name of the file** is the **platform name** (lowercase)
3. The source code of this file should contain a ``class`` which describes your
own platform. The name of the ``class`` should start with your
**platform name** (the first letter should be capitalized) + ``Platform``
ending. This ``class`` should be derived from *PlatformIO* ``BasePlatform``
class.
.. warning::
If you are new to *Python* language, please read:
* `Style Guide for Python Code <https://www.python.org/dev/peps/pep-0008>`_.
* A hash sign (#) that is not inside a string literal begins a comment.
All characters after the # and up to the physical line end are part
of the comment and the *Python* interpreter ignores them.
Example of the **test** platform (``test.py``):
.. code-block:: python
from platformio.platforms.base import BasePlatform
class TestPlatform(BasePlatform):
# This is a description of your platform.
# Platformio uses it for the `platformio search / list` commands
"""
My Test platform - test.py
"""
PACKAGES = {
"toolchain-foo": {
# alias is used for quick access to package.
# For example,
# `> platformio install test --without-package=toolchain`
"alias": "toolchain",
# Flag which allows PlatformIO to install this package by
# default via `> platformio install test` command
"default": True
},
"tool-bar": {
"alias": "uploader",
"default": True
},
"framework-baz": {
"default": True
}
}
def get_build_script(self):
""" Returns a path to build script """
# You can return static path
#return "/path/to/test-builder.py"
# or detect dynamically if `test-builder.py` is located in the same
# folder with `test.py`
return os.path.join(
os.path.dirname(os.path.realpath(__file__)),
"test-builder.py"
)
.. _platform_creating_build_script:
Build Script
------------
Platform's build script is based on a next-generation build tool named
`SCons <http://www.scons.org>`_. PlatformIO has own built-in firmware builder
``env.BuildFirmware`` with the nested libraries search. Please look into a
base template of ``test-builder.py``.
.. code-block:: python
"""
Build script for test.py
test-builder.py
"""
from os.path import join
from SCons.Script import AlwaysBuild, Builder, Default, DefaultEnvironment
env = DefaultEnvironment()
# A full list with the available variables
# http://www.scons.org/doc/production/HTML/scons-user.html#app-variables
env.Replace(
AR="ar",
AS="gcc",
CC="gcc",
CXX="g++",
OBJCOPY="objcopy",
RANLIB="ranlib",
ARFLAGS=["..."],
ASFLAGS=["flag1", "flag2", "flagN"],
CCFLAGS=["flag1", "flag2", "flagN"],
CXXFLAGS=["flag1", "flag2", "flagN"],
LINKFLAGS=["flag1", "flag2", "flagN"],
CPPDEFINES=["DEFINE_1", "DEFINE=2", "DEFINE_N"],
LIBS=["additional", "libs", "here"],
UPLOADER=join("$PIOPACKAGES_DIR", "tool-bar", "uploader"),
UPLOADCMD="$UPLOADER $SOURCES"
)
env.Append(
BUILDERS=dict(
ElfToBin=Builder(
action=" ".join([
"$OBJCOPY",
"-O",
"binary",
"$SOURCES",
"$TARGET"]),
suffix=".bin"
)
)
)
# The source code of "platformio-build-tool" is here
# https://github.com/ivankravets/platformio/blob/develop/platformio/builder/tools/platformio.py
#
# Target: Build executable and linkable firmware
#
target_elf = env.BuildFirmware()
#
# Target: Build the .bin file
#
target_bin = env.ElfToBin(join("$BUILD_DIR", "firmware"), target_elf)
#
# Target: Upload firmware
#
upload = env.Alias(["upload"], target_bin, "$UPLOADCMD")
AlwaysBuild(upload)
#
# Target: Define targets
#
Default(target_bin)
Please look into the examples with built-in scripts for the popular
platforms:
* `atmelavr.py <https://github.com/ivankravets/platformio/blob/develop/platformio/builder/scripts/atmelavr.py>`_
* `timsp430.py <https://github.com/ivankravets/platformio/blob/develop/platformio/builder/scripts/timsp430.py>`_
* `titiva.py <https://github.com/ivankravets/platformio/blob/develop/platformio/builder/scripts/titiva.py>`_
.. _platform_creating_installation:
Installation
------------
1. Create ``platforms`` directory in :ref:`projectconf_pio_home_dir` if it
doesn't exists.
2. Copy ``test.py`` and ``test-builder.py`` files to ``platforms`` directory.
3. Search available platforms via :ref:`cmd_search` command. You should see
``test`` platform.
4. Install ``test`` platform via :ref:`cmd_install` command.
Now, you can use ``test`` for the :ref:`projectconf_env_platform` option in
:ref:`projectconf`.

View File

@ -0,0 +1,112 @@
.. _platform_freescalekinetis:
Platform ``freescalekinetis``
=============================
Freescale Kinetis Microcontrollers is family of multiple hardware- and software-compatible ARM Cortex-M0+, Cortex-M4 and Cortex-M7-based MCU series. Kinetis MCUs offer exceptional low-power performance, scalability and feature integration.
For more detailed information please visit `vendor site <http://www.freescale.com/webapp/sps/site/homepage.jsp?code=KINETIS>`_.
.. contents::
Packages
--------
.. list-table::
:header-rows: 1
* - Name
- Contents
* - ``framework-mbed``
- `mbed Framework <http://mbed.org>`_
* - ``toolchain-gccarmnoneeabi``
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_
.. warning::
**Linux Users:** Don't forget to install "udev" rules file
`99-platformio-udev.rules <https://github.com/ivankravets/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
Frameworks
----------
.. list-table::
:header-rows: 1
* - Name
- Description
* - :ref:`framework_mbed`
- The mbed framework The mbed SDK has been designed to provide enough hardware abstraction to be intuitive and concise, yet powerful enough to build complex projects. It is built on the low-level ARM CMSIS APIs, allowing you to code down to the metal if needed. In addition to RTOS, USB and Networking libraries, a cookbook of hundreds of reusable peripheral and module libraries have been built on top of the SDK by the mbed Developer Community.
Boards
------
.. note::
* You can list pre-configured boards by :ref:`cmd_boards` command or
`PlatformIO Boards Explorer <http://platformio.org/#!/boards>`_
* For more detailed ``board`` information please scroll tables below by
horizontal.
Freescale
~~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``IBMEthernetKit``
- `Ethernet IoT Starter Kit <http://developer.mbed.org/platforms/IBMEthernetKit/>`_
- MK64FN1M0VLL12
- 120 MHz
- 1024 Kb
- 256 Kb
* - ``frdm_k20d50m``
- `Freescale Kinetis FRDM-K20D50M <https://developer.mbed.org/platforms/FRDM-K20D50M/>`_
- MK20DX128VLH5
- 48 MHz
- 128 Kb
- 16 Kb
* - ``frdm_k22f``
- `Freescale Kinetis FRDM-K22F <https://developer.mbed.org/platforms/FRDM-K22F/>`_
- MK22FN512VLH12
- 120 MHz
- 512 Kb
- 128 Kb
* - ``frdm_k64f``
- `Freescale Kinetis FRDM-K64F <https://developer.mbed.org/platforms/FRDM-K64F/>`_
- MK64FN1M0VLL12
- 120 MHz
- 1024 Kb
- 256 Kb
* - ``frdm_kl05z``
- `Freescale Kinetis FRDM-KL05Z <https://developer.mbed.org/platforms/FRDM-KL05Z/>`_
- MKL05Z32VFM4
- 48 MHz
- 32 Kb
- 4 Kb
* - ``frdm_kl25z``
- `Freescale Kinetis FRDM-KL25Z <https://developer.mbed.org/platforms/KL25Z/>`_
- MKL25Z128VLK4
- 48 MHz
- 128 Kb
- 16 Kb
* - ``frdm_kl46z``
- `Freescale Kinetis FRDM-KL46Z <https://developer.mbed.org/platforms/FRDM-KL46Z/>`_
- MKL46Z256VLL4
- 48 MHz
- 256 Kb
- 32 Kb

View File

@ -3,9 +3,9 @@
Platforms & Embedded Boards
===========================
*PlatformIO* has pre-built different development platforms for popular OS (Mac,
Linux 32/64/ARM and Windows). Each of them include compiler, debugger, uploader
(for embedded) and many other useful tools.
*PlatformIO* has pre-built different development platforms for popular OS
(*Mac OS X, Linux (+ARM) and Windows*). Each of them include compiler,
debugger, uploader (for embedded) and many other useful tools.
Also it has pre-configured settings for most popular **Embedded Platform
Boards**. You have no need to specify in :ref:`projectconf` type or frequency of
@ -15,5 +15,12 @@ MCU, upload protocol or etc. Please use ``board`` option.
:maxdepth: 2
atmelavr
atmelsam
freescalekinetis
nordicnrf51
nxplpc
ststm32
teensy
timsp430
titiva
creating_platform

View File

@ -0,0 +1,171 @@
.. _platform_nordicnrf51:
Platform ``nordicnrf51``
========================
The Nordic nRF51 Series is a family of highly flexible, multi-protocol, system-on-chip (SoC) devices for ultra-low power wireless applications. nRF51 Series devices support a range of protocol stacks including Bluetooth Smart (previously called Bluetooth low energy), ANT and proprietary 2.4GHz protocols such as Gazell.
For more detailed information please visit `vendor site <https://www.nordicsemi.com/eng/Products/nRF51-Series-SoC>`_.
.. contents::
Packages
--------
.. list-table::
:header-rows: 1
* - Name
- Contents
* - ``framework-mbed``
- `mbed Framework <http://mbed.org>`_
* - ``toolchain-gccarmnoneeabi``
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_
.. warning::
**Linux Users:** Don't forget to install "udev" rules file
`99-platformio-udev.rules <https://github.com/ivankravets/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
Frameworks
----------
.. list-table::
:header-rows: 1
* - Name
- Description
* - :ref:`framework_mbed`
- The mbed framework The mbed SDK has been designed to provide enough hardware abstraction to be intuitive and concise, yet powerful enough to build complex projects. It is built on the low-level ARM CMSIS APIs, allowing you to code down to the metal if needed. In addition to RTOS, USB and Networking libraries, a cookbook of hundreds of reusable peripheral and module libraries have been built on top of the SDK by the mbed Developer Community.
Boards
------
.. note::
* You can list pre-configured boards by :ref:`cmd_boards` command or
`PlatformIO Boards Explorer <http://platformio.org/#!/boards>`_
* For more detailed ``board`` information please scroll tables below by
horizontal.
JKSoft
~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``wallBotBLE``
- `JKSoft Wallbot BLE <https://developer.mbed.org/platforms/JKSoft-Wallbot-BLE/>`_
- NRF51822
- 16 MHz
- 128 Kb
- 16 Kb
Nordic
~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``nrf51_dk``
- `Nordic nRF51-DK <https://developer.mbed.org/platforms/Nordic-nRF51-DK/>`_
- NRF51822
- 32 MHz
- 256 Kb
- 32 Kb
* - ``nrf51_dongle``
- `Nordic nRF51-Dongle <https://developer.mbed.org/platforms/Nordic-nRF51-Dongle/>`_
- NRF51822
- 32 MHz
- 256 Kb
- 32 Kb
* - ``nrf51_mkit``
- `Nordic nRF51822-mKIT <http://developer.mbed.org/platforms/Nordic-nRF51822/>`_
- NRF51822
- 16 MHz
- 128 Kb
- 16 Kb
RedBearLab
~~~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``redBearLab``
- `RedBearLab nRF51822 <https://developer.mbed.org/platforms/RedBearLab-nRF51822/>`_
- NRF51822
- 16 MHz
- 256 Kb
- 16 Kb
* - ``redBearLabBLENano``
- `RedBearLab BLE Nano <https://developer.mbed.org/platforms/RedBearLab-BLE-Nano/>`_
- NRF51822
- 16 MHz
- 256 Kb
- 16 Kb
SeeedStudio
~~~~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``seeedTinyBLE``
- `Seeed Tiny BLE <http://developer.mbed.org/platforms/Seeed-Tiny-BLE/>`_
- NRF51822
- 16 MHz
- 256 Kb
- 16 Kb
Switch Science
~~~~~~~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``hrm1017``
- `Switch Science mbed HRM1017 <https://developer.mbed.org/platforms/mbed-HRM1017/>`_
- NRF51822
- 16 MHz
- 256 Kb
- 16 Kb

258
docs/platforms/nxplpc.rst Normal file
View File

@ -0,0 +1,258 @@
.. _platform_nxplpc:
Platform ``nxplpc``
===================
The NXP LPC is a family of 32-bit microcontroller integrated circuits by NXP Semiconductors. The LPC chips are grouped into related series that are based around the same 32-bit ARM processor core, such as the Cortex-M4F, Cortex-M3, Cortex-M0+, or Cortex-M0. Internally, each microcontroller consists of the processor core, static RAM memory, flash memory, debugging interface, and various peripherals.
For more detailed information please visit `vendor site <http://www.nxp.com/products/microcontrollers/>`_.
.. contents::
Packages
--------
.. list-table::
:header-rows: 1
* - Name
- Contents
* - ``framework-mbed``
- `mbed Framework <http://mbed.org>`_
* - ``toolchain-gccarmnoneeabi``
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_
.. warning::
**Linux Users:** Don't forget to install "udev" rules file
`99-platformio-udev.rules <https://github.com/ivankravets/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
Frameworks
----------
.. list-table::
:header-rows: 1
* - Name
- Description
* - :ref:`framework_mbed`
- The mbed framework The mbed SDK has been designed to provide enough hardware abstraction to be intuitive and concise, yet powerful enough to build complex projects. It is built on the low-level ARM CMSIS APIs, allowing you to code down to the metal if needed. In addition to RTOS, USB and Networking libraries, a cookbook of hundreds of reusable peripheral and module libraries have been built on top of the SDK by the mbed Developer Community.
Boards
------
.. note::
* You can list pre-configured boards by :ref:`cmd_boards` command or
`PlatformIO Boards Explorer <http://platformio.org/#!/boards>`_
* For more detailed ``board`` information please scroll tables below by
horizontal.
CQ Publishing
~~~~~~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``lpc11u35_501``
- `TG-LPC11U35-501 <https://developer.mbed.org/platforms/TG-LPC11U35-501/>`_
- LPC11U35
- 48 MHz
- 64 Kb
- 10 Kb
Embedded Artists
~~~~~~~~~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``lpc11u35``
- `EA LPC11U35 QuickStart Board <https://developer.mbed.org/platforms/EA-LPC11U35/>`_
- LPC11U35
- 48 MHz
- 64 Kb
- 10 Kb
* - ``lpc4088``
- `EA LPC4088 QuickStart Board <https://developer.mbed.org/platforms/EA-LPC4088/>`_
- LPC4088
- 120 MHz
- 512 Kb
- 96 Kb
* - ``lpc4088_dm``
- `EA LPC4088 Display Module <https://developer.mbed.org/platforms/EA-LPC4088-Display-Module/>`_
- LPC4088
- 120 MHz
- 512 Kb
- 96 Kb
NGX Technologies
~~~~~~~~~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``blueboard_lpc11u24``
- `BlueBoard-LPC11U24 <https://developer.mbed.org/platforms/BlueBoard-LPC11U24/>`_
- LPC11U24
- 48 MHz
- 32 Kb
- 8 Kb
NXP
~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``lpc11u24``
- `mbed LPC11U24 <https://developer.mbed.org/platforms/mbed-LPC11U24/>`_
- LPC11U24
- 48 MHz
- 32 Kb
- 8 Kb
* - ``lpc1549``
- `LPCXpresso1549 <https://developer.mbed.org/platforms/LPCXpresso1549/>`_
- LPC1549
- 72 MHz
- 256 Kb
- 36 Kb
* - ``lpc1768``
- `mbed LPC1768 <http://developer.mbed.org/platforms/mbed-LPC1768/>`_
- LPC1768
- 96 MHz
- 512 Kb
- 32 Kb
Outrageous Circuits
~~~~~~~~~~~~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``mbuino``
- `Outrageous Circuits mBuino <https://developer.mbed.org/platforms/Outrageous-Circuits-mBuino/>`_
- LPC11U24
- 48 MHz
- 32 Kb
- 8 Kb
SeeedStudio
~~~~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``seeeduinoArchPro``
- `Seeeduino-Arch-Pro <https://developer.mbed.org/platforms/Seeeduino-Arch-Pro/>`_
- LPC1768
- 96 MHz
- 512 Kb
- 32 Kb
Solder Splash Labs
~~~~~~~~~~~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``dipcortexm0``
- `DipCortex M0 <https://developer.mbed.org/platforms/DipCortex-M0/>`_
- LPC11U24
- 50 MHz
- 32 Kb
- 8 Kb
Switch Science
~~~~~~~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``lpc1114fn28``
- `mbed LPC1114FN28 <https://developer.mbed.org/platforms/LPC1114FN28/>`_
- LPC1114FN28
- 48 MHz
- 32 Kb
- 4 Kb
u-blox
~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``ubloxc027``
- `u-blox C027 <https://developer.mbed.org/platforms/u-blox-C027/>`_
- LPC1768
- 96 MHz
- 512 Kb
- 32 Kb

227
docs/platforms/ststm32.rst Normal file
View File

@ -0,0 +1,227 @@
.. _platform_ststm32:
Platform ``ststm32``
====================
The STM32 family of 32-bit Flash MCUs based on the ARM Cortex-M processor is designed to offer new degrees of freedom to MCU users. It offers a 32-bit product range that combines very high performance, real-time capabilities, digital signal processing, and low-power, low-voltage operation, while maintaining full integration and ease of development.
For more detailed information please visit `vendor site <http://www.st.com/web/en/catalog/mmc/FM141/SC1169?sc=stm32>`_.
.. contents::
Packages
--------
.. list-table::
:header-rows: 1
* - Name
- Contents
* - ``framework-libopencm3``
- `libOpenCM3 Framework <http://www.libopencm3.org/>`_
* - ``toolchain-gccarmnoneeabi``
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_
* - ``tool-stlink``
- `ST-Link <https://github.com/texane/stlink>`_
* - ``framework-spl``
- `Standard Peripheral Library for STM32 MCUs <http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1743/PF257890>`_
* - ``framework-cmsis``
- `Vendor-independent hardware abstraction layer for the Cortex-M processor series <http://www.arm.com/products/processors/cortex-m/cortex-microcontroller-software-interface-standard.php>`_
* - ``framework-mbed``
- `mbed Framework <http://mbed.org>`_
* - ``ldscripts``
- `Linker Scripts <https://sourceware.org/binutils/docs/ld/Scripts.html>`_
.. warning::
**Linux Users:** Don't forget to install "udev" rules file
`99-platformio-udev.rules <https://github.com/ivankravets/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
Frameworks
----------
.. list-table::
:header-rows: 1
* - Name
- Description
* - :ref:`framework_cmsis`
- The ARM Cortex Microcontroller Software Interface Standard (CMSIS) is a vendor-independent hardware abstraction layer for the Cortex-M processor series and specifies debugger interfaces. The CMSIS enables consistent and simple software interfaces to the processor for interface peripherals, real-time operating systems, and middleware. It simplifies software re-use, reducing the learning curve for new microcontroller developers and cutting the time-to-market for devices.
* - :ref:`framework_libopencm3`
- The libOpenCM3 framework aims to create a free/libre/open-source firmware library for various ARM Cortex-M0(+)/M3/M4 microcontrollers, including ST STM32, Ti Tiva and Stellaris, NXP LPC 11xx, 13xx, 15xx, 17xx parts, Atmel SAM3, Energy Micro EFM32 and others.
* - :ref:`framework_mbed`
- The mbed framework The mbed SDK has been designed to provide enough hardware abstraction to be intuitive and concise, yet powerful enough to build complex projects. It is built on the low-level ARM CMSIS APIs, allowing you to code down to the metal if needed. In addition to RTOS, USB and Networking libraries, a cookbook of hundreds of reusable peripheral and module libraries have been built on top of the SDK by the mbed Developer Community.
* - :ref:`framework_spl`
- The ST Standard Peripheral Library provides a set of functions for handling the peripherals on the STM32 Cortex-M3 family. The idea is to save the user (the new user, in particular) having to deal directly with the registers.
Boards
------
.. note::
* You can list pre-configured boards by :ref:`cmd_boards` command or
`PlatformIO Boards Explorer <http://platformio.org/#!/boards>`_
* For more detailed ``board`` information please scroll tables below by
horizontal.
ST
~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``disco_f051r8``
- `STM32F0DISCOVERY <http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF253215>`_
- STM32F051R8T6
- 48 MHz
- 64 Kb
- 8 Kb
* - ``disco_f100rb``
- `STM32VLDISCOVERY <http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF250863>`_
- STM32F100RBT6
- 24 MHz
- 128 Kb
- 8 Kb
* - ``disco_f303vc``
- `STM32F3DISCOVERY <http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF254044>`_
- STM32F303VCT6
- 72 MHz
- 256 Kb
- 48 Kb
* - ``disco_f334c8``
- `32F3348DISCOVERY <http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF260318>`_
- STM32F334C8T6
- 72 MHz
- 64 Kb
- 16 Kb
* - ``disco_f401vc``
- `32F401CDISCOVERY <http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF259098>`_
- STM32F401VCT6
- 84 MHz
- 256 Kb
- 64 Kb
* - ``disco_f407vg``
- `STM32F4DISCOVERY <http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF252419>`_
- STM32F407VGT6
- 168 MHz
- 1024 Kb
- 128 Kb
* - ``disco_f429zi``
- `32F429IDISCOVERY <http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF259090>`_
- STM32F429ZIT6
- 180 MHz
- 2048 Kb
- 256 Kb
* - ``disco_l152rb``
- `STM32LDISCOVERY <http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF258515>`_
- STM32L152RBT6
- 32 MHz
- 128 Kb
- 16 Kb
* - ``nucleo_f030r8``
- `ST Nucleo F030R8 <https://developer.mbed.org/platforms/ST-Nucleo-F030R8/>`_
- STM32F030R8T6
- 48 MHz
- 64 Kb
- 8 Kb
* - ``nucleo_f070rb``
- `ST Nucleo F070RB <https://developer.mbed.org/platforms/ST-Nucleo-F070RB/>`_
- STM32F070RBT6
- 48 MHz
- 128 Kb
- 16 Kb
* - ``nucleo_f072rb``
- `ST Nucleo F072RB <https://developer.mbed.org/platforms/ST-Nucleo-F072RB/>`_
- STM32F072RBT6
- 48 MHz
- 128 Kb
- 16 Kb
* - ``nucleo_f091rc``
- `ST Nucleo F091RC <https://developer.mbed.org/platforms/ST-Nucleo-F091RC/>`_
- STM32F091RCT6
- 48 MHz
- 256 Kb
- 32 Kb
* - ``nucleo_f103rb``
- `ST Nucleo F103RB <https://developer.mbed.org/platforms/ST-Nucleo-F103RB/>`_
- STM32F103RBT6
- 72 MHz
- 128 Kb
- 20 Kb
* - ``nucleo_f302r8``
- `ST Nucleo F302R8 <https://developer.mbed.org/platforms/ST-Nucleo-F302R8/>`_
- STM32F302R8T6
- 72 MHz
- 64 Kb
- 16 Kb
* - ``nucleo_f303re``
- `ST Nucleo F303RE <http://developer.mbed.org/platforms/ST-Nucleo-F303RE/>`_
- STM32F303RET6
- 72 MHz
- 512 Kb
- 64 Kb
* - ``nucleo_f334r8``
- `ST Nucleo F334R8 <https://developer.mbed.org/platforms/ST-Nucleo-F334R8/>`_
- STM32F334R8T6
- 72 MHz
- 64 Kb
- 16 Kb
* - ``nucleo_f401re``
- `ST Nucleo F401RE <https://developer.mbed.org/platforms/ST-Nucleo-F401RE/>`_
- STM32F401RET6
- 84 MHz
- 512 Kb
- 96 Kb
* - ``nucleo_f411re``
- `ST Nucleo F411RE <https://developer.mbed.org/platforms/ST-Nucleo-F411RE/>`_
- STM32F411RET6
- 100 MHz
- 512 Kb
- 128 Kb
* - ``nucleo_l053r8``
- `ST Nucleo L053R8 <https://developer.mbed.org/platforms/ST-Nucleo-L053R8/>`_
- STM32L053R8T6
- 48 MHz
- 64 Kb
- 8 Kb
* - ``nucleo_l152re``
- `ST Nucleo L152RE <https://developer.mbed.org/platforms/ST-Nucleo-L152RE/>`_
- STM32L152RET6
- 32 MHz
- 512 Kb
- 80 Kb

100
docs/platforms/teensy.rst Normal file
View File

@ -0,0 +1,100 @@
.. _platform_teensy:
Platform ``teensy``
===================
Teensy is a complete USB-based microcontroller development system, in a very small footprint, capable of implementing many types of projects. All programming is done via the USB port. No special programmer is needed, only a standard "Mini-B" USB cable and a PC or Macintosh with a USB port.
For more detailed information please visit `vendor site <https://www.pjrc.com/teensy>`_.
.. contents::
Packages
--------
.. list-table::
:header-rows: 1
* - Name
- Contents
* - ``toolchain-atmelavr``
- `avr-gcc <https://gcc.gnu.org/wiki/avr-gcc>`_, `GDB <http://www.gnu.org/software/gdb/>`_, `AVaRICE <http://avarice.sourceforge.net/>`_, `SimulAVR <http://www.nongnu.org/simulavr/>`_
* - ``ldscripts``
- `Linker Scripts <https://sourceware.org/binutils/docs/ld/Scripts.html>`_
* - ``framework-arduinoteensy``
- `Arduino Wiring-based Framework <http://arduino.cc/en/Reference/HomePage>`_
* - ``toolchain-gccarmnoneeabi``
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_
* - ``tool-teensy``
- `Teensy Loader <https://www.pjrc.com/teensy/loader.html>`_
.. warning::
**Linux Users:** Don't forget to install "udev" rules file
`99-platformio-udev.rules <https://github.com/ivankravets/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
Frameworks
----------
.. list-table::
:header-rows: 1
* - Name
- Description
* - :ref:`framework_arduino`
- Arduino Framework allows writing cross-platform software to control devices attached to a wide range of Arduino boards to create all kinds of creative coding, interactive objects, spaces or physical experiences.
Boards
------
.. note::
* You can list pre-configured boards by :ref:`cmd_boards` command or
`PlatformIO Boards Explorer <http://platformio.org/#!/boards>`_
* For more detailed ``board`` information please scroll tables below by
horizontal.
Teensy
~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``teensy20``
- `Teensy 2.0 <https://www.pjrc.com/store/teensy.html>`_
- ATMEGA32U4
- 16 MHz
- 32 Kb
- 2.5 Kb
* - ``teensy20pp``
- `Teensy++ 2.0 <https://www.pjrc.com/store/teensypp.html>`_
- AT90USB1286
- 16 MHz
- 128 Kb
- 8 Kb
* - ``teensy30``
- `Teensy 3.0 <https://www.pjrc.com/store/teensy3.html>`_
- MK20DX128
- 48 MHz
- 128 Kb
- 16 Kb
* - ``teensy31``
- `Teensy 3.1 <https://www.pjrc.com/store/teensy31.html>`_
- MK20DX256
- 72 MHz
- 256 Kb
- 64 Kb

View File

@ -2,11 +2,9 @@
Platform ``timsp430``
=====================
MSP430 microcontrollers (MCUs) from Texas Instruments (TI) are 16-bit, RISC-based, mixed-signal processors designed for ultra-low power. These MCUs offer the lowest power consumption and the perfect mix of integrated peripherals for thousands of applications.
`MSP430 microcontrollers (MCUs) from Texas Instruments (TI) <http://www.ti.com/lsds/ti/microcontrollers_16-bit_32-bit/msp/overview.page>`_
are 16-bit, RISC-based, mixed-signal processors designed for ultra-low power.
These MCUs offer the lowest power consumption and the perfect mix of integrated
peripherals for thousands of applications.
For more detailed information please visit `vendor site <http://www.ti.com/lsds/ti/microcontrollers_16-bit_32-bit/msp/overview.page>`_.
.. contents::
@ -17,103 +15,127 @@ Packages
:header-rows: 1
* - Name
- Alias
- Contents
* - ``toolchain-timsp430``
- toolchain
- `msp-gcc <http://sourceforge.net/projects/mspgcc/>`_,
`GDB <http://www.gnu.org/software/gdb/>`_
- `msp-gcc <http://sourceforge.net/projects/mspgcc/>`_, `GDB <http://www.gnu.org/software/gdb/>`_
* - ``tool-mspdebug``
- uploader
- `MSPDebug <http://mspdebug.sourceforge.net>`_
- `MSPDebug <http://mspdebug.sourceforge.net/>`_
* - ``framework-energiamsp430``
-
- See below in :ref:`timsp430_frameworks`
- `Energia Wiring-based Framework (MSP430 Core) <http://energia.nu/reference/>`_
* - ``framework-arduinomsp430``
- `Arduino Wiring-based Framework (MSP430 Core) <http://arduino.cc/en/Reference/HomePage>`_
.. warning::
**Linux Users:** Don't forget to install "udev" rules file
`99-platformio-udev.rules <https://github.com/ivankravets/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
.. note::
You can install ``atmelavr`` platform with these packages
via :ref:`cmd_install` command.
.. _timsp430_frameworks:
Frameworks
----------
.. list-table::
:header-rows: 1
* - Type ``framework``
- Name
- Reference
* - ``energia``
- Energia Wiring-based Framework (MSP430 Core)
- `Documentation <http://energia.nu/reference/>`_
* - Name
- Description
* - :ref:`framework_arduino`
- Arduino Framework allows writing cross-platform software to control devices attached to a wide range of Arduino boards to create all kinds of creative coding, interactive objects, spaces or physical experiences.
* - :ref:`framework_energia`
- Energia framework enables pretty much anyone to start easily creating microcontroller-based projects and applications. Its easy-to-use libraries and functions provide developers of all experience levels to start blinking LEDs, buzzing buzzers and sensing sensors more quickly than ever before.
Boards
------
.. note::
For more detailed ``board`` information please scroll table below by
horizontal.
* You can list pre-configured boards by :ref:`cmd_boards` command or
`PlatformIO Boards Explorer <http://platformio.org/#!/boards>`_
* For more detailed ``board`` information please scroll tables below by
horizontal.
PanStamp
~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller ``board_mcu``
- Frequency ``board_f_cpu``
- Microcontroller
- Frequency
- Flash
- RAM
* - ``lpmsp430g2231``
- `MSP430G2231 LaunchPad <http://www.ti.com/ww/en/launchpad/launchpads-msp430-msp-exp430g2.html>`_
- MSP430G2231 ``msp430g2231``
- 16 MHz ``16000000L``
- 2 Kb
- 128 B
* - ``lpmsp430g2452``
- `MSP430G2452 LaunchPad <http://www.ti.com/ww/en/launchpad/launchpads-msp430-msp-exp430g2.html>`_
- MSP430G2452 ``msp430g2452``
- 16 MHz ``16000000L``
- 8 Kb
- 256 B
* - ``lpmsp430g2553``
- `MSP430G2553 LaunchPad <http://www.ti.com/ww/en/launchpad/launchpads-msp430-msp-exp430g2.html>`_
- MSP430G2553 ``msp430g2553``
- 16 MHz ``16000000L``
- 16 Kb
- 512 B
* - ``panStampNRG``
- `PanStamp NRG 1.1 <http://www.panstamp.com/product/197/>`_
- CC430F5137
- 12 MHz
- 32 Kb
- 4 Kb
TI
~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``lpmsp430f5529``
- `MSP430F5529 LaunchPad (16 Mhz) <http://www.ti.com/ww/en/launchpad/launchpads-msp430-msp-exp430f5529lp.html>`_
- MSP430F5529 ``msp430f5529``
- 16 MHz ``16000000L``
- `LaunchPad w/ msp430f5529 (16MHz) <http://www.ti.com/ww/en/launchpad/launchpads-msp430-msp-exp430f5529lp.html>`_
- MSP430F5529
- 16 MHz
- 128 Kb
- 8 KB
- 1 Kb
* - ``lpmsp430f5529_25``
- `MSP430F5529 LaunchPad (25 Mhz) <http://www.ti.com/ww/en/launchpad/launchpads-msp430-msp-exp430f5529lp.html>`_
- MSP430F5529 ``msp430f5529``
- 25 MHz ``25000000L``
- `LaunchPad w/ msp430f5529 (25MHz) <http://www.ti.com/ww/en/launchpad/launchpads-msp430-msp-exp430f5529lp.html>`_
- MSP430F5529
- 25 MHz
- 128 Kb
- 8 KB
- 1 Kb
* - ``lpmsp430fr5739``
- `MSP430FR5739 Experimenter Board <http://www.ti.com/tool/msp-exp430fr5739>`_
- MSP430FR5739 ``msp430fr5739``
- 16 MHz ``16000000L``
- `FraunchPad w/ msp430fr5739 <http://www.ti.com/tool/msp-exp430fr5739>`_
- MSP430FR5739
- 16 MHz
- 16 Kb
- 1 KB
- 1 Kb
* - ``lpmsp430fr5969``
- `MSP430FR5969 LaunchPad <http://www.ti.com/ww/en/launchpad/launchpads-msp430-msp-exp430fr5969.html>`_
- MSP430FR5969 ``msp430fr5969``
- 16 MHz ``16000000L``
- `LaunchPad w/ msp430fr5969 <http://www.ti.com/ww/en/launchpad/launchpads-msp430-msp-exp430fr5969.html>`_
- MSP430FR5969
- 8 MHz
- 64 Kb
- 2 KB
More detailed information you can find here
`MSP430 LaunchPads <http://www.ti.com/ww/en/launchpad/launchpads-msp430.html>`_.
- 1 Kb
* - ``lpmsp430g2231``
- `LaunchPad w/ msp430g2231 (1 MHz) <http://www.ti.com/ww/en/launchpad/launchpads-msp430-msp-exp430g2.html>`_
- MSP430G2231
- 1 MHz
- 2 Kb
- 0.125 Kb
* - ``lpmsp430g2452``
- `LaunchPad w/ msp430g2452 (16MHz) <http://www.ti.com/ww/en/launchpad/launchpads-msp430-msp-exp430g2.html>`_
- MSP430G2452
- 16 MHz
- 8 Kb
- 0.25 Kb
* - ``lpmsp430g2553``
- `LaunchPad w/ msp430g2553 (16MHz) <http://www.ti.com/ww/en/launchpad/launchpads-msp430-msp-exp430g2.html>`_
- MSP430G2553
- 16 MHz
- 16 Kb
- 0.5 Kb

View File

@ -2,12 +2,9 @@
Platform ``titiva``
===================
Texas Instruments TM4C12x MCUs offer the industrys most popular ARM Cortex-M4 core with scalable memory and package options, unparalleled connectivity peripherals, advanced application functions, industry-leading analog integration, and extensive software solutions.
`Texas Instruments TM4C12x MCUs <http://www.ti.com/lsds/ti/microcontrollers_16-bit_32-bit/c2000_performance/control_automation/tm4c12x/overview.page>`_
offer the industrys most popular ARM®
Cortex®-M4 core with scalable memory and package options, unparalleled
connectivity peripherals, advanced application functions, industry-leading
analog integration, and extensive software solutions.
For more detailed information please visit `vendor site <http://www.ti.com/lsds/ti/microcontrollers_16-bit_32-bit/c2000_performance/control_automation/tm4c12x/overview.page>`_.
.. contents::
@ -18,76 +15,82 @@ Packages
:header-rows: 1
* - Name
- Alias
- Contents
* - ``ldscripts``
- `Linker Scripts <https://sourceware.org/binutils/docs/ld/Scripts.html>`_
* - ``framework-libopencm3``
- `libOpenCM3 Framework <http://www.libopencm3.org/>`_
* - ``toolchain-gccarmnoneeabi``
- toolchain
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded/>`_,
`GDB <http://www.gnu.org/software/gdb/>`_
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_
* - ``tool-lm4flash``
- uploader
- `Flash Programmer <http://www.ti.com/tool/lmflashprogrammer>`_
* - ``framework-energiativa``
-
- See below in :ref:`titiva_frameworks`
- `Energia Wiring-based Framework (LM4F Core) <http://energia.nu/reference/>`_
.. note::
You can install ``titiva`` platform with these packages
via :ref:`cmd_install` command.
.. warning::
**Linux Users:** Don't forget to install "udev" rules file
`99-platformio-udev.rules <https://github.com/ivankravets/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
.. _titiva_frameworks:
Frameworks
----------
.. list-table::
:header-rows: 1
* - Type ``framework``
- Name
- Reference
* - ``energia``
- Energia Wiring-based Framework (LM4F Core)
- `Documentation <http://energia.nu/reference/>`_
* - Name
- Description
* - :ref:`framework_energia`
- Energia framework enables pretty much anyone to start easily creating microcontroller-based projects and applications. Its easy-to-use libraries and functions provide developers of all experience levels to start blinking LEDs, buzzing buzzers and sensing sensors more quickly than ever before.
* - :ref:`framework_libopencm3`
- The libOpenCM3 framework aims to create a free/libre/open-source firmware library for various ARM Cortex-M0(+)/M3/M4 microcontrollers, including ST STM32, Ti Tiva and Stellaris, NXP LPC 11xx, 13xx, 15xx, 17xx parts, Atmel SAM3, Energy Micro EFM32 and others.
Boards
------
.. note::
For more detailed ``board`` information please scroll table below by
horizontal.
* You can list pre-configured boards by :ref:`cmd_boards` command or
`PlatformIO Boards Explorer <http://platformio.org/#!/boards>`_
* For more detailed ``board`` information please scroll tables below by
horizontal.
TI
~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller ``board_mcu``
- Frequency ``board_f_cpu``
- Microcontroller
- Frequency
- Flash
- RAM
* - ``lplm4f120h5qr``
- `Stellaris LM4F120 LaunchPad <http://www.ti.com/tool/ek-lm4f120xl>`_
- LM4F120H5QR ``cortex-m4``
- 80 MHz ``80000000L``
- 256 Kb
- 32 Kb
* - ``lptm4c1230c3pm``
- `Tiva C Series TM4C123G LaunchPad
<http://www.ti.com/ww/en/launchpad/launchpads-connected-ek-tm4c123gxl.html>`_
- TM4C123GH6PM ``cortex-m4``
- 80 MHz ``80000000L``
- 256 Kb
- 32 Kb
* - ``lptm4c1294ncpdt``
- `Tiva C Series TM4C1294 Connected LaunchPad
<http://www.ti.com/ww/en/launchpad/launchpads-connected-ek-tm4c1294xl.html>`_
- TM4C1294NCPDT ``cortex-m4``
- 120 Mhz ``120000000L``
- 1 Mb
- 256 Kb
More detailed information you can find here
`TIVA C Series LaunchPads <http://www.ti.com/ww/en/launchpad/launchpads-connected.html>`_.
* - ``lplm4f120h5qr``
- `LaunchPad (Stellaris) w/ lm4f120 (80MHz) <http://www.ti.com/tool/ek-lm4f120xl>`_
- LPLM4F120H5QR
- 80 MHz
- 256 Kb
- 32 Kb
* - ``lptm4c1230c3pm``
- `LaunchPad (Tiva C) w/ tm4c123 (80MHz) <http://www.ti.com/ww/en/launchpad/launchpads-connected-ek-tm4c123gxl.html>`_
- LPTM4C1230C3PM
- 80 MHz
- 256 Kb
- 32 Kb
* - ``lptm4c1294ncpdt``
- `LaunchPad (Tiva C) w/ tm4c129 (120MHz) <http://www.ti.com/ww/en/launchpad/launchpads-connected-ek-tm4c1294xl.html>`_
- LPTM4C1294NCPDT
- 120 MHz
- 1024 Kb
- 256 Kb

View File

@ -1,19 +1,104 @@
.. _projectconf:
Project Configuration File
==========================
Project Configuration File ``platformio.ini``
=============================================
The Project configuration file is named ``platformio.ini``. This is a
`INI-style <http://en.wikipedia.org/wiki/INI_file>`_ file.
``platformio.ini`` has sections (each denoted by a ``[header]``) and
key / value pairs within the sections. A sign ``#`` at the beginning of the
line indicate a comment. Comment lines are ignored.
line indicates a comment. Comment lines are ignored.
The sections and their allowable values are described below.
.. contents::
[platformio]
------------
A ``platformio`` section is used for overriding default configuration options
.. note::
Relative path is allowed for directory option:
* ``~`` will be expanded to user's home directory
* ``../`` or ``..\`` go up to one folder
Options
~~~~~~~
.. _projectconf_pio_home_dir:
``home_dir``
^^^^^^^^^^^^
Is used to store platform tool chains, frameworks, external libraries,
service data and etc.
A default value is User's home directory:
* Unix ``~/.platformio``
* Windows ``%HOMEPATH%\.platformio``
This option can be overridden by global environment variable
:ref:`envvar_PLATFORMIO_HOME_DIR`.
.. _projectconf_pio_lib_dir:
``lib_dir``
^^^^^^^^^^^
This directory is used to store external libraries downloaded by
:ref:`librarymanager`.
A default value is ``%home_dir%/lib``.
This option can be overridden by global environment variable
:ref:`envvar_PLATFORMIO_LIB_DIR`.
.. _projectconf_pio_src_dir:
``src_dir``
^^^^^^^^^^^
A path to project's source directory. PlatformIO uses it for :ref:`cmd_run`
command.
A default value is ``%project_dir%/src``.
This option can be overridden by global environment variable
:ref:`envvar_PLATFORMIO_SRC_DIR`.
.. note::
This option is useful for people who migrate from Arduino/Energia IDEs where
source directory should have the same name like the main source file.
See `example <https://github.com/ivankravets/platformio/tree/develop/examples/atmelavr-and-arduino/arduino-own-src_dir>`__ project with own source directory.
.. _projectconf_pio_envs_dir:
``envs_dir``
^^^^^^^^^^^^
*PlatformIO Builder* within :ref:`cmd_run` command uses this folder for project
environments to store compiled object files, static libraries, firmwares and
other cached information. It allows PlatformIO to build source code extremely
fast!
*You can delete this folder without any risk!* If you modify :ref:`projectconf`,
then PlatformIO will remove this folder automatically. It will be created on the
next build operation.
A default value is ``%project_dir%/.pioenvs``.
This option can be overridden by global environment variable
:ref:`envvar_PLATFORMIO_ENVS_DIR`.
.. note::
If you have any problems with building your Project environmets which
are defined in :ref:`projectconf`, then **TRY TO DELETE** this folder. In
this situation you will remove all cached files without any risk.
[env:NAME]
----------
@ -32,22 +117,30 @@ For example, ``[env:hello_world]``.
Options
~~~~~~~
.. _projectconf_env_platform:
``platform``
^^^^^^^^^^^^
:ref:`Platform <platforms>` type
:ref:`Platform <platforms>` type.
.. _projectconf_env_framework:
``framework``
^^^^^^^^^^^^^
See ``framework`` type in *Frameworks* section of :ref:`platforms`
:ref:`Framework <frameworks>` type.
The multiple frameworks are allowed, split them with comma ``,`` separator.
.. _projectconf_env_board:
``board``
^^^^^^^^^
*PlatformIO* has pre-configured settings for most popular boards. You don't
*PlatformIO* has pre-configured settings for the most popular boards. You don't
need to specify ``board_mcu``, ``board_f_cpu``, ``upload_protocol`` or
``upload_speed`` options. Just define a ``board`` type and *PlatformIO* will
pre-fill options described above with appropriate values.
@ -63,8 +156,8 @@ recognize MCU architecture. The correct type of ``board_mcu`` depends on
platform library. For example, the list of ``board_mcu`` for "megaAVR Devices"
is described `here <http://www.nongnu.org/avr-libc/user-manual/>`_.
The full list of ``board_mcu`` for popular embedded platforms you can find in
*Boards* section of :ref:`platforms`. See "Microcontroller" column.
The full list of ``board_mcu`` for the popular embedded platforms you can find
in *Boards* section of :ref:`platforms`. See "Microcontroller" column.
``board_f_cpu``
@ -74,19 +167,22 @@ An option ``board_f_cpu`` is used to define MCU frequency (Hertz, Clock). A
format of this option is ``C-like long integer`` value with ``L`` suffix. The
1 Hertz is equal to ``1L``, then 16 Mhz (Mega Hertz) is equal to ``16000000L``.
The full list of ``board_f_cpu`` for popular embedded platforms you can find in
*Boards* section of :ref:`platforms`. See "Frequency" column.
The full list of ``board_f_cpu`` for the popular embedded platforms you can
find in *Boards* section of :ref:`platforms`. See "Frequency" column.
``upload_port``
^^^^^^^^^^^^^^^
This option is used by "uploader" tool to send firmware to the board via
This option is used by "uploader" tool when sending firmware to board via
``upload_port``. For example,
* ``/dev/ttyUSB0`` - Unix-based OS
* ``COM3`` - Windows OS
If ``upload_port`` isn't specified, then *PlatformIO* will try to detect it
automatically.
To print all available serial ports use :ref:`cmd_serialports` command.
@ -100,7 +196,7 @@ A protocol that "uploader" tool uses to talk to the board.
^^^^^^^^^^^^^^^^
A connection speed (`baud rate <http://en.wikipedia.org/wiki/Baud>`_)
which "uploader" tool uses when sending firmware to the board.
which "uploader" tool uses when sending firmware to board.
``targets``
@ -116,6 +212,8 @@ When no targets are defined, *PlatformIO* will build only sources by default.
(``targets = upload``).
.. _projectconf_build_flags:
``build_flags``
^^^^^^^^^^^^^^^
@ -199,38 +297,91 @@ For more detailed information about available flags/options go to:
* `Options for Directory Search
<https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html>`_
.. _projectconf_srcbuild_flags:
``srcbuild_flags``
^^^^^^^^^^^^^^^^^^
This is option ``srcbuild_flags`` has the same behaviour like ``build_flags``
but will be applied only for project source code from ``src`` directory.
An option ``srcbuild_flags`` has the same behaviour like ``build_flags``
but will be applied only for the project source code from
:ref:`projectconf_pio_src_dir` directory.
This option can be overridden by global environment variable
:ref:`envvar_PLATFORMIO_SRCBUILD_FLAGS`.
``ignore_libs``
^^^^^^^^^^^^^^^
Specify libraries which should be ignored by ``Library Dependency Finder``
Example:
.. code-block:: ini
[env:ignore_some_libs]
ignore_libs = SPI,EngduinoV3_ID123
.. _projectconf_examples:
Examples
--------
.. note::
A full list with project examples can be found in
`PlatformIO Repository <https://github.com/ivankravets/platformio/tree/develop/examples>`_.
1. :ref:`platform_atmelavr`: Arduino UNO board with auto pre-configured
``board_*`` and ``upload_*`` options (use only ``board`` option) and Arduino
Wiring-based Framework
.. code-block:: ini
.. code-block:: ini
[env:atmelavr_arduino_uno_board]
platform = atmelavr
framework = arduino
board = uno
upload_port = /dev/ ttyUSB0
# upload_port = COM3 # for Windows OS
# enable auto-uploading
targets = upload
2. :ref:`platform_atmelavr`: Microduino Core (ATmega168P, 3.3V) board with
auto pre-configured ``board_*`` and ``upload_*`` options (use only
``board`` option) and Arduino Wiring-based Framework
.. code-block:: ini
[env:atmelavr_microduino_core_board]
platform = atmelavr
framework = arduino
board = 168pa8m
# enable auto-uploading
targets = upload
2. :ref:`platform_atmelavr`: Embedded board that is based on ATmega168 MCU with
3. :ref:`platform_atmelavr`: Raspduino board with
auto pre-configured ``board_*`` and ``upload_*`` options (use only
``board`` option) and Arduino Wiring-based Framework
.. code-block:: ini
[env:atmelavr_raspduino_board]
platform = atmelavr
framework = arduino
board = raspduino
upload_port = /dev/ttyS0
# enable auto-uploading
targets = upload
4. :ref:`platform_atmelavr`: Embedded board that is based on ATmega168 MCU with
"arduino" bootloader
.. code-block:: ini
.. code-block:: ini
[env:atmelavr_atmega168_board]
platform = atmelavr
@ -238,7 +389,8 @@ Examples
board_f_cpu = 16000000L
upload_port = /dev/ttyUSB0
# upload_port = COM3 # for Windows OS
# for Windows OS
# upload_port = COM3
upload_protocol = arduino
upload_speed = 19200
@ -246,11 +398,23 @@ Examples
targets = upload
3. :ref:`platform_timsp430`: TI MSP430G2553 LaunchPad with auto pre-configured
5. Upload firmware via USB programmer (USBasp) to :ref:`platform_atmelavr`
microcontrollers
.. code-block:: ini
[env:atmelavr_usbasp]
platform = atmelavr
framework = arduino
board = pro8MHzatmega328
upload_protocol = usbasp -B5
6. :ref:`platform_timsp430`: TI MSP430G2553 LaunchPad with auto pre-configured
``board_*`` and ``upload_*`` options (use only ``board`` option) and Energia
Wiring-based Framework
.. code-block:: ini
.. code-block:: ini
[env:timsp430_g2553_launchpad]
platform = timsp430
@ -258,9 +422,9 @@ Examples
board = lpmsp430g2553
4. :ref:`platform_timsp430`: Embedded board that is based on MSP430G2553 MCU
7. :ref:`platform_timsp430`: Embedded board that is based on MSP430G2553 MCU
.. code-block:: ini
.. code-block:: ini
[env:timsp430_g2553_board]
platform = timsp430
@ -273,11 +437,11 @@ Examples
targets = upload
5. :ref:`platform_titiva`: TI Tiva C ARM Series TM4C123G LaunchPad with auto
8. :ref:`platform_titiva`: TI Tiva C ARM Series TM4C123G LaunchPad with auto
pre-configured ``board_*`` and ``upload_*`` options (use only ``board``
option) and Energia Wiring-based Framework
.. code-block:: ini
.. code-block:: ini
[env:titiva_tm4c1230c3pm_launchpad]
platform = titiva

View File

@ -3,50 +3,62 @@
Quickstart
==========
First, :ref:`Install PlatformIO <installation>`.
.. note::
Please read `Get Started <http://platformio.org/#!/get-started>`_
article from the official WebSite.
Print all available development platforms for installing
1. :ref:`Install PlatformIO <installation>`.
2. Find board ``type`` on this :ref:`Embedded Boards <platforms>` page or
via :ref:`cmd_boards` command.
3. Initialize new PlatformIO based project via :ref:`cmd_init` command with the
pre-configured environments for your boards:
.. code-block:: bash
$ platformio search all
[ ... ]
$ platformio init --board=TYPE_1 --board=TYPE_2 --board=TYPE_N
Would you like to enable firmware auto-uploading when project is successfully built using `platformio run` command?
Don't forget that you can upload firmware manually using `platformio run --target upload` command. [y/N]: y
Install new development platform
The current working directory *** will be used for the new project.
You can specify another project directory via
`platformio init -d %PATH_TO_THE_PROJECT_DIR%` command.
.. code-block:: bash
The next files/directories will be created in ***
platformio.ini - Project Configuration File. |-> PLEASE EDIT ME <-|
src - Put your source code here
lib - Put here project specific or 3-rd party libraries
Do you want to continue? [y/N]: y
Project has been successfully initialized!
Useful commands:
`platformio run` - process/build project from the current directory
`platformio run --target upload` or `platformio run -t upload` - upload firmware to embedded board
`platformio run --target clean` - clean project (remove compiled files)
$ platformio install PLATFORM
Downloading [####################################] 100%
Unpacking [####################################] 100%
Installing .....
[ ... ]
The platform 'PLATFORM' has been successfully installed!
Put your source code ``*.h, *.c, *.cpp or *.ino`` files to ``src`` directory.
4. Process the project's environments.
Initialize new PlatformIO based project
.. code-block:: bash
$ cd /path/to/empty/directory
$ platformio init
Project has been initialized!
Please put your source code to `src` directory, external libraries to `lib`
and setup environments in `platformio.ini` file.
Then process project with `platformio run` command.
Process the project's environments
Change working directory to the project's root where is located
:ref:`Project Configuration File (platformio.ini) <projectconf>` and run:
.. code-block:: bash
$ platformio run
# if embedded project then upload firmware
# if you don't have specified `targets = upload` option for environment,
# then you can upload firmware manually with this command:
$ platformio run --target upload
# clean project
$ platformio run --target clean
If you don't have installed required platforms, then *PlatformIO* will propose
you to install them automatically.
For more detailed information please go to :ref:`userguide` sections.
Further examples can be found in `PlatformIO Repository <https://github.com/ivankravets/platformio/tree/develop/examples>`_.
Also, for more detailed information as for commands please go to
:ref:`userguide` sections.

View File

@ -0,0 +1,125 @@
.. _cmd_boards:
platformio boards
=================
.. contents::
Usage
-----
.. code-block:: bash
# Print all available pre-configured embedded boards
platformio boards
# Filter boards by "Query"
platformio boards QUERY
Description
-----------
List pre-configured Embedded Boards
Examples
--------
1. Show Arduino-based boards
.. code-block:: bash
$ platformio boards arduino
Platform: atmelavr
---------------------------------------------------------------------------
Type MCU Frequency Flash RAM Name
---------------------------------------------------------------------------
btatmega168 atmega168 16Mhz 14Kb 1Kb Arduino BT ATmega168
btatmega328 atmega328p 16Mhz 28Kb 2Kb Arduino BT ATmega328
diecimilaatmega168 atmega168 16Mhz 14Kb 1Kb Arduino Duemilanove or Diecimila ATmega168
diecimilaatmega328 atmega328p 16Mhz 30Kb 2Kb Arduino Duemilanove or Diecimila ATmega328
esplora atmega32u4 16Mhz 28Kb 2Kb Arduino Esplora
ethernet atmega328p 16Mhz 31Kb 2Kb Arduino Ethernet
...
2. Show mbed-enabled boards
.. code-block:: bash
$ platformio boards mbed
Platform: freescalekinetis
---------------------------------------------------------------------------
Type MCU Frequency Flash RAM Name
---------------------------------------------------------------------------
frdm_k20d50m mk20dx128vlh5 48Mhz 128Kb 16Kb Freescale Kinetis FRDM-K20D50M
frdm_k22f mk22fn512vlh12 120Mhz 512Kb 128Kb Freescale Kinetis FRDM-K22F
...
Platform: nordicnrf51
---------------------------------------------------------------------------
Type MCU Frequency Flash RAM Name
---------------------------------------------------------------------------
wallBotBLE nrf51822 16Mhz 128Kb 16Kb JKSoft Wallbot BLE
nrf51_dk nrf51822 32Mhz 256Kb 32Kb Nordic nRF51-DK
...
Platform: nxplpc
---------------------------------------------------------------------------
Type MCU Frequency Flash RAM Name
---------------------------------------------------------------------------
blueboard_lpc11u24 lpc11u24 48Mhz 32Kb 8Kb BlueBoard-LPC11U24
dipcortexm0 lpc11u24 50Mhz 32Kb 8Kb DipCortex M0
lpc11u35 lpc11u35 48Mhz 64Kb 10Kb EA LPC11U35 QuickStart Board
...
Platform: ststm32
---------------------------------------------------------------------------
Type MCU Frequency Flash RAM Name
---------------------------------------------------------------------------
disco_f401vc stm32f401vct6 84Mhz 256Kb 64Kb 32F401CDISCOVERY
nucleo_f030r8 stm32f030r8t6 48Mhz 64Kb 8Kb ST Nucleo F030R8
...
3. Show boards which are based on ``ATmega168`` MCU
.. code-block:: bash
$ platformio boards atmega168
Platform: atmelavr
---------------------------------------------------------------------------
Type MCU Frequency Flash RAM Name
---------------------------------------------------------------------------
btatmega168 atmega168 16Mhz 14Kb 1Kb Arduino BT ATmega168
diecimilaatmega168 atmega168 16Mhz 14Kb 1Kb Arduino Duemilanove or Diecimila ATmega168
miniatmega168 atmega168 16Mhz 14Kb 1Kb Arduino Mini ATmega168
atmegangatmega168 atmega168 16Mhz 14Kb 1Kb Arduino NG or older ATmega168
nanoatmega168 atmega168 16Mhz 14Kb 1Kb Arduino Nano ATmega168
pro8MHzatmega168 atmega168 8Mhz 14Kb 1Kb Arduino Pro or Pro Mini ATmega168 (3.3V, 8 MHz)
pro16MHzatmega168 atmega168 16Mhz 14Kb 1Kb Arduino Pro or Pro Mini ATmega168 (5V, 16 MHz)
lilypadatmega168 atmega168 8Mhz 14Kb 1Kb LilyPad Arduino ATmega168
168pa16m atmega168p 16Mhz 15Kb 1Kb Microduino Core (Atmega168PA@16M,5V)
168pa8m atmega168p 8Mhz 15Kb 1Kb Microduino Core (Atmega168PA@8M,3.3V)
4. Show boards by :ref:`platform_timsp430`
.. code-block:: bash
$ platformio boards timsp430
Platform: timsp430
---------------------------------------------------------------------------
Type MCU Frequency Flash RAM Name
---------------------------------------------------------------------------
lpmsp430fr5739 msp430fr5739 16Mhz 15Kb 1Kb FraunchPad w/ msp430fr5739
lpmsp430f5529 msp430f5529 16Mhz 128Kb 1Kb LaunchPad w/ msp430f5529 (16MHz)
lpmsp430f5529_25 msp430f5529 25Mhz 128Kb 1Kb LaunchPad w/ msp430f5529 (25MHz)
lpmsp430fr5969 msp430fr5969 8Mhz 64Kb 1Kb LaunchPad w/ msp430fr5969
lpmsp430g2231 msp430g2231 1Mhz 2Kb 128B LaunchPad w/ msp430g2231 (1MHz)
lpmsp430g2452 msp430g2452 16Mhz 8Kb 256B LaunchPad w/ msp430g2452 (16MHz)
lpmsp430g2553 msp430g2553 16Mhz 16Kb 512B LaunchPad w/ msp430g2553 (16MHz)

View File

@ -10,7 +10,7 @@ Usage
.. code-block:: bash
platformio init
platformio init [OPTIONS]
Description
@ -21,22 +21,101 @@ Initialize new PlatformIO based project.
This command will create:
* ``.pioenvs`` - a temporary working directory.
* ``lib`` - a directory for project specific libraries. PlatformIO will
compile them to static libraries and link to executable file
* ``src`` - a source directory. Put your source code here.
* :ref:`projectconf`
* ``src`` - a source directory. Put your source code here
* ``lib`` - a directory for the project specific libraries. PlatformIO will
compile them to static libraries and link to executable file
Options
-------
.. option::
--project-dir, -d
A path to the directory where *PlatformIO* will initialise new project.
.. option::
--board, -b
If you specify board ``type`` (you can pass multiple ``--board`` options), then
*PlatformIO* will automatically generate environment for :ref:`projectconf` and
pre-fill these data:
* :ref:`projectconf_env_platform`
* :ref:`projectconf_env_framework`
* :ref:`projectconf_env_board`
The full list with pre-configured boards is available here :ref:`platforms`.
.. option::
--disable-auto-uploading
If you initialise project with the specified ``--board``, then *PlatformIO*
will create environment with enabled firmware auto-uploading. This option
allows you to disable firmware auto-uploading by default.
Examples
--------
1. Create new project in the current working directory
.. code-block:: bash
# Change directory to the future project
$ cd /path/to/empty/directory
$ platformio init
Project has been initialized!
Please put your source code to `src` directory, external libraries to `lib`
and setup environments in `platformio.ini` file.
Then process project with `platformio run` command.
The current working directory *** will be used for the new project.
You can specify another project directory via
`platformio init -d %PATH_TO_THE_PROJECT_DIR%` command.
The next files/directories will be created in ***
platformio.ini - Project Configuration File. |-> PLEASE EDIT ME <-|
src - Put your source code here
lib - Put here project specific or 3-rd party libraries
Do you want to continue? [y/N]: y
Project has been successfully initialized!
Useful commands:
`platformio run` - process/build project from the current directory
`platformio run --target upload` or `platformio run -t upload` - upload firmware to embedded board
`platformio run --target clean` - clean project (remove compiled files)
2. Create new project in the specified directory
.. code-block:: bash
$ platformio init -d %PATH_TO_DIR%
The next files/directories will be created in ***
platformio.ini - Project Configuration File. |-> PLEASE EDIT ME <-|
src - Put your source code here
lib - Put here project specific or 3-rd party libraries
Do you want to continue? [y/N]: y
Project has been successfully initialized!
Useful commands:
`platformio run` - process/build project from the current directory
`platformio run --target upload` or `platformio run -t upload` - upload firmware to embedded board
`platformio run --target clean` - clean project (remove compiled files)
3. Initialise project for Arduino Uno
.. code-block:: bash
$ platformio init --board uno
Would you like to enable firmware auto-uploading when project is successfully built using `platformio run` command?
Don't forget that you can upload firmware manually using `platformio run --target upload` command. [y/N]: y
The current working directory *** will be used for the new project.
You can specify another project directory via
`platformio init -d %PATH_TO_THE_PROJECT_DIR%` command.
The next files/directories will be created in ***
platformio.ini - Project Configuration File. |-> PLEASE EDIT ME <-|
src - Put your source code here
lib - Put here project specific or 3-rd party libraries
Do you want to continue? [y/N]: y
Project has been successfully initialized!
Useful commands:
`platformio run` - process/build project from the current directory
`platformio run --target upload` or `platformio run -t upload` - upload firmware to embedded board
`platformio run --target clean` - clean project (remove compiled files)

View File

@ -24,7 +24,6 @@ There are several predefined aliases for packages, such as:
* ``toolchain``
* ``uploader``
Options
-------

View File

@ -10,7 +10,7 @@ Usage
.. code-block:: bash
platformio list
platformio list [OPTIONS]
Description
@ -18,6 +18,13 @@ Description
List installed :ref:`Platforms <platforms>`
Options
~~~~~~~
.. option::
--json-output
Return the output in `JSON <http://en.wikipedia.org/wiki/JSON>`_ format
Examples
--------
@ -25,6 +32,9 @@ Examples
.. code-block:: bash
$ platformio list
atmelavr with packages: toolchain-atmelavr, tool-avrdude, framework-arduinoavr, tool-micronucleus
atmelsam with packages: framework-arduinosam, ldscripts, toolchain-gccarmnoneeabi, tool-bossac
stm32 with packages: toolchain-gccarmnoneeabi, tool-stlink, framework-spl, framework-cmsis, framework-opencm3, ldscripts
teensy with packages: toolchain-atmelavr, ldscripts, framework-arduinoteensy, toolchain-gccarmnoneeabi, tool-teensy
timsp430 with packages: toolchain-timsp430, tool-mspdebug, framework-energiamsp430
atmelavr with packages: toolchain-atmelavr, tool-avrdude, framework-arduinoavr
titiva with packages: toolchain-gccarmnoneeabi, tool-lm4flash, framework-energiativa
titiva with packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa

View File

@ -10,11 +10,7 @@ Usage
.. code-block:: bash
# Print all available development platforms
platformio search all
# Filter platforms by "Query"
platformio search QUERY
platformio search QUERY [OPTIONS]
Description
@ -22,21 +18,89 @@ Description
Search for development :ref:`Platforms <platforms>`
Options
~~~~~~~
.. option::
--json-output
Return the output in `JSON <http://en.wikipedia.org/wiki/JSON>`_ format
Examples
--------
1. Search for TI development platforms
1. Print all available development platforms
.. code-block:: bash
$ platformio search
atmelavr (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa)
--------
Atmel AVR 8- and 32-bit MCUs deliver a unique combination of performance...
atmelsam (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa)
--------
Atmel | SMART offers Flash- based ARM products based on the ...
freescalekinetis (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa)
----------------
Freescale Kinetis Microcontrollers is family of multiple hardware- and ...
nordicnrf51 (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa)
-----------
The Nordic nRF51 Series is a family of highly flexible, multi-protocol ...
nxplpc (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa)
------
The NXP LPC is a family of 32-bit microcontroller integrated circuits ...
ststm32 (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa)
-------
The STM32 family of 32-bit Flash MCUs based on the ARM Cortex-M ...
teensy (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa)
------
Teensy is a complete USB-based microcontroller development syste ...
timsp430 (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa)
--------
MSP430 microcontrollers (MCUs) from Texas Instruments (TI) are ...
titiva (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa)
------
Texas Instruments TM4C12x MCUs offer the industrys most popular ...
2. Search for TI development platforms
.. code-block:: bash
$ platformio search ti
timsp430 - An embedded platform for TI MSP430 microcontrollers (with Energia Framework)
titiva - An embedded platform for TI TIVA C ARM microcontrollers (with Energia Framework)
timsp430 (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa)
--------
MSP430 microcontrollers (MCUs) from Texas Instruments (TI) are ...
2. Search for development platforms which support "Arduino Framework"
titiva (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa)
------
Texas Instruments TM4C12x MCUs offer the industrys most popular ...
3. Search for development platforms which support "mbed Framework"
.. code-block:: bash
$ platformio search arduino
atmelavr - An embedded platform for Atmel AVR microcontrollers (with Arduino Framework)
$ platformio search mbed
freescalekinetis (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa)
----------------
Freescale Kinetis Microcontrollers is family of multiple hardware- and ...
nordicnrf51 (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa)
-----------
The Nordic nRF51 Series is a family of highly flexible, multi-protocol ...
nxplpc (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa)
------
The NXP LPC is a family of 32-bit microcontroller integrated circuits ...
ststm32 (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa)
-------
The STM32 family of 32-bit Flash MCUs based on the ARM Cortex-M ...

View File

@ -13,7 +13,7 @@ Usage
.. code-block:: bash
platformio serialports list
platformio serialports list [OPTIONS]
Description
@ -21,6 +21,14 @@ Description
List available `Serial Ports <http://en.wikipedia.org/wiki/Serial_port>`_
Options
~~~~~~~
.. option::
--json-output
Return the output in `JSON <http://en.wikipedia.org/wiki/JSON>`_ format
Examples
~~~~~~~~
@ -57,6 +65,8 @@ Examples
Description: Silicon Labs CP210x USB to UART Bridge (COM3)
.. _cmd_serialports_monitor:
platformio serialports monitor
------------------------------
@ -171,7 +181,7 @@ Diagnostics: suppress non-error messages, default ``Off``
Examples
~~~~~~~~
1. Show available option for command
1. Show available options for *monitor*
.. code-block:: bash

View File

@ -0,0 +1,203 @@
.. _cmd_settings:
platformio settings
===================
Manage PlatformIO settings
.. contents::
platformio settings get
-----------------------
Usage
~~~~~
.. code-block:: bash
platformio settings get [NAME]
Description
~~~~~~~~~~~
Get/List existing settings
Settings
~~~~~~~~
.. _setting_auto_update_libraries:
``auto_update_libraries``
^^^^^^^^^^^^^^^^^^^^^^^^^
:Default: Yes
:Values: Yes/No
Automatically update libraries.
.. _setting_auto_update_platforms:
``auto_update_platforms``
^^^^^^^^^^^^^^^^^^^^^^^^^
:Default: Yes
:Values: Yes/No
Automatically update platforms.
.. _setting_check_libraries_interval:
``check_libraries_interval``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:Default: 7
:Values: Days (Number)
Check for the library updates interval.
.. _setting_check_platformio_interval:
``check_platformio_interval``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:Default: 3
:Values: Days (Number)
Check for the new PlatformIO interval.
.. _setting_check_platforms_interval:
``check_platforms_interval``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:Default: 7
:Values: Days (Number)
Check for the platform updates interval.
.. _setting_enable_prompts:
``enable_prompts``
^^^^^^^^^^^^^^^^^^
:Default: Yes
:Values: Yes/No
Can PlatformIO communicate with you via prompts?
* propose to install platforms which aren't installed yet
* paginate over library search results
* and etc.
.. warning::
If you are going to run *PlatformIO* from **subprocess**, you **MUST
DISABLE** all prompts. It will allow you to avoid blocking.
.. _setting_enable_telemetry:
``enable_telemetry``
^^^^^^^^^^^^^^^^^^^^
:Default: Yes
:Values: Yes/No
Shares commands, platforms and libraries usage to help us make PlatformIO
better.
.. note::
* The ``Yes`` value is equl to: ``True``, ``Y``, ``1``.
The value is not case sensetive.
* You can override these settings using :ref:`envvars`.
Examples
~~~~~~~~
1. List all settings and theirs current values
.. code-block:: bash
$ platformio settings get
Name Value [Default] Description
------------------------------------------------------------------------------------------
auto_update_libraries Yes Automatically update libraries (Yes/No)
auto_update_platforms Yes Automatically update platforms (Yes/No)
check_libraries_interval 7 Check for the library updates interval (days)
check_platformio_interval 3 Check for the new PlatformIO interval (days)
check_platforms_interval 7 Check for the platform updates interval (days)
enable_prompts Yes Can PlatformIO communicate with you via prompts: propose to install platforms which aren't installed yet, paginate over library search results and etc.)? ATTENTION!!! If you call PlatformIO like subprocess, please disable prompts to avoid blocking (Yes/No)
enable_telemetry Yes Shares commands, platforms and libraries usage to help us make PlatformIO better (Yes/No)
2. Show specified setting
.. code-block:: bash
$ platformio settings get auto_update_platforms
Name Value [Default] Description
------------------------------------------------------------------------------------------
auto_update_platforms Yes Automatically update platforms (Yes/No)
platformio settings set
-----------------------
Usage
~~~~~
.. code-block:: bash
platformio settings set NAME VALUE
Description
~~~~~~~~~~~
Set new value for the setting
Examples
~~~~~~~~
Change to check for the new PlatformIO each day
.. code-block:: bash
$ platformio settings set check_platformio_interval 1
The new value for the setting has been set!
Name Value [Default] Description
------------------------------------------------------------------------------------------
check_platformio_interval 1 [3] Check for the new PlatformIO interval (days)
platformio settings reset
-------------------------
Usage
~~~~~
.. code-block:: bash
platformio settings reset
Description
~~~~~~~~~~~
Reset settings to default
Examples
~~~~~~~~
.. code-block:: bash
$ platformio settings reset
The settings have been reseted!
Name Value [Default] Description
------------------------------------------------------------------------------------------
auto_update_libraries Yes Automatically update libraries (Yes/No)
auto_update_platforms Yes Automatically update platforms (Yes/No)
check_libraries_interval 7 Check for the library updates interval (days)
check_platformio_interval 3 Check for the new PlatformIO interval (days)
check_platforms_interval 7 Check for the platform updates interval (days)

View File

@ -29,14 +29,17 @@ Examples
----------
Package: toolchain-atmelavr
Alias: toolchain
Location: /Users/ikravets/.platformio/atmelavr/tools/toolchain
Version: 1
Installed: 2014-12-13 23:58:48
----------
Package: tool-avrdude
Alias: uploader
Location: /Users/ikravets/.platformio/atmelavr/tools/avrdude
Version: 1
Version: 2
Installed: 2015-02-13 22:23:17
----------
Package: framework-arduinoavr
Location: /Users/ikravets/.platformio/atmelavr/frameworks/arduino
Version: 12
Installed: 2015-02-23 20:57:40
----------
Package: tool-micronucleus
Version: 1
Installed: 2015-02-23 21:20:14

View File

@ -30,9 +30,50 @@ Examples
--------
Updating toolchain-atmelavr package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating framework-arduinoavr package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating tool-avrdude package:
Versions: Current=2, Latest=2 [Up-to-date]
Updating framework-arduinoavr package:
Versions: Current=12, Latest=12 [Up-to-date]
Updating tool-micronucleus package:
Versions: Current=1, Latest=1 [Up-to-date]
Platform atmelsam
--------
Updating framework-arduinosam package:
Versions: Current=3, Latest=3 [Up-to-date]
Updating ldscripts package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating toolchain-gccarmnoneeabi package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating tool-bossac package:
Versions: Current=1, Latest=1 [Up-to-date]
Platform stm32
--------
Updating toolchain-gccarmnoneeabi package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating tool-stlink package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating framework-spl package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating framework-cmsis package:
Versions: Current=2, Latest=2 [Up-to-date]
Updating framework-opencm3 package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating ldscripts package:
Versions: Current=1, Latest=1 [Up-to-date]
Platform teensy
--------
Updating toolchain-atmelavr package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating ldscripts package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating framework-arduinoteensy package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating toolchain-gccarmnoneeabi package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating tool-teensy package:
Versions: Current=1, Latest=1 [Up-to-date]
Platform timsp430
@ -42,13 +83,17 @@ Examples
Updating tool-mspdebug package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating framework-energiamsp430 package:
Versions: Current=1, Latest=1 [Up-to-date]
Versions: Current=2, Latest=2 [Up-to-date]
Platform titiva
--------
Updating ldscripts package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating toolchain-gccarmnoneeabi package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating tool-lm4flash package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating framework-energiativa package:
Updating framework-opencm3 package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating framework-energiativa package:
Versions: Current=4, Latest=4 [Up-to-date]

View File

@ -14,12 +14,15 @@ To print all available commands and options use:
.. toctree::
:maxdepth: 2
cmd_boards
cmd_init
cmd_install
platformio lib <lib/index>
cmd_list
cmd_run
cmd_search
cmd_serialports
cmd_settings
cmd_show
cmd_uninstall
cmd_update

View File

@ -0,0 +1,72 @@
.. _cmd_lib_install:
platformio lib install
======================
.. contents::
Usage
-----
.. code-block:: bash
platformio lib install [OPTIONS] [LIBRARY_ID]
Description
-----------
Install new library by specified
`PlatformIO Library Registry ID <http://platformio.org/#!/lib>`_.
Options
-------
.. option::
-v, --version
Install specified version of library
Examples
--------
1. Install the latest version of library
.. code-block:: bash
# IRremote: http://platformio.org/#!/lib/show/4/IRremote
$ platformio lib install 4
# Installing library [ 4 ]:
# Downloading [####################################] 100%
# Unpacking [####################################] 100%
# The library #4 'IRremote' has been successfully installed!
2. Install specified version of library
.. code-block:: bash
# XBee: http://platformio.org/#!/lib/show/6/XBee
$ platformio lib install 6 --version=0.5
# Installing library [ 6 ]:
# Downloading [####################################] 100%
# Unpacking [####################################] 100%
# The library #6 'XBee' has been successfully installed!
3. Install library with dependencies
.. code-block:: bash
# Adafruit-ST7735: http://platformio.org/#!/lib/show/12/Adafruit-ST7735
$ platformio lib install 12
# Installing library [ 12 ]:
# Downloading [####################################] 100%
# Unpacking [####################################] 100%
# The library #12 'Adafruit-ST7735' has been successfully installed!
# Installing dependencies:
# Installing library [ 13 ]:
# Downloading [####################################] 100%
# Unpacking [####################################] 100%
# The library #13 'Adafruit-GFX' has been successfully installed!

View File

@ -0,0 +1,46 @@
.. _cmd_lib_list:
platformio lib list
===================
.. contents::
Usage
-----
.. code-block:: bash
platformio lib list [OPTIONS]
Description
-----------
List installed libraries
Options
~~~~~~~
.. option::
--json-output
Return the output in `JSON <http://en.wikipedia.org/wiki/JSON>`_ format
Examples
--------
.. code-block:: bash
$ platformio lib list
#
# [ ID ] Name Compatibility "Authors": Description
# -------------------------------------------------------------------------------------
# [ 23 ] Adafruit-L3GD20-Unified arduino, atmelavr "Adafruit Industries": Unified sensor driver for the L3GD20 Gyroscope
# [ 12 ] Adafruit-ST7735 arduino, atmelavr "Adafruit Industries": A library for the Adafruit 1.8" SPI display
# [ 31 ] Adafruit-Unified-Sensor arduino, atmelavr "Adafruit Industries": Adafruit Unified Sensor Driver
# [ 26 ] Adafruit-LSM303DLHC-Unified arduino, atmelavr "Adafruit Industries": Unified sensor driver for Adafruit's LSM303 Breakout (Accelerometer + Magnetometer)
# [ 6 ] XBee arduino, atmelavr "Andrew Rapp": Arduino library for communicating with XBees in API mode
# [ 13 ] Adafruit-GFX arduino, atmelavr "Adafruit Industries": A core graphics library for all our displays, providing a common set of graphics primitives (points, lines, circles, etc.)
# [ 4 ] IRremote arduino, atmelavr "Ken Shirriff": Send and receive infrared signals with multiple protocols
# [ 14 ] Adafruit-9DOF-Unified arduino, atmelavr "Adafruit Industries": Unified sensor driver for the Adafruit 9DOF Breakout (L3GD20 / LSM303)
# ...

View File

@ -0,0 +1,26 @@
.. _cmd_lib_register:
platformio lib register
=======================
.. contents::
Usage
-----
.. code-block:: bash
platformio lib regiter [HTTP_URL_TO_LIBRARY.JSON]
Description
-----------
Register new library and allow others to install it.
Examples
--------
.. code-block:: bash
$ platformio lib register http://my.example.com/library.json

View File

@ -0,0 +1,213 @@
.. _cmd_lib_search:
platformio lib search
=====================
.. contents::
Usage
-----
.. code-block:: bash
platformio lib search [OPTIONS] [QUERY]
Description
-----------
Search for library in `PlatformIO Library Registry <http://platformio.org/#!/lib>`_
by :ref:`library_config` fields in the boolean mode.
The boolean search capability supports the following operators:
.. list-table::
:header-rows: 1
* - Operator
- Description
* - ``+``
- A leading or trailing plus sign indicates that this word must be present
in library fields (see above) that is returned.
* - ``-``
- A leading or trailing minus sign indicates that this word must not be
present in any of the libraries that are returned.
* - ``(no operator)``
- By default (when neither ``+`` nor ``-`` is specified), the
word is optional, but the libraries that contain it are rated higher.
* - ``> <``
- These two operators are used to change a word's contribution to the
relevance value that is assigned to a library. The ``>`` operator
increases the contribution and the ``<`` operator decreases it.
* - ``( )``
- Parentheses group words into subexpressions. Parenthesized groups can
be nested.
* - ``~``
- A leading tilde acts as a negation operator, causing the word's
contribution to the library's relevance to be negative. This is useful for
marking "noise" words. A library containing such a word is rated lower than
others, but is not excluded altogether, as it would be with the ``-`` operator.
* - ``*``
- The asterisk serves as the truncation (or wildcard) operator. Unlike the
other operators, it is appended to the word to be affected. Words match if
they begin with the word preceding the ``*`` operator.
* - ``"``
- A phrase that is enclosed within double quote (``"``) characters matches
only libraries that contain the phrase literally, as it was typed.
For more detail information please go to
`MySQL Boolean Full-Text Searches <http://dev.mysql.com/doc/refman/5.6/en/fulltext-boolean.html>`_.
Options
-------
.. option::
-a, --author
Filter libraries by specified author
.. option::
-k, --keyword
Filter libraries by specified keyword
.. option::
-f, --framework
Filter libraries by specified framework
.. option::
-p, --platform
Filter libraries by specified keyword
Examples
--------
1. List all libraries
.. code-block:: bash
$ platformio lib search
# Found N libraries:
#
# [ ID ] Name Compatibility "Authors": Description
# -------------------------------------------------------------------------------------
# [ 14 ] Adafruit-9DOF-Unified arduino, atmelavr "Adafruit Industries": Unified sensor driver for the Adafruit 9DOF Breakout (L3GD20 / LSM303)
# [ 13 ] Adafruit-GFX arduino, atmelavr "Adafruit Industries": A core graphics library for all our displays, providing a common set of graphics primitives (points, lines, circles, etc.)
# [ 23 ] Adafruit-L3GD20-Unified arduino, atmelavr "Adafruit Industries": Unified sensor driver for the L3GD20 Gyroscope
# [ 26 ] Adafruit-LSM303DLHC-Unified arduino, atmelavr "Adafruit Industries": Unified sensor driver for Adafruit's LSM303 Breakout (Accelerometer + Magnetometer)
# [ 12 ] Adafruit-ST7735 arduino, atmelavr "Adafruit Industries": A library for the Adafruit 1.8" SPI display
# [ 31 ] Adafruit-Unified-Sensor arduino, atmelavr "Adafruit Industries": Adafruit Unified Sensor Driver
# [ 4 ] IRremote arduino, atmelavr "Ken Shirriff": Send and receive infrared signals with multiple protocols
# [ 1 ] OneWire arduino, atmelavr "Paul Stoffregen": Control devices (from Dallas Semiconductor) that use the One Wire protocol (DS18S20, DS18B20, DS2408 and etc)
# [ 6 ] XBee arduino, atmelavr "Andrew Rapp": Arduino library for communicating with XBees in API mode
# [ 15 ] Adafruit-ADXL345-Unified arduino, atmelavr "Adafruit Industries": Unified driver for the ADXL345 Accelerometer
# Show next libraries? [y/N]:
# ...
2. Search for `1-Wire libraries <http://platformio.org/#!/lib/search?query=%25221-wire%2522>`_
.. code-block:: bash
$ platformio lib search "1-wire"
# Found N libraries:
#
# [ ID ] Name Compatibility "Authors": Description
# -------------------------------------------------------------------------------------
# [ 1 ] OneWire arduino, atmelavr "Paul Stoffregen": Control devices (from Dallas Semiconductor) that use the One Wire protocol (DS18S20, DS18B20, DS2408 and etc)
# ...
3. Search for `Arduino-based "I2C" libraries <http://platformio.org/#!/lib/search?query=framework%253Aarduino%2520i2c>`_
.. code-block:: bash
$ platformio lib search "i2c" --framework="arduino"
# Found N libraries:
#
# [ ID ] Name Compatibility "Authors": Description
# -------------------------------------------------------------------------------------
# [ 11 ] I2Cdevlib-Core arduino, atmelavr "Jeff Rowberg": The I2C Device Library (I2Cdevlib) is a collection of uniform and well-documented classes to provide simple and intuitive interfaces to I2C devices.
# [ 24 ] Adafruit-L3GD20 arduino, atmelavr "Adafruit Industries": Driver for Adafruit's L3GD20 I2C Gyroscope Breakout
# [ 10 ] I2Cdevlib-AK8975 arduino, atmelavr "Jeff Rowberg": AK8975 is 3-axis electronic compass IC with high sensitive Hall sensor technology
# [ 14 ] Adafruit-9DOF-Unified arduino, atmelavr "Adafruit Industries": Unified sensor driver for the Adafruit 9DOF Breakout (L3GD20 / LSM303)
# ...
4. Search for `libraries by "web" and "http" keywords <http://platformio.org/#!/lib/search?query=keyword%253A%2522web%2522%2520keyword%253A%2522http%2522>`_.
.. code-block:: bash
$ platformio lib search --keyword="web" --keyword="http"
# Found N libraries:
#
# [ ID ] Name Compatibility "Authors": Description
# -------------------------------------------------------------------------------------
# [ 5 ] Webduino arduino, atmelavr "Ben Combee": An extensible web server library (for use with the Arduino WizNet Ethernet Shield)
# [ 17 ] Adafruit-CC3000 arduino, atmelavr "Adafruit Industries": Library code for Adafruit's CC3000 Wi-Fi/WiFi breakouts
# ...
5. Search for `libraries by "Adafruit Industries" author <http://platformio.org/#!/lib/search?query=author%253A%2522Adafruit%20Industries%2522>`_
.. code-block:: bash
$ platformio lib search --author="Adafruit Industries"
# Found N libraries:
#
# [ ID ] Name Compatibility "Authors": Description
# -------------------------------------------------------------------------------------
# [ 14 ] Adafruit-9DOF-Unified arduino, atmelavr "Adafruit Industries": Unified sensor driver for the Adafruit 9DOF Breakout (L3GD20 / LSM303)
# [ 13 ] Adafruit-GFX arduino, atmelavr "Adafruit Industries": A core graphics library for all our displays, providing a common set of graphics primitives (points, lines, circles, etc.)
# [ 23 ] Adafruit-L3GD20-Unified arduino, atmelavr "Adafruit Industries": Unified sensor driver for the L3GD20 Gyroscope
# [ 26 ] Adafruit-LSM303DLHC-Unified arduino, atmelavr "Adafruit Industries": Unified sensor driver for Adafruit's LSM303 Breakout (Accelerometer + Magnetometer)
# ...
6. Search for `libraries which are compatible with Dallas temperature sensors <http://platformio.org/#!/lib/search?query=DS*>`_
like DS18B20, DS18S20 and etc.
.. code-block:: bash
$ platformio lib search "DS*"
# Found N libraries:
#
# [ ID ] Name Compatibility "Authors": Description
# -------------------------------------------------------------------------------------
# [ 1 ] OneWire arduino, atmelavr "Paul Stoffregen": Control devices (from Dallas Semiconductor) that use the One Wire protocol (DS18S20, DS18B20, DS2408 and etc)
# ...
7. Search for `Energia-based *nRF24* or *HttpClient* libraries <http://platformio.org/#!/lib/search?query=framework%253Aenergia%2520%252B(nRF24%2520HttpClient)>`_.
The search query that is described below can be interpreted like
``energia nRF24 OR energia HttpClient``
.. code-block:: bash
$ platformio lib search "+(nRF24 HttpClient)" --framework="energia"
# Found 2 libraries:
#
# [ ID ] Name Compatibility "Authors": Description
# -------------------------------------------------------------------------------------
# [ 46 ] HttpClient energia, timsp430, titiva "Zack Lalanne": HttpClient is a library to make it easier to interact with web servers
# [ 43 ] nRF24 energia, timsp430 "Eric": The nRF24L01 is a low-cost 2.4GHz ISM transceiver module. It supports a number of channel frequencies in the 2.4GHz band and a range of data rates.
8. Search for the `all sensor libraries excluding temperature <http://platformio.org/#!/lib/search?query=sensor%2520-temperature>`_.
.. code-block:: bash
$ platformio lib search "sensor -temperature"
# Found N libraries:
#
# [ ID ] Name Compatibility "Authors": Description
# -------------------------------------------------------------------------------------
# [ 31 ] Adafruit-Unified-Sensor arduino, atmelavr "Adafruit Industries": Adafruit Unified Sensor Driver
# [ 10 ] I2Cdevlib-AK8975 arduino, atmelavr "Jeff Rowberg": AK8975 is 3-axis electronic compass IC with high sensitive Hall sensor technology
# [ 14 ] Adafruit-9DOF-Unified arduino, atmelavr "Adafruit Industries": Unified sensor driver for the Adafruit 9DOF Breakout (L3GD20 / LSM303)
# [ 23 ] Adafruit-L3GD20-Unified arduino, atmelavr "Adafruit Industries": Unified sensor driver for the L3GD20 Gyroscope
# [ 26 ] Adafruit-LSM303DLHC-Unified arduino, atmelavr "Adafruit Industries": Unified sensor driver for Adafruit's LSM303 Breakout (Accelerometer + Magnetometer)
# [ 33 ] Adafruit-TMP006 arduino, atmelavr "Adafruit Industries": A library for the Adafruit TMP006 Infrared Thermopile Sensor
# [ 34 ] Adafruit-TSL2561-Unified arduino, atmelavr "Adafruit Industries": Unified light sensor driver for Adafruit's TSL2561 breakouts
# [ 97 ] I2Cdevlib-BMA150 arduino, atmelavr "Jeff Rowberg": The BMA150 is a triaxial, low-g acceleration sensor IC with digital output for consumer market applications
# [ 106 ] I2Cdevlib-MPR121 arduino, atmelavr "Jeff Rowberg": The MPR121 is a 12-bit proximity capacitive touch sensor
# [ 111 ] I2Cdevlib-AK8975 energia, timsp430 "Jeff Rowberg": AK8975 is 3-axis electronic compass IC with high sensitive Hall sensor technology
# Show next libraries? [y/N]:

View File

@ -0,0 +1,37 @@
.. _cmd_lib_show:
platformio lib show
===================
.. contents::
Usage
-----
.. code-block:: bash
platformio lib show ID
Description
-----------
Show details about the installed library
Examples
--------
.. code-block:: bash
# OneWire: http://platformio.org/#!/lib/show/1/OneWire
$ platformio lib show 1
# OneWire
# -------
# Authors: Paul Stoffregen <paul@pjrc.com> http://www.pjrc.com/teensy/td_libs_OneWire.html (maintainer), Jim Studt, Jason Dangel <dangel.jason@gmail.com>, Derek Yerger, Tom Pollard <pollard@alum.mit.edu>, Robin James
# Keywords: onewire, 1-wire, bus, sensor, temperature, ibutton
# Frameworks: arduino
# Platforms: atmelavr
# Version: 2.2
#
# Control devices (from Dallas Semiconductor) that use the One Wire protocol (DS18S20, DS18B20, DS2408 and etc)

View File

@ -0,0 +1,29 @@
.. _cmd_lib_uninstall:
platformio lib uninstall
========================
.. contents::
Usage
-----
.. code-block:: bash
platformio lib uninstall ID
Description
-----------
Uninstall specified library
Examples
--------
.. code-block:: bash
# XBee: http://platformio.org/#!/lib/show/6/XBee
$ platformio lib uninstall 6
# The library #6 'XBee' has been successfully uninstalled!

View File

@ -0,0 +1,43 @@
.. _cmd_lib_update:
platformio lib update
=====================
.. contents::
Usage
-----
.. code-block:: bash
platformio lib update
Description
-----------
Check or update installed libraries
Examples
--------
.. code-block:: bash
$ platformio lib update
# Updating [ 23 ] Adafruit-L3GD20-Unified library:
# Versions: Current=63de2eb9ea, Latest=63de2eb9ea [Up-to-date]
# Updating [ 12 ] Adafruit-ST7735 library:
# Versions: Current=e880eb1687, Latest=e880eb1687 [Up-to-date]
# Updating [ 31 ] Adafruit-Unified-Sensor library:
# Versions: Current=88ae805bce, Latest=88ae805bce [Up-to-date]
# Updating [ 26 ] Adafruit-LSM303DLHC-Unified library:
# Versions: Current=59767208a8, Latest=59767208a8 [Up-to-date]
# Updating [ 13 ] Adafruit-GFX library:
# Versions: Current=a9e5bc4707, Latest=a9e5bc4707 [Up-to-date]
# Updating [ 1 ] OneWire library:
# Versions: Current=2.2, Latest=2.2 [Up-to-date]
# Updating [ 4 ] IRremote library:
# Versions: Current=f2dafe5030, Latest=f2dafe5030 [Up-to-date]
# Updating [ 14 ] Adafruit-9DOF-Unified library:
# Versions: Current=b2f07242ac, Latest=b2f07242ac [Up-to-date]

View File

@ -0,0 +1,23 @@
.. _userguide_lib:
Library Manager
===============
To print all available commands and options use:
.. code-block:: bash
$ platformio lib --help
$ platformio lib COMMAND --help
.. toctree::
:maxdepth: 2
cmd_install
cmd_list
cmd_register
cmd_search
cmd_show
cmd_uninstall
cmd_update

View File

@ -1,22 +0,0 @@
Arduino Example: Build \*.ino file with external Adafruit library
=================================================================
1. Download ``platformio``
`sources <https://github.com/ivankravets/platformio/archive/develop.zip>`_
2. Extract ZIP archive
3. Then run these commands:
.. code-block:: bash
# Change directory to example
$ cd platformio-develop/examples/arduino-adafruit-library/
# Install Atmel AVR development platform with Arduino Framework
$ platformio install atmelavr
# Process example project
$ platformio run
# Upload firmware
$ platformio run -t upload

View File

@ -1,179 +0,0 @@
/**************************************************************************/
/*!
@file Adafruit_CC3000.h
@author KTOWN (Kevin Townsend for Adafruit Industries)
@license BSD (see license.txt)
This is a library for the Adafruit CC3000 WiFi breakout board
This library works with the Adafruit CC3000 breakout
----> https://www.adafruit.com/products/1469
Check out the links above for our tutorials and wiring diagrams
These chips use SPI to communicate.
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
*/
/**************************************************************************/
#ifndef ADAFRUIT_CC3000_H
#define ADAFRUIT_CC3000_H
#if ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
#include "utility/cc3000_common.h"
#include "utility/wlan.h"
#include "utility/netapp.h"
#include "ccspi.h"
#if defined(__arm__) && defined(__SAM3X8E__) // Arduino Due
#define SPI_CLOCK_DIVIDER 6 // used to set the speed for the SPI bus; 6 == 14 Mhz on the Arduino Due
#else
#define SPI_CLOCK_DIVIDER SPI_CLOCK_DIV2 // Don't set this to a slower speed (i.e. larger div value)
// or communication will be flakey on 16mhz chips!
#endif
//#define ENABLE_CC3K_PRINTER
#ifdef ENABLE_CC3K_PRINTER
#define CHECK_PRINTER if(CC3KPrinter != 0)
#else
#define CHECK_PRINTER if(false)
#endif
#define WLAN_CONNECT_TIMEOUT 10000 // how long to wait, in milliseconds
#define RXBUFFERSIZE 64 // how much to buffer on the incoming side
#define TXBUFFERSIZE 32 // how much to buffer on the outgoing side
#define WIFI_ENABLE 1
#define WIFI_DISABLE 0
#define WIFI_STATUS_CONNECTED 1
typedef struct Result_Struct
{
uint32_t num_networks;
uint32_t scan_status;
uint8_t rssiByte;
uint8_t Sec_ssidLen;
uint16_t time;
uint8_t ssid_name[32];
uint8_t bssid[6];
} ResultStruct_t; /**!ResultStruct_t : data struct to store SSID scan results */
/* Enum for wlan_ioctl_statusget results */
typedef enum
{
STATUS_DISCONNECTED = 0,
STATUS_SCANNING = 1,
STATUS_CONNECTING = 2,
STATUS_CONNECTED = 3
} status_t;
class Adafruit_CC3000;
class Adafruit_CC3000_Client : public Print {
public:
Adafruit_CC3000_Client(uint16_t s);
Adafruit_CC3000_Client(void);
Adafruit_CC3000_Client(const Adafruit_CC3000_Client& copy);
void operator=(const Adafruit_CC3000_Client& other);
// NOTE: If public functions below are added/modified/removed please make sure to update the
// Adafruit_CC3000_ClientRef class to match!
bool connected(void);
size_t write(uint8_t c);
size_t fastrprint(const char *str);
size_t fastrprintln(const char *str);
size_t fastrprint(char *str);
size_t fastrprintln(char *str);
size_t fastrprint(const __FlashStringHelper *ifsh);
size_t fastrprintln(const __FlashStringHelper *ifsh);
int16_t write(const void *buf, uint16_t len, uint32_t flags = 0);
int16_t read(void *buf, uint16_t len, uint32_t flags = 0);
uint8_t read(void);
int32_t close(void);
uint8_t available(void);
uint8_t _rx_buf[RXBUFFERSIZE], _rx_buf_idx;
int16_t bufsiz;
private:
int16_t _socket;
};
// Ugly but necessary to include the server header after the client is fully defined.
// A forward reference in the server header won't cut it because the server needs to contain
// instances of the client. The client definition above can be pulled into a separate
// header in a later change to make this cleaner.
#include "Adafruit_CC3000_Server.h"
class Adafruit_CC3000 {
public:
Adafruit_CC3000(uint8_t csPin, uint8_t irqPin, uint8_t vbatPin, uint8_t spispeed = SPI_CLOCK_DIVIDER);
bool begin(uint8_t patchReq = 0, bool useSmartConfigData = false, const char *_deviceName = NULL);
void reboot(uint8_t patchReq = 0);
void stop(void);
bool disconnect(void);
bool deleteProfiles(void);
void printHex(const byte * data, const uint32_t numBytes);
void printHexChar(const byte * data, const uint32_t numBytes);
void printIPdots(uint32_t ip);
void printIPdotsRev(uint32_t ip);
uint32_t IP2U32(uint8_t a, uint8_t b, uint8_t c, uint8_t d);
bool getMacAddress(uint8_t address[6]);
bool setMacAddress(uint8_t address[6]);
bool setStaticIPAddress(uint32_t ip, uint32_t subnetMask, uint32_t defaultGateway, uint32_t dnsServer);
bool setDHCP();
bool connectToAP(const char *ssid, const char *key, uint8_t secmode, uint8_t attempts = 0);
bool connectSecure(const char *ssid, const char *key, int32_t secMode);
bool connectOpen(const char *ssid);
bool checkConnected(void);
bool checkDHCP(void);
bool getIPAddress(uint32_t *retip, uint32_t *netmask, uint32_t *gateway, uint32_t *dhcpserv, uint32_t *dnsserv);
bool checkSmartConfigFinished(void);
Adafruit_CC3000_Client connectTCP(uint32_t destIP, uint16_t destPort);
Adafruit_CC3000_Client connectUDP(uint32_t destIP, uint16_t destPort);
#ifndef CC3000_TINY_DRIVER
bool getFirmwareVersion(uint8_t *major, uint8_t *minor);
status_t getStatus(void);
uint16_t startSSIDscan(void);
void stopSSIDscan();
uint8_t getNextSSID(uint8_t *rssi, uint8_t *secMode, char *ssidname);
bool listSSIDResults(void);
bool startSmartConfig(const char *_deviceName = NULL, const char *smartConfigKey = NULL);
bool getIPConfig(tNetappIpconfigRetArgs *ipConfig);
uint16_t ping(uint32_t ip, uint8_t attempts=3, uint16_t timeout=500, uint8_t size=32);
uint16_t getHostByName(char *hostname, uint32_t *ip);
#endif
/* Functions that aren't available with the tiny driver */
#ifndef CC3000_TINY_DRIVER
bool scanSSIDs(uint32_t time);
#endif
void setPrinter(Print*);
private:
bool _initialised;
};
extern Print* CC3KPrinter;
#endif

View File

@ -1,221 +0,0 @@
/**************************************************************************/
/*!
@file Adafruit_CC3000_Server.cpp
@author Tony DiCola (tony@tonydicola.com)
@license BSD (see license.txt)
Adafruit CC3000 TCP server implementation based on the same interface as
the Arduino Ethernet library server class.
See http://arduino.cc/en/Reference/Ethernet for documentation on the
Arduino Ethernet library and its server interface.
*/
/**************************************************************************/
#include "Adafruit_CC3000_Server.h"
#include "utility/socket.h"
#define CC3K_PRINTLN_F(text) CHECK_PRINTER { if(CC3KPrinter != NULL) { CC3KPrinter->println(F(text)); } }
#define HANDLE_NULL(client, value) { if (client == NULL) return value; }
/**************************************************************************/
/*
Adafruit_CC3000_ClientRef implementation
*/
/**************************************************************************/
Adafruit_CC3000_ClientRef::Adafruit_CC3000_ClientRef(Adafruit_CC3000_Client* client)
: _client(client)
{ }
// Return true if the referenced client is connected. This is provided for
// compatibility with Ethernet library code.
Adafruit_CC3000_ClientRef::operator bool() {
return connected();
}
// Below are wrappers around the public client functions. These hide the fact that users
// are dealing with a reference to a client instance and allow code to be written using
// value semantics like in the Ethernet library.
bool Adafruit_CC3000_ClientRef::connected(void) {
HANDLE_NULL(_client, false);
return _client->connected();
}
size_t Adafruit_CC3000_ClientRef::write(uint8_t c) {
HANDLE_NULL(_client, 0);
return _client->write(c);
}
size_t Adafruit_CC3000_ClientRef::fastrprint(const char *str) {
HANDLE_NULL(_client, 0);
return _client->fastrprint(str);
}
size_t Adafruit_CC3000_ClientRef::fastrprintln(const char *str) {
HANDLE_NULL(_client, 0);
return _client->fastrprintln(str);
}
size_t Adafruit_CC3000_ClientRef::fastrprint(char *str) {
HANDLE_NULL(_client, 0);
return _client->fastrprint(str);
}
size_t Adafruit_CC3000_ClientRef::fastrprintln(char *str) {
HANDLE_NULL(_client, 0);
return _client->fastrprintln(str);
}
size_t Adafruit_CC3000_ClientRef::fastrprint(const __FlashStringHelper *ifsh) {
HANDLE_NULL(_client, 0);
return _client->fastrprint(ifsh);
}
size_t Adafruit_CC3000_ClientRef::fastrprintln(const __FlashStringHelper *ifsh) {
HANDLE_NULL(_client, 0);
return _client->fastrprintln(ifsh);
}
int16_t Adafruit_CC3000_ClientRef::write(const void *buf, uint16_t len, uint32_t flags) {
HANDLE_NULL(_client, 0);
return _client->write(buf, len, flags);
}
int16_t Adafruit_CC3000_ClientRef::read(void *buf, uint16_t len, uint32_t flags) {
HANDLE_NULL(_client, 0);
return _client->read(buf, len, flags);
}
uint8_t Adafruit_CC3000_ClientRef::read(void) {
HANDLE_NULL(_client, 0);
return _client->read();
}
int32_t Adafruit_CC3000_ClientRef::close(void) {
HANDLE_NULL(_client, 0);
return _client->close();
}
uint8_t Adafruit_CC3000_ClientRef::available(void) {
HANDLE_NULL(_client, 0);
return _client->available();
}
/**************************************************************************/
/*
Adafruit_CC3000_Server implementation
*/
/**************************************************************************/
// Construct a TCP server to listen on the specified port.
Adafruit_CC3000_Server::Adafruit_CC3000_Server(uint16_t port)
: _port(port)
, _listenSocket(-1)
{ }
// Return a reference to a client instance which has data available to read.
Adafruit_CC3000_ClientRef Adafruit_CC3000_Server::available() {
acceptNewConnections();
// Find the first client which is ready to read and return it.
for (int i = 0; i < MAX_SERVER_CLIENTS; ++i) {
if (_clients[i].connected() && _clients[i].available() > 0) {
return Adafruit_CC3000_ClientRef(&_clients[i]);
}
}
// Couldn't find a client ready to read, so return a client that is not
// connected to signal no clients are available for reading (convention
// used by the Ethernet library).
return Adafruit_CC3000_ClientRef(NULL);
}
// Initialize the server and start listening for connections.
void Adafruit_CC3000_Server::begin() {
// Set the CC3000 inactivity timeout to 0 (never timeout). This will ensure
// the CC3000 does not close the listening socket when it's idle for more than
// 60 seconds (the default timeout). See more information from:
// http://e2e.ti.com/support/low_power_rf/f/851/t/292664.aspx
unsigned long aucDHCP = 14400;
unsigned long aucARP = 3600;
unsigned long aucKeepalive = 30;
unsigned long aucInactivity = 0;
cc3k_int_poll();
if (netapp_timeout_values(&aucDHCP, &aucARP, &aucKeepalive, &aucInactivity) != 0) {
CC3K_PRINTLN_F("Error setting inactivity timeout!");
return;
}
// Create a TCP socket
cc3k_int_poll();
int16_t soc = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (soc < 0) {
CC3K_PRINTLN_F("Couldn't create listening socket!");
return;
}
// Set the socket's accept call as non-blocking.
cc3k_int_poll();
char arg = SOCK_ON; // nsd: looked in TI example code and they pass this as a 'short' in one example, and 'char' in two others. 'char' seems as likely work, and has no endianess issue
if (setsockopt(soc, SOL_SOCKET, SOCKOPT_ACCEPT_NONBLOCK, &arg, sizeof(arg)) < 0) {
CC3K_PRINTLN_F("Couldn't set socket as non-blocking!");
return;
}
// Bind the socket to a TCP address.
sockaddr_in address;
address.sin_family = AF_INET;
address.sin_addr.s_addr = htonl(0); // Listen on any network interface, equivalent to INADDR_ANY in sockets programming.
address.sin_port = htons(_port); // Listen on the specified port.
cc3k_int_poll();
if (bind(soc, (sockaddr*) &address, sizeof(address)) < 0) {
CC3K_PRINTLN_F("Error binding listen socket to address!");
return;
}
// Start listening for connections.
// The backlog parameter is 0 as it is not supported on TI's CC3000 firmware.
cc3k_int_poll();
if (listen(soc, 0) < 0) {
CC3K_PRINTLN_F("Error opening socket for listening!");
return;
}
_listenSocket = soc;
}
// Write data to all connected clients. Buffer is a pointer to an array
// of bytes, and size specifies how many bytes to write from the buffer.
// Return the sum of bytes written to all clients.
size_t Adafruit_CC3000_Server::write(const uint8_t *buffer, size_t size) {
size_t written = 0;
for (int i = 0; i < MAX_SERVER_CLIENTS; ++i) {
if (_clients[i].connected()) {
written += _clients[i].write(buffer, size);
}
}
return written;
}
// Write a byte value to all connected clients.
// Return the sum of bytes written to all clients.
size_t Adafruit_CC3000_Server::write(uint8_t value) {
return write(&value, 1);
}
// Accept new connections and update the connected clients.
void Adafruit_CC3000_Server::acceptNewConnections() {
// For any unconnected client, see if new connections are pending and accept
// them as a new client.
for (int i = 0; i < MAX_SERVER_CLIENTS; ++i) {
if (!_clients[i].connected()) {
// Note: Because the non-blocking option was set for the listening
// socket this call will not block and instead return SOC_IN_PROGRESS (-2)
// if there are no pending client connections. Also, the address of the
// connected client is not needed, so those parameters are set to NULL.
cc3k_int_poll();
int soc = accept(_listenSocket, NULL, NULL);
if (soc > -1) {
_clients[i] = Adafruit_CC3000_Client(soc);
}
// else either there were no sockets to accept or an error occured.
}
}
}

View File

@ -1,100 +0,0 @@
/**************************************************************************/
/*!
@file Adafruit_CC3000_Server.h
@author Tony DiCola (tony@tonydicola.com)
@license BSD (see license.txt)
Adafruit CC3000 TCP server implementation based on the same interface as
the Arduino Ethernet library server class.
See http://arduino.cc/en/Reference/Ethernet for documentation on the
Arduino Ethernet library and its server interface.
The only difference between this implementation and the Ethernet library
is that a special client reference facade is returned by the available()
function, instead of a copy of a client like in the Ethernet library. This
is necessary to ensure the buffers that client instances contain aren't
copied and get out of sync.
*/
/**************************************************************************/
#ifndef ADAFRUIT_CC3000_SERVER_H
#define ADAFRUIT_CC3000_SERVER_H
#include "Adafruit_CC3000.h"
#include "Print.h"
#include "Server.h"
// Assume 4 sockets available, 1 of which is used for listening, so at most 3
// clients can be connected at once.
#define MAX_SERVER_CLIENTS 3
// Facade that wraps a reference to a client instance into something that looks
// and acts like a client instance value. This is done to mimic the semantics
// of the Ethernet library, without running into problems allowing client buffers
// to be copied and get out of sync.
class Adafruit_CC3000_ClientRef : public Print {
public:
Adafruit_CC3000_ClientRef(Adafruit_CC3000_Client* client);
// Return true if the referenced client is connected. This is provided for
// compatibility with Ethernet library code.
operator bool();
// Below are all the public methods of the client class:
bool connected(void);
size_t write(uint8_t c);
size_t fastrprint(const char *str);
size_t fastrprintln(const char *str);
size_t fastrprint(char *str);
size_t fastrprintln(char *str);
size_t fastrprint(const __FlashStringHelper *ifsh);
size_t fastrprintln(const __FlashStringHelper *ifsh);
int16_t write(const void *buf, uint16_t len, uint32_t flags = 0);
int16_t read(void *buf, uint16_t len, uint32_t flags = 0);
uint8_t read(void);
int32_t close(void);
uint8_t available(void);
private:
// Hide the fact that users are really dealing with a pointer to a client
// instance. Note: this class does not own the contents of the client
// pointer and should NEVER attempt to free/delete this pointer.
Adafruit_CC3000_Client* _client;
};
class Adafruit_CC3000_Server : public Server {
public:
// Construct a TCP server to listen on the specified port.
Adafruit_CC3000_Server(uint16_t port);
// Return a reference to a client instance which has data available to read.
Adafruit_CC3000_ClientRef available();
// Initialize the server and start listening for connections.
virtual void begin();
// Write data to all connected clients. Buffer is a pointer to an array
// of bytes, and size specifies how many bytes to write from the buffer.
// Return the sum of bytes written to all clients.
virtual size_t write(const uint8_t *buffer, size_t size);
// Write a byte value to all connected clients.
// Return the sum of bytes written to all clients.
virtual size_t write(uint8_t value);
// Make the overloads of write from the Print base class available.
using Print::write;
private:
// Store the clients in a simple array.
Adafruit_CC3000_Client _clients[MAX_SERVER_CLIENTS];
// The port this server will listen for connections on.
uint16_t _port;
// The id of the listening socket.
uint16_t _listenSocket;
// Accept new connections and update the connected clients.
void acceptNewConnections();
};
#endif

View File

@ -1,24 +0,0 @@
This is a library for the Adafruit CC3000 WiFi Breakouts etc
Designed specifically to work with the Adafruit CC3000 Breakout
----> https://www.adafruit.com/products/1469
These modules use SPI to communicate, 6 pins are required to interface
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
Check out the links above for our tutorials and wiring diagrams
Arduino library Written by Limor Fried & Kevin Townsend for Adafruit Industries.
CC3000 host core written by TI
To download. click the DOWNLOADS button in the top right corner, rename the uncompressed folder Adafruit_CC3000
Check that the Adafruit_CC3000 folder contains Adafruit_CC3000.cpp and Adafruit_CC3000.h
Place the Adafruit_CC3000 library folder your *arduinosketchfolder*/libraries/ folder.
You may need to create the libraries subfolder if its your first library. Restart the IDE.
NOTE: the 'SendTweet' example currently DOES NOT WORK due to Twitter API changes. The code is being kept for posterity in case a workaround can be developed.

View File

@ -1,769 +0,0 @@
/*****************************************************************************
*
* spi.c - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
*
* Adapted for use with the Arduino/AVR by KTOWN (Kevin Townsend)
* & Limor Fried for Adafruit Industries
* This library works with the Adafruit CC3000 breakout
* ----> https://www.adafruit.com/products/1469
* Adafruit invests time and resources providing this open source code,
* please support Adafruit and open-source hardware by purchasing
* products from Adafruit!
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the
* distribution.
*
* Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*****************************************************************************/
#include <Arduino.h>
#include "ccspi.h"
#include "utility/hci.h"
#include "utility/netapp.h"
#include "utility/evnt_handler.h"
#include "utility/cc3000_common.h"
#include "utility/debug.h"
extern uint8_t g_csPin, g_irqPin, g_vbatPin, g_IRQnum, g_SPIspeed;
#define READ (3)
#define WRITE (1)
#define HI(value) (((value) & 0xFF00) >> 8)
#define LO(value) ((value) & 0x00FF)
#define HEADERS_SIZE_EVNT (SPI_HEADER_SIZE + 5)
#define SPI_HEADER_SIZE (5)
#define eSPI_STATE_POWERUP (0)
#define eSPI_STATE_INITIALIZED (1)
#define eSPI_STATE_IDLE (2)
#define eSPI_STATE_WRITE_IRQ (3)
#define eSPI_STATE_WRITE_FIRST_PORTION (4)
#define eSPI_STATE_WRITE_EOT (5)
#define eSPI_STATE_READ_IRQ (6)
#define eSPI_STATE_READ_FIRST_PORTION (7)
#define eSPI_STATE_READ_EOT (8)
/*
these variables store the SPI configuration
so they can be modified and restored
this is so that we can have multiple SPI devices
on the same bus, so they can operate at different speeds
and in different modes
*/
#if defined(SPI2X) && defined(__AVR__) // most likely AVR8
uint8_t ccspi_mySPCR, ccspi_mySPSR, ccspi_oldSPSR, ccspi_oldSPCR;
#define SpiConfigStoreOld() { \
ccspi_oldSPCR = SPCR; \
ccspi_oldSPSR = SPSR & _BV(SPI2X); }
#define SpiConfigStoreMy() { \
ccspi_mySPCR = SPCR; \
ccspi_mySPSR = SPSR & _BV(SPI2X); }
#define SpiConfigPush() { \
ccspi_oldSPCR = SPCR; \
ccspi_oldSPSR = SPSR & _BV(SPI2X); \
SPCR = ccspi_mySPCR; \
if(ccspi_mySPSR) SPSR |= _BV(SPI2X); \
else SPSR &= ~_BV(SPI2X); }
#define SpiConfigPop() { \
SPCR = ccspi_oldSPCR; \
if(ccspi_oldSPSR) SPSR |= _BV(SPI2X); \
else SPSR &= ~_BV(SPI2X); }
#elif defined(__AVR_XMEGA__) // most likely XMEGA
uint8_t ccspi_mySPICTRL, ccspi_oldSPICTRL;
#define SpiConfigStoreOld() do { ccspi_oldSPICTRL = SPCR; } while (0)
#define SpiConfigStoreMy() do { ccspi_mySPICTRL = SPCR; } while (0)
#define SpiConfigPush() do { ccspi_oldSPICTRL = SPCR; SPCR = ccspi_mySPICTRL; } while (0)
#define SpiConfigPop() do { SPCR = ccspi_oldSPICTRL; } while (0)
#else
// TODO: ARM (Due, Teensy 3.0, etc)
// #error platform not yet supported by Adafruit_CC3000
#define SpiConfigStoreOld() do { } while (0)
#define SpiConfigStoreMy() do { } while (0)
#define SpiConfigPush() do { } while (0)
#define SpiConfigPop() do { } while (0)
#endif
#ifdef SPI_HAS_TRANSACTION
// CC3000 SPI config + begin SPI usage + chip select
#define CC3000_ASSERT_CS { \
SpiConfigPush(); \
SPI.beginTransaction(SPISettings(16000000, MSBFIRST, SPI_MODE1)); \
digitalWrite(g_csPin, LOW); }
// CC3000 chip deselect + end SPI usage + SPI restore
#define CC3000_DEASSERT_CS { \
digitalWrite(g_csPin, HIGH); \
SPI.endTransaction(); \
SpiConfigPop(); }
#else
// CC3000 chip select + SPI config
#define CC3000_ASSERT_CS { \
digitalWrite(g_csPin, LOW); \
SpiConfigPush(); }
// CC3000 chip deselect + SPI restore
#define CC3000_DEASSERT_CS { \
digitalWrite(g_csPin, HIGH); \
SpiConfigPop(); }
#endif
/* smartconfig flags (defined in Adafruit_CC3000.cpp) */
// extern unsigned long ulSmartConfigFinished, ulCC3000DHCP;
typedef struct
{
gcSpiHandleRx SPIRxHandler;
unsigned short usTxPacketLength;
unsigned short usRxPacketLength;
unsigned long ulSpiState;
unsigned char *pTxPacket;
unsigned char *pRxPacket;
} tSpiInformation;
tSpiInformation sSpiInformation;
/* Static buffer for 5 bytes of SPI HEADER */
unsigned char tSpiReadHeader[] = {READ, 0, 0, 0, 0};
void SpiWriteDataSynchronous(unsigned char *data, unsigned short size);
void SpiWriteAsync(const unsigned char *data, unsigned short size);
void SpiPauseSpi(void);
void SpiResumeSpi(void);
void SSIContReadOperation(void);
void cc3k_int_poll(void);
// The magic number that resides at the end of the TX/RX buffer (1 byte after the allocated size)
// for the purpose of detection of the overrun. The location of the memory where the magic number
// resides shall never be written. In case it is written - the overrun occured and either recevie function
// or send function will stuck forever.
#define CC3000_BUFFER_MAGIC_NUMBER (0xDE)
char spi_buffer[CC3000_RX_BUFFER_SIZE];
unsigned char wlan_tx_buffer[CC3000_TX_BUFFER_SIZE];
static volatile char ccspi_is_in_irq = 0;
static volatile char ccspi_int_enabled = 0;
/* Mandatory functions are:
- SpiOpen
- SpiWrite
- SpiRead
- SpiClose
- SpiResumeSpi
- ReadWlanInterruptPin
- WlanInterruptEnable
- WlanInterruptDisable
- WriteWlanPin
*/
/**************************************************************************/
/*!
*/
/**************************************************************************/
void SpiClose(void)
{
DEBUGPRINT_F("\tCC3000: SpiClose");
if (sSpiInformation.pRxPacket)
{
sSpiInformation.pRxPacket = 0;
}
/* Disable Interrupt in GPIOA module... */
tSLInformation.WlanInterruptDisable();
}
/**************************************************************************/
/*!
*/
/**************************************************************************/
void SpiOpen(gcSpiHandleRx pfRxHandler)
{
DEBUGPRINT_F("\tCC3000: SpiOpen");
sSpiInformation.ulSpiState = eSPI_STATE_POWERUP;
memset(spi_buffer, 0, sizeof(spi_buffer));
memset(wlan_tx_buffer, 0, sizeof(spi_buffer));
sSpiInformation.SPIRxHandler = pfRxHandler;
sSpiInformation.usTxPacketLength = 0;
sSpiInformation.pTxPacket = NULL;
sSpiInformation.pRxPacket = (unsigned char *)spi_buffer;
sSpiInformation.usRxPacketLength = 0;
spi_buffer[CC3000_RX_BUFFER_SIZE - 1] = CC3000_BUFFER_MAGIC_NUMBER;
wlan_tx_buffer[CC3000_TX_BUFFER_SIZE - 1] = CC3000_BUFFER_MAGIC_NUMBER;
/* Enable interrupt on the GPIO pin of WLAN IRQ */
tSLInformation.WlanInterruptEnable();
DEBUGPRINT_F("\tCC3000: Finished SpiOpen\n\r");
}
/**************************************************************************/
/*!
*/
/**************************************************************************/
int init_spi(void)
{
DEBUGPRINT_F("\tCC3000: init_spi\n\r");
/* Set POWER_EN pin to output and disable the CC3000 by default */
pinMode(g_vbatPin, OUTPUT);
digitalWrite(g_vbatPin, 0);
delay(500);
/* Set CS pin to output (don't de-assert yet) */
pinMode(g_csPin, OUTPUT);
/* Set interrupt/gpio pin to input */
#if defined(INPUT_PULLUP)
pinMode(g_irqPin, INPUT_PULLUP);
#else
pinMode(g_irqPin, INPUT);
digitalWrite(g_irqPin, HIGH); // w/weak pullup
#endif
SpiConfigStoreOld(); // prime ccspi_old* values for DEASSERT
/* Initialise SPI (Mode 1) */
SPI.begin();
SPI.setDataMode(SPI_MODE1);
SPI.setBitOrder(MSBFIRST);
SPI.setClockDivider(g_SPIspeed);
SpiConfigStoreMy(); // prime ccspi_my* values for ASSERT
// Newly-initialized SPI is in the same state that ASSERT_CS will set it
// to. Invoke DEASSERT (which also restores SPI registers) so the next
// ASSERT call won't clobber the ccspi_old* values -- we need those!
#ifdef SPI_HAS_TRANSACTION
SPI.usingInterrupt(g_IRQnum);
digitalWrite(g_csPin, HIGH); // same as CC3000_DEASSERT_CS, but not
SpiConfigPop(); // SPI.endTransaction, because none began
#else
CC3000_DEASSERT_CS;
#endif
/* ToDo: Configure IRQ interrupt! */
DEBUGPRINT_F("\tCC3000: Finished init_spi\n\r");
return(ESUCCESS);
}
/**************************************************************************/
/*!
*/
/**************************************************************************/
long SpiFirstWrite(unsigned char *ucBuf, unsigned short usLength)
{
DEBUGPRINT_F("\tCC3000: SpiWriteFirst\n\r");
/* Workaround for the first transaction */
CC3000_ASSERT_CS;
/* delay (stay low) for ~50us */
delay(1);
/* SPI writes first 4 bytes of data */
SpiWriteDataSynchronous(ucBuf, 4);
delay(1);
SpiWriteDataSynchronous(ucBuf + 4, usLength - 4);
/* From this point on - operate in a regular manner */
sSpiInformation.ulSpiState = eSPI_STATE_IDLE;
CC3000_DEASSERT_CS;
return(0);
}
/**************************************************************************/
/*!
*/
/**************************************************************************/
long SpiWrite(unsigned char *pUserBuffer, unsigned short usLength)
{
unsigned char ucPad = 0;
DEBUGPRINT_F("\tCC3000: SpiWrite\n\r");
/* Figure out the total length of the packet in order to figure out if there is padding or not */
if(!(usLength & 0x0001))
{
ucPad++;
}
pUserBuffer[0] = WRITE;
pUserBuffer[1] = HI(usLength + ucPad);
pUserBuffer[2] = LO(usLength + ucPad);
pUserBuffer[3] = 0;
pUserBuffer[4] = 0;
usLength += (SPI_HEADER_SIZE + ucPad);
/* The magic number that resides at the end of the TX/RX buffer (1 byte after the allocated size)
* for the purpose of overrun detection. If the magic number is overwritten - buffer overrun
* occurred - and we will be stuck here forever! */
if (wlan_tx_buffer[CC3000_TX_BUFFER_SIZE - 1] != CC3000_BUFFER_MAGIC_NUMBER)
{
DEBUGPRINT_F("\tCC3000: Error - No magic number found in SpiWrite\n\r");
while (1);
}
if (sSpiInformation.ulSpiState == eSPI_STATE_POWERUP)
{
while (sSpiInformation.ulSpiState != eSPI_STATE_INITIALIZED);
}
if (sSpiInformation.ulSpiState == eSPI_STATE_INITIALIZED)
{
/* This is time for first TX/RX transactions over SPI: the IRQ is down - so need to send read buffer size command */
SpiFirstWrite(pUserBuffer, usLength);
}
else
{
/* We need to prevent here race that can occur in case two back to back packets are sent to the
* device, so the state will move to IDLE and once again to not IDLE due to IRQ */
tSLInformation.WlanInterruptDisable();
while (sSpiInformation.ulSpiState != eSPI_STATE_IDLE);
sSpiInformation.ulSpiState = eSPI_STATE_WRITE_IRQ;
sSpiInformation.pTxPacket = pUserBuffer;
sSpiInformation.usTxPacketLength = usLength;
/* Assert the CS line and wait till SSI IRQ line is active and then initialize write operation */
CC3000_ASSERT_CS;
/* Re-enable IRQ - if it was not disabled - this is not a problem... */
tSLInformation.WlanInterruptEnable();
/* Check for a missing interrupt between the CS assertion and enabling back the interrupts */
if (tSLInformation.ReadWlanInterruptPin() == 0)
{
SpiWriteDataSynchronous(sSpiInformation.pTxPacket, sSpiInformation.usTxPacketLength);
sSpiInformation.ulSpiState = eSPI_STATE_IDLE;
CC3000_DEASSERT_CS;
#ifdef SPI_HAS_TRANSACTION
WlanInterruptEnable();
#endif
}
}
/* Due to the fact that we are currently implementing a blocking situation
* here we will wait till end of transaction */
while (eSPI_STATE_IDLE != sSpiInformation.ulSpiState);
return(0);
}
/**************************************************************************/
/*!
*/
/**************************************************************************/
void SpiWriteDataSynchronous(unsigned char *data, unsigned short size)
{
DEBUGPRINT_F("\tCC3000: SpiWriteDataSynchronous Start\n\r");
unsigned short loc;
for (loc = 0; loc < size; loc ++)
{
SPI.transfer(data[loc]);
#if (DEBUG_MODE == 1)
if (!(loc==size-1))
{
DEBUGPRINT_F(" ");
DEBUGPRINT_HEX(data[loc]);
}
else
{
DEBUGPRINT_F(" ");
DEBUGPRINT_HEX(data[loc]);
}
#endif
}
DEBUGPRINT_F("\n\r\tCC3000: SpiWriteDataSynchronous End\n\r");
}
/**************************************************************************/
/*!
*/
/**************************************************************************/
void SpiReadDataSynchronous(unsigned char *data, unsigned short size)
{
unsigned short i = 0;
DEBUGPRINT_F("\tCC3000: SpiReadDataSynchronous\n\r");
SPI.setDataMode(SPI_MODE1);
for (i = 0; i < size; i ++)
{
data[i] = SPI.transfer(0x03);
DEBUGPRINT_F(" ");
DEBUGPRINT_HEX(data[i]);
}
DEBUGPRINT_F("\n\r");
}
/**************************************************************************/
/*!
*/
/**************************************************************************/
void SpiReadHeader(void)
{
DEBUGPRINT_F("\tCC3000: SpiReadHeader\n\r");
SpiReadDataSynchronous(sSpiInformation.pRxPacket, HEADERS_SIZE_EVNT);
}
/**************************************************************************/
/*!
*/
/**************************************************************************/
long SpiReadDataCont(void)
{
long data_to_recv;
unsigned char *evnt_buff, type;
DEBUGPRINT_F("\tCC3000: SpiReadDataCont\n\r");
/* Determine what type of packet we have */
evnt_buff = sSpiInformation.pRxPacket;
data_to_recv = 0;
STREAM_TO_UINT8((uint8_t *)(evnt_buff + SPI_HEADER_SIZE), HCI_PACKET_TYPE_OFFSET, type);
switch(type)
{
case HCI_TYPE_DATA:
{
/* We need to read the rest of data.. */
STREAM_TO_UINT16((char *)(evnt_buff + SPI_HEADER_SIZE), HCI_DATA_LENGTH_OFFSET, data_to_recv);
if (!((HEADERS_SIZE_EVNT + data_to_recv) & 1))
{
data_to_recv++;
}
if (data_to_recv)
{
SpiReadDataSynchronous(evnt_buff + HEADERS_SIZE_EVNT, data_to_recv);
}
break;
}
case HCI_TYPE_EVNT:
{
/* Calculate the rest length of the data */
STREAM_TO_UINT8((char *)(evnt_buff + SPI_HEADER_SIZE), HCI_EVENT_LENGTH_OFFSET, data_to_recv);
data_to_recv -= 1;
/* Add padding byte if needed */
if ((HEADERS_SIZE_EVNT + data_to_recv) & 1)
{
data_to_recv++;
}
if (data_to_recv)
{
SpiReadDataSynchronous(evnt_buff + HEADERS_SIZE_EVNT, data_to_recv);
}
sSpiInformation.ulSpiState = eSPI_STATE_READ_EOT;
break;
}
}
return (0);
}
/**************************************************************************/
/*!
*/
/**************************************************************************/
void SpiPauseSpi(void)
{
DEBUGPRINT_F("\tCC3000: SpiPauseSpi\n\r");
ccspi_int_enabled = 0;
detachInterrupt(g_IRQnum);
}
/**************************************************************************/
/*!
*/
/**************************************************************************/
void SpiResumeSpi(void)
{
DEBUGPRINT_F("\tCC3000: SpiResumeSpi\n\r");
ccspi_int_enabled = 1;
attachInterrupt(g_IRQnum, SPI_IRQ, FALLING);
}
/**************************************************************************/
/*!
*/
/**************************************************************************/
void SpiTriggerRxProcessing(void)
{
DEBUGPRINT_F("\tCC3000: SpiTriggerRxProcessing\n\r");
/* Trigger Rx processing */
SpiPauseSpi();
CC3000_DEASSERT_CS;
//DEBUGPRINT_F("Magic?\n\r");
/* The magic number that resides at the end of the TX/RX buffer (1 byte after the allocated size)
* for the purpose of detection of the overrun. If the magic number is overriten - buffer overrun
* occurred - and we will stuck here forever! */
if (sSpiInformation.pRxPacket[CC3000_RX_BUFFER_SIZE - 1] != CC3000_BUFFER_MAGIC_NUMBER)
{
/* You've got problems if you're here! */
DEBUGPRINT_F("\tCC3000: ERROR - magic number missing!\n\r");
while (1);
}
//DEBUGPRINT_F("OK!\n\r");
sSpiInformation.ulSpiState = eSPI_STATE_IDLE;
sSpiInformation.SPIRxHandler(sSpiInformation.pRxPacket + SPI_HEADER_SIZE);
}
/**************************************************************************/
/*!
*/
/**************************************************************************/
void SSIContReadOperation(void)
{
DEBUGPRINT_F("\tCC3000: SpiContReadOperation\n\r");
/* The header was read - continue with the payload read */
if (!SpiReadDataCont())
{
/* All the data was read - finalize handling by switching to teh task
* and calling from task Event Handler */
//DEBUGPRINT_F("SPItrig\n\r");
SpiTriggerRxProcessing();
}
}
/**************************************************************************/
/*!
*/
/**************************************************************************/
void WriteWlanPin( unsigned char val )
{
if (DEBUG_MODE)
{
DEBUGPRINT_F("\tCC3000: WriteWlanPin - ");
DEBUGPRINT_DEC(val);
DEBUGPRINT_F("\n\r");
delay(1);
}
if (val)
{
digitalWrite(g_vbatPin, HIGH);
}
else
{
digitalWrite(g_vbatPin, LOW);
}
}
/**************************************************************************/
/*!
*/
/**************************************************************************/
long ReadWlanInterruptPin(void)
{
DEBUGPRINT_F("\tCC3000: ReadWlanInterruptPin - ");
DEBUGPRINT_DEC(digitalRead(g_irqPin));
DEBUGPRINT_F("\n\r");
return(digitalRead(g_irqPin));
}
/**************************************************************************/
/*!
*/
/**************************************************************************/
void WlanInterruptEnable()
{
DEBUGPRINT_F("\tCC3000: WlanInterruptEnable.\n\r");
// delay(100);
ccspi_int_enabled = 1;
attachInterrupt(g_IRQnum, SPI_IRQ, FALLING);
}
/**************************************************************************/
/*!
*/
/**************************************************************************/
void WlanInterruptDisable()
{
DEBUGPRINT_F("\tCC3000: WlanInterruptDisable\n\r");
ccspi_int_enabled = 0;
detachInterrupt(g_IRQnum);
}
//*****************************************************************************
//
//! sendDriverPatch
//!
//! @param pointer to the length
//!
//! @return none
//!
//! @brief The function returns a pointer to the driver patch:
//! since there is no patch in the host - it returns 0
//
//*****************************************************************************
char *sendDriverPatch(unsigned long *Length) {
*Length = 0;
return NULL;
}
//*****************************************************************************
//
//! sendBootLoaderPatch
//!
//! @param pointer to the length
//!
//! @return none
//!
//! @brief The function returns a pointer to the boot loader patch:
//! since there is no patch in the host - it returns 0
//
//*****************************************************************************
char *sendBootLoaderPatch(unsigned long *Length) {
*Length = 0;
return NULL;
}
//*****************************************************************************
//
//! sendWLFWPatch
//!
//! @param pointer to the length
//!
//! @return none
//!
//! @brief The function returns a pointer to the FW patch:
//! since there is no patch in the host - it returns 0
//
//*****************************************************************************
char *sendWLFWPatch(unsigned long *Length) {
*Length = 0;
return NULL;
}
/**************************************************************************/
/*!
*/
/**************************************************************************/
void SPI_IRQ(void)
{
ccspi_is_in_irq = 1;
DEBUGPRINT_F("\tCC3000: Entering SPI_IRQ\n\r");
if (sSpiInformation.ulSpiState == eSPI_STATE_POWERUP)
{
/* IRQ line was low ... perform a callback on the HCI Layer */
sSpiInformation.ulSpiState = eSPI_STATE_INITIALIZED;
}
else if (sSpiInformation.ulSpiState == eSPI_STATE_IDLE)
{
//DEBUGPRINT_F("IDLE\n\r");
sSpiInformation.ulSpiState = eSPI_STATE_READ_IRQ;
/* IRQ line goes down - start reception */
CC3000_ASSERT_CS;
// Wait for TX/RX Compete which will come as DMA interrupt
SpiReadHeader();
sSpiInformation.ulSpiState = eSPI_STATE_READ_EOT;
//DEBUGPRINT_F("SSICont\n\r");
SSIContReadOperation();
}
else if (sSpiInformation.ulSpiState == eSPI_STATE_WRITE_IRQ)
{
SpiWriteDataSynchronous(sSpiInformation.pTxPacket, sSpiInformation.usTxPacketLength);
sSpiInformation.ulSpiState = eSPI_STATE_IDLE;
CC3000_DEASSERT_CS;
}
DEBUGPRINT_F("\tCC3000: Leaving SPI_IRQ\n\r");
ccspi_is_in_irq = 0;
return;
}
//*****************************************************************************
//
//! cc3k_int_poll
//!
//! \brief checks if the interrupt pin is low
//! just in case the hardware missed a falling edge
//! function is in ccspi.cpp
//
//*****************************************************************************
void cc3k_int_poll()
{
if (digitalRead(g_irqPin) == LOW && ccspi_is_in_irq == 0 && ccspi_int_enabled != 0) {
SPI_IRQ();
}
}

View File

@ -1,90 +0,0 @@
/*****************************************************************************
*
* spi.h - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
*
* Adapted for use with the Arduino/AVR by KTOWN (Kevin Townsend)
* & Limor Fried for Adafruit Industries
* This library works with the Adafruit CC3000 breakout
* ----> https://www.adafruit.com/products/1469
* Adafruit invests time and resources providing this open source code,
* please support Adafruit and open-source hardware by purchasing
* products from Adafruit!
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the
* distribution.
*
* Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*****************************************************************************/
#ifndef __SPI_H__
#define __SPI_H__
#if ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <SPI.h>
#include "utility/wlan.h"
typedef void (*gcSpiHandleRx)(void *p);
typedef void (*gcSpiHandleTx)(void);
extern unsigned char wlan_tx_buffer[];
//*****************************************************************************
//
// Prototypes for the APIs.
//
//*****************************************************************************
extern void SpiOpen(gcSpiHandleRx pfRxHandler);
extern void SpiClose(void);
extern long SpiWrite(unsigned char *pUserBuffer, unsigned short usLength);
extern void SpiResumeSpi(void);
extern void SpiCleanGPIOISR(void);
extern int init_spi(void);
extern long TXBufferIsEmpty(void);
extern long RXBufferIsEmpty(void);
extern void CC3000_UsynchCallback(long lEventType, char * data, unsigned char length);
extern void WriteWlanPin( unsigned char val );
extern long ReadWlanInterruptPin(void);
extern void WlanInterruptEnable();
extern void WlanInterruptDisable();
extern char *sendDriverPatch(unsigned long *Length);
extern char *sendBootLoaderPatch(unsigned long *Length);
extern char *sendWLFWPatch(unsigned long *Length);
extern void SPI_IRQ(void);
#endif

View File

@ -1,179 +0,0 @@
/***************************************************
Adafruit CC3000 Breakout/Shield TCP Chat Server
This is a simple chat server which allows clients to connect
with telnet and exchange messages. Anything sent by one
client will be written out to all connected clients.
See the CC3000 tutorial on Adafruit's learning system
for more information on setting up and using the
CC3000:
http://learn.adafruit.com/adafruit-cc3000-wifi
Requirements:
This sketch requires the Adafruit CC3000 library. You can
download the library from:
https://github.com/adafruit/Adafruit_CC3000_Library
For information on installing libraries in the Arduino IDE
see this page:
http://arduino.cc/en/Guide/Libraries
Usage:
Update the SSID and, if necessary, the CC3000 hardware pin
information below, then run the sketch and check the
output of the serial port. After connecting to the
wireless network successfully the sketch will output
the IP address of the server and start listening for
connections. Once listening for connections, connect
to the server from your computer using a telnet client
on port 23.
For example on Linux or Mac OSX, if your CC3000 has an
IP address 192.168.1.100 you would execute in a command
window:
telnet 192.168.1.100 23
Connect multiple clients and notice that whatever one client
sends will be echoed to all other clients. Press ctrl-] and
type quit at the prompt to close the telnet session.
On Windows you'll need to download a telnet client. PuTTY
is a good, free GUI client:
http://www.chiark.greenend.org.uk/~sgtatham/putty/
License:
This example is copyright (c) 2013 Tony DiCola (tony@tonydicola.com)
and is released under an open source MIT license. See details at:
http://opensource.org/licenses/MIT
This code was adapted from Adafruit CC3000 library example
code which has the following license:
Designed specifically to work with the Adafruit WiFi products:
----> https://www.adafruit.com/products/1469
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
Written by Limor Fried & Kevin Townsend for Adafruit Industries.
BSD license, all text above must be included in any redistribution
****************************************************/
#include <Adafruit_CC3000.h>
#include <SPI.h>
#include "utility/debug.h"
#include "utility/socket.h"
// These are the interrupt and control pins
#define ADAFRUIT_CC3000_IRQ 3 // MUST be an interrupt pin!
// These can be any two pins
#define ADAFRUIT_CC3000_VBAT 5
#define ADAFRUIT_CC3000_CS 10
// Use hardware SPI for the remaining pins
// On an UNO, SCK = 13, MISO = 12, and MOSI = 11
Adafruit_CC3000 cc3000 = Adafruit_CC3000(ADAFRUIT_CC3000_CS, ADAFRUIT_CC3000_IRQ, ADAFRUIT_CC3000_VBAT,
SPI_CLOCK_DIVIDER); // you can change this clock speed
#define WLAN_SSID "myNetwork" // cannot be longer than 32 characters!
#define WLAN_PASS "myPassword"
// Security can be WLAN_SEC_UNSEC, WLAN_SEC_WEP, WLAN_SEC_WPA or WLAN_SEC_WPA2
#define WLAN_SECURITY WLAN_SEC_WPA2
#define LISTEN_PORT 23 // What TCP port to listen on for connections.
Adafruit_CC3000_Server chatServer(LISTEN_PORT);
void setup(void)
{
Serial.begin(115200);
Serial.println(F("Hello, CC3000!\n"));
Serial.print("Free RAM: "); Serial.println(getFreeRam(), DEC);
/* Initialise the module */
Serial.println(F("\nInitializing..."));
if (!cc3000.begin())
{
Serial.println(F("Couldn't begin()! Check your wiring?"));
while(1);
}
Serial.print(F("\nAttempting to connect to ")); Serial.println(WLAN_SSID);
if (!cc3000.connectToAP(WLAN_SSID, WLAN_PASS, WLAN_SECURITY)) {
Serial.println(F("Failed!"));
while(1);
}
Serial.println(F("Connected!"));
Serial.println(F("Request DHCP"));
while (!cc3000.checkDHCP())
{
delay(100); // ToDo: Insert a DHCP timeout!
}
/* Display the IP address DNS, Gateway, etc. */
while (! displayConnectionDetails()) {
delay(1000);
}
/*********************************************************/
/* You can safely remove this to save some flash memory! */
/*********************************************************/
Serial.println(F("\r\nNOTE: This sketch may cause problems with other sketches"));
Serial.println(F("since the .disconnect() function is never called, so the"));
Serial.println(F("AP may refuse connection requests from the CC3000 until a"));
Serial.println(F("timeout period passes. This is normal behaviour since"));
Serial.println(F("there isn't an obvious moment to disconnect with a server.\r\n"));
// Start listening for connections
chatServer.begin();
Serial.println(F("Listening for connections..."));
}
void loop(void)
{
// Try to get a client which is connected.
Adafruit_CC3000_ClientRef client = chatServer.available();
if (client) {
// Check if there is data available to read.
if (client.available() > 0) {
// Read a byte and write it to all clients.
uint8_t ch = client.read();
chatServer.write(ch);
}
}
}
/**************************************************************************/
/*!
@brief Tries to read the IP address and other connection details
*/
/**************************************************************************/
bool displayConnectionDetails(void)
{
uint32_t ipAddress, netmask, gateway, dhcpserv, dnsserv;
if(!cc3000.getIPAddress(&ipAddress, &netmask, &gateway, &dhcpserv, &dnsserv))
{
Serial.println(F("Unable to retrieve the IP Address!\r\n"));
return false;
}
else
{
Serial.print(F("\nIP Addr: ")); cc3000.printIPdotsRev(ipAddress);
Serial.print(F("\nNetmask: ")); cc3000.printIPdotsRev(netmask);
Serial.print(F("\nGateway: ")); cc3000.printIPdotsRev(gateway);
Serial.print(F("\nDHCPsrv: ")); cc3000.printIPdotsRev(dhcpserv);
Serial.print(F("\nDNSserv: ")); cc3000.printIPdotsRev(dnsserv);
Serial.println();
return true;
}
}

View File

@ -1,185 +0,0 @@
/***************************************************
Adafruit CC3000 Breakout/Shield TCP Echo Server
This is a simple implementation of the echo
protocol, RFC 862 http://tools.ietf.org/html/rfc862 ,
for the Arduino platform and Adafruit CC3000 breakout
or shield. This sketch will create a TCP server that
listens by default on port 7 and echos back any data
received. Up to 3 clients can be connected concurrently
to the server. This sketch is meant as an example of how
to write a simple server with the Arduino and CC3000.
See the CC3000 tutorial on Adafruit's learning system
for more information on setting up and using the
CC3000:
http://learn.adafruit.com/adafruit-cc3000-wifi
Requirements:
This sketch requires the Adafruit CC3000 library. You can
download the library from:
https://github.com/adafruit/Adafruit_CC3000_Library
For information on installing libraries in the Arduino IDE
see this page:
http://arduino.cc/en/Guide/Libraries
Usage:
Update the SSID and, if necessary, the CC3000 hardware pin
information below, then run the sketch and check the
output of the serial port. After connecting to the
wireless network successfully the sketch will output
the IP address of the server and start listening for
connections. Once listening for connections, connect
to the server from your computer using a telnet client
on port 7.
For example on Linux or Mac OSX, if your CC3000 has an
IP address 192.168.1.100 you would execute in a command
window:
telnet 192.168.1.100 7
After connecting, notice that as you type input and
press enter to send it the CC3000 will echo back exactly
what you typed. Press ctrl-] and type quit at the prompt
to close the telnet session.
On Windows you'll need to download a telnet client. PuTTY
is a good, free GUI client:
http://www.chiark.greenend.org.uk/~sgtatham/putty/
License:
This example is copyright (c) 2013 Tony DiCola (tony@tonydicola.com)
and is released under an open source MIT license. See details at:
http://opensource.org/licenses/MIT
This code was adapted from Adafruit CC3000 library example
code which has the following license:
Designed specifically to work with the Adafruit WiFi products:
----> https://www.adafruit.com/products/1469
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
Written by Limor Fried & Kevin Townsend for Adafruit Industries.
BSD license, all text above must be included in any redistribution
****************************************************/
#include <Adafruit_CC3000.h>
#include <SPI.h>
#include "utility/debug.h"
#include "utility/socket.h"
// These are the interrupt and control pins
#define ADAFRUIT_CC3000_IRQ 3 // MUST be an interrupt pin!
// These can be any two pins
#define ADAFRUIT_CC3000_VBAT 5
#define ADAFRUIT_CC3000_CS 10
// Use hardware SPI for the remaining pins
// On an UNO, SCK = 13, MISO = 12, and MOSI = 11
Adafruit_CC3000 cc3000 = Adafruit_CC3000(ADAFRUIT_CC3000_CS, ADAFRUIT_CC3000_IRQ, ADAFRUIT_CC3000_VBAT,
SPI_CLOCK_DIVIDER); // you can change this clock speed
#define WLAN_SSID "myNetwork" // cannot be longer than 32 characters!
#define WLAN_PASS "myPassword"
// Security can be WLAN_SEC_UNSEC, WLAN_SEC_WEP, WLAN_SEC_WPA or WLAN_SEC_WPA2
#define WLAN_SECURITY WLAN_SEC_WPA2
#define LISTEN_PORT 7 // What TCP port to listen on for connections. The echo protocol uses port 7.
Adafruit_CC3000_Server echoServer(LISTEN_PORT);
void setup(void)
{
Serial.begin(115200);
Serial.println(F("Hello, CC3000!\n"));
Serial.print("Free RAM: "); Serial.println(getFreeRam(), DEC);
/* Initialise the module */
Serial.println(F("\nInitializing..."));
if (!cc3000.begin())
{
Serial.println(F("Couldn't begin()! Check your wiring?"));
while(1);
}
Serial.print(F("\nAttempting to connect to ")); Serial.println(WLAN_SSID);
if (!cc3000.connectToAP(WLAN_SSID, WLAN_PASS, WLAN_SECURITY)) {
Serial.println(F("Failed!"));
while(1);
}
Serial.println(F("Connected!"));
Serial.println(F("Request DHCP"));
while (!cc3000.checkDHCP())
{
delay(100); // ToDo: Insert a DHCP timeout!
}
/* Display the IP address DNS, Gateway, etc. */
while (! displayConnectionDetails()) {
delay(1000);
}
/*********************************************************/
/* You can safely remove this to save some flash memory! */
/*********************************************************/
Serial.println(F("\r\nNOTE: This sketch may cause problems with other sketches"));
Serial.println(F("since the .disconnect() function is never called, so the"));
Serial.println(F("AP may refuse connection requests from the CC3000 until a"));
Serial.println(F("timeout period passes. This is normal behaviour since"));
Serial.println(F("there isn't an obvious moment to disconnect with a server.\r\n"));
// Start listening for connections
echoServer.begin();
Serial.println(F("Listening for connections..."));
}
void loop(void)
{
// Try to get a client which is connected.
Adafruit_CC3000_ClientRef client = echoServer.available();
if (client) {
// Check if there is data available to read.
if (client.available() > 0) {
// Read a byte and write it to all clients.
uint8_t ch = client.read();
client.write(ch);
}
}
}
/**************************************************************************/
/*!
@brief Tries to read the IP address and other connection details
*/
/**************************************************************************/
bool displayConnectionDetails(void)
{
uint32_t ipAddress, netmask, gateway, dhcpserv, dnsserv;
if(!cc3000.getIPAddress(&ipAddress, &netmask, &gateway, &dhcpserv, &dnsserv))
{
Serial.println(F("Unable to retrieve the IP Address!\r\n"));
return false;
}
else
{
Serial.print(F("\nIP Addr: ")); cc3000.printIPdotsRev(ipAddress);
Serial.print(F("\nNetmask: ")); cc3000.printIPdotsRev(netmask);
Serial.print(F("\nGateway: ")); cc3000.printIPdotsRev(gateway);
Serial.print(F("\nDHCPsrv: ")); cc3000.printIPdotsRev(dhcpserv);
Serial.print(F("\nDNSserv: ")); cc3000.printIPdotsRev(dnsserv);
Serial.println();
return true;
}
}

View File

@ -1,296 +0,0 @@
/***************************************************
This is an example for the Adafruit CC3000 Wifi Breakout & Shield
Designed specifically to work with the Adafruit WiFi products:
----> https://www.adafruit.com/products/1469
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
Written by Limor Fried, Kevin Townsend and Phil Burgess for
Adafruit Industries. BSD license, all text above must be included
in any redistribution
****************************************************/
/*
This example queries the freegeoip.net service to get the local
approximate geographic location based on IP address. Combined with
code in the InternetTime sketch, this can give absolute position and
time, extremely useful for seasonal calculations like sun position,
insolation, day length, etc. Sure, could always add a GPS module or
just plug in values from one's GPS or phone, but this has the dual
luxuries of coming 'free' with the existing WiFi hardware, and being
automatic (albeit a bit less accurate...but totally sufficient for
the applications mentioned).
Positional accuracy depends on the freegeoip.net database, in turn
based on data collected by maxmind.com. No guarantees this will work
for every location.
Position should be polled only once, at startup, or very infrequently
if making a mobile network-hopping thing, so as not to overwhelm the
kindly-provided free geolocation service.
*/
#include <Adafruit_CC3000.h>
#include <ccspi.h>
#include <SPI.h>
#include <string.h>
#include "utility/debug.h"
// These are the interrupt and control pins
#define ADAFRUIT_CC3000_IRQ 3 // MUST be an interrupt pin!
// These can be any two pins
#define ADAFRUIT_CC3000_VBAT 5
#define ADAFRUIT_CC3000_CS 10
// Use hardware SPI for the remaining pins
// On an UNO, SCK = 13, MISO = 12, and MOSI = 11
Adafruit_CC3000 cc3000 = Adafruit_CC3000(ADAFRUIT_CC3000_CS,
ADAFRUIT_CC3000_IRQ, ADAFRUIT_CC3000_VBAT,
SPI_CLOCK_DIVIDER); // you can change this clock speed
#define WLAN_SSID "myNetwork" // cannot be longer than 32 characters!
#define WLAN_PASS "myPassword"
// Security can be WLAN_SEC_UNSEC, WLAN_SEC_WEP, WLAN_SEC_WPA or WLAN_SEC_WPA2
#define WLAN_SECURITY WLAN_SEC_WPA2
Adafruit_CC3000_Client client;
const unsigned long
dhcpTimeout = 60L * 1000L, // Max time to wait for address from DHCP
connectTimeout = 15L * 1000L, // Max time to wait for server connection
responseTimeout = 15L * 1000L; // Max time to wait for data from server
// This program prints a few tidbits of information about the current location
// (Country, region (state), city, longitude and latitude). Additional info is
// available but just isn't recorded by this code -- can look at jsonParse()
// function to see how it's done and add what you need (or remove what you don't).
// The total list of available attributes includes: ip, country_code,
// country_name, region_code, region_name, city, zipcode, latitude, longitude,
// metro_code and areacode.
char
country[20],
region[20],
city[20],
name[13], // Temp space for name:value parsing
value[64]; // Temp space for name:value parsing
float
longitude, latitude;
void setup(void) {
uint32_t ip = 0L, t;
Serial.begin(115200);
Serial.println(F("Hello, CC3000!"));
Serial.print("Free RAM: "); Serial.println(getFreeRam(), DEC);
Serial.print(F("Initializing..."));
if(!cc3000.begin()) {
Serial.println(F("failed. Check your wiring?"));
return;
}
Serial.print(F("OK.\r\nConnecting to network..."));
if(!cc3000.connectToAP(WLAN_SSID, WLAN_PASS, WLAN_SECURITY)) {
Serial.println(F("Failed!"));
return;
}
Serial.println(F("connected!"));
Serial.print(F("Requesting address from DHCP server..."));
for(t=millis(); !cc3000.checkDHCP() && ((millis() - t) < dhcpTimeout); delay(1000));
if(cc3000.checkDHCP()) {
Serial.println(F("OK"));
} else {
Serial.println(F("failed"));
return;
}
while(!displayConnectionDetails()) delay(1000);
// Look up server's IP address
Serial.print(F("\r\nGetting server IP address..."));
t = millis();
while((0L == ip) && ((millis() - t) < connectTimeout)) {
if(cc3000.getHostByName("freegeoip.net", &ip)) break;
delay(1000);
}
if(0L == ip) {
Serial.println(F("failed"));
return;
}
cc3000.printIPdotsRev(ip);
Serial.println();
// Request JSON-formatted data from server (port 80)
Serial.print(F("Connecting to geo server..."));
client = cc3000.connectTCP(ip, 80);
if(client.connected()) {
Serial.print(F("connected.\r\nRequesting data..."));
client.print(F("GET /json/ HTTP/1.0\r\nConnection: close\r\n\r\n"));
} else {
Serial.println(F("failed"));
return;
}
Serial.print("\r\nReading response...");
country[0] = region[0] = city[0] = 0; // Clear data
jsonParse(0, 0);
client.close();
Serial.println(F("OK"));
/* You need to make sure to clean up after yourself or the CC3000 can freak out */
/* the next time your try to connect ... */
Serial.println(F("\nDisconnecting"));
cc3000.disconnect();
Serial.print(F("\r\nRESULTS:\r\n Country: "));
Serial.println(country);
Serial.print(F(" Region: "));
Serial.println(region);
Serial.print(F(" City: "));
Serial.println(city);
Serial.print(F(" Longitude: "));
Serial.println(longitude);
Serial.print(F(" Latitude: "));
Serial.println(latitude);
}
void loop(void) { } // Not used by this code
bool displayConnectionDetails(void) {
uint32_t ipAddress, netmask, gateway, dhcpserv, dnsserv;
if(!cc3000.getIPAddress(&ipAddress, &netmask, &gateway, &dhcpserv, &dnsserv)) {
Serial.println(F("Unable to retrieve the IP Address!\r\n"));
return false;
} else {
Serial.print(F("\nIP Addr: ")); cc3000.printIPdotsRev(ipAddress);
Serial.print(F("\nNetmask: ")); cc3000.printIPdotsRev(netmask);
Serial.print(F("\nGateway: ")); cc3000.printIPdotsRev(gateway);
Serial.print(F("\nDHCPsrv: ")); cc3000.printIPdotsRev(dhcpserv);
Serial.print(F("\nDNSserv: ")); cc3000.printIPdotsRev(dnsserv);
Serial.println();
return true;
}
}
// Helper functions swiped from Adafruit 'Gutenbird' code (with changes)
boolean jsonParse(int depth, byte endChar) {
int c, i;
boolean readName = true;
for(;;) {
while(isspace(c = timedRead())); // Scan past whitespace
if(c < 0) return false; // Timeout
if(c == endChar) return true; // EOD
if(c == '{') { // Object follows
if(!jsonParse(depth + 1, '}')) return false;
if(!depth) return true; // End of file
} else if(c == '[') { // Array follows
if(!jsonParse(depth + 1,']')) return false;
} else if((c == '"') || (c == '\'')) { // String follows
if(readName) { // Name-reading mode
if(!readString(name, sizeof(name)-1, c)) return false;
} else { // Value-reading mode
if(!readString(value, sizeof(value)-1, c)) return false;
// Process name and value strings:
if (!strcasecmp(name, "country_name")) {
strncpy(country, value, sizeof(country)-1);
} else if(!strcasecmp(name, "region_name")) {
strncpy(region, value, sizeof(region)-1);
} else if(!strcasecmp(name, "city")) {
strncpy(city, value, sizeof(city)-1);
}
}
} else if(c == ':') { // Separator between name:value
readName = false; // Now in value-reading mode
value[0] = 0; // Clear existing value data
} else if(c == ',') { // Separator between name/value pairs
readName = true; // Now in name-reading mode
name[0] = 0; // Clear existing name data
} else {
// Else true/false/null or a number follows.
value[0] = c;
if(!strcasecmp(name, "longitude")) {
if(!readString(value+1, sizeof(value)-1, ',')) return false;
longitude = atof(value);
} else if(!strcasecmp(name, "latitude")) {
if(!readString(value+1, sizeof(value)-1, ',')) return false;
latitude = atof(value);
}
readName = true; // Now in name-reading mode
name[0] = 0; // Clear existing name data
}
}
}
// Read string from client stream into destination buffer, up to a maximum
// requested length. Buffer should be at least 1 byte larger than this to
// accommodate NUL terminator. Opening quote is assumed already read,
// closing quote will be discarded, and stream will be positioned
// immediately following the closing quote (regardless whether max length
// is reached -- excess chars are discarded). Returns true on success
// (including zero-length string), false on timeout/read error.
boolean readString(char *dest, int maxLen, char quote) {
int c, len = 0;
while((c = timedRead()) != quote) { // Read until closing quote
if(c == '\\') { // Escaped char follows
c = timedRead(); // Read it
// Certain escaped values are for cursor control --
// there might be more suitable printer codes for each.
if (c == 'b') c = '\b'; // Backspace
else if(c == 'f') c = '\f'; // Form feed
else if(c == 'n') c = '\n'; // Newline
else if(c == 'r') c = '\r'; // Carriage return
else if(c == 't') c = '\t'; // Tab
else if(c == 'u') c = unidecode(4);
else if(c == 'U') c = unidecode(8);
// else c is unaltered -- an escaped char such as \ or "
} // else c is a normal unescaped char
if(c < 0) return false; // Timeout
// In order to properly position the client stream at the end of
// the string, characters are read to the end quote, even if the max
// string length is reached...the extra chars are simply discarded.
if(len < maxLen) dest[len++] = c;
}
dest[len] = 0;
return true; // Success (even if empty string)
}
// Read a given number of hexadecimal characters from client stream,
// representing a Unicode symbol. Return -1 on error, else return nearest
// equivalent glyph in printer's charset. (See notes below -- for now,
// always returns '-' or -1.)
int unidecode(byte len) {
int c, v, result = 0;
while(len--) {
if((c = timedRead()) < 0) return -1; // Stream timeout
if ((c >= '0') && (c <= '9')) v = c - '0';
else if((c >= 'A') && (c <= 'F')) v = 10 + c - 'A';
else if((c >= 'a') && (c <= 'f')) v = 10 + c - 'a';
else return '-'; // garbage
result = (result << 4) | v;
}
return '?';
}
// Read from client stream with a 5 second timeout. Although an
// essentially identical method already exists in the Stream() class,
// it's declared private there...so this is a local copy.
int timedRead(void) {
unsigned long start = millis();
while((!client.available()) && ((millis() - start) < 5000L));
return client.read(); // -1 on timeout
}

View File

@ -1,278 +0,0 @@
/***************************************************
This is an example for the Adafruit CC3000 Wifi Breakout & Shield
Designed specifically to work with the Adafruit WiFi products:
----> https://www.adafruit.com/products/1469
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
Written by Limor Fried, Kevin Townsend and Phil Burgess for
Adafruit Industries. BSD license, all text above must be included
in any redistribution
****************************************************/
/*
This example queries an NTP time server to get the current "UNIX time"
(seconds since 1/1/1970, UTC (GMT)), then uses the Arduino's internal
timer to keep relative time. The clock is re-synchronized roughly
once per day. This minimizes NTP server misuse/abuse.
The RTClib library (a separate download, and not used here) contains
functions to convert UNIX time to other formats if needed.
*/
#include <Adafruit_CC3000.h>
#include <ccspi.h>
#include <SPI.h>
// These are the interrupt and control pins
#define ADAFRUIT_CC3000_IRQ 3 // MUST be an interrupt pin!
// These can be any two pins
#define ADAFRUIT_CC3000_VBAT 5
#define ADAFRUIT_CC3000_CS 10
// Use hardware SPI for the remaining pins
// On an UNO, SCK = 13, MISO = 12, and MOSI = 11
Adafruit_CC3000 cc3000 = Adafruit_CC3000(ADAFRUIT_CC3000_CS, ADAFRUIT_CC3000_IRQ, ADAFRUIT_CC3000_VBAT,
SPI_CLOCK_DIVIDER); // you can change this clock speed but DI
#define WLAN_SSID "myNetwork" // cannot be longer than 32 characters!
#define WLAN_PASS "myPassword"
// Security can be WLAN_SEC_UNSEC, WLAN_SEC_WEP, WLAN_SEC_WPA or WLAN_SEC_WPA2
#define WLAN_SECURITY WLAN_SEC_WPA2
Adafruit_CC3000_Client client;
const unsigned long
connectTimeout = 15L * 1000L, // Max time to wait for server connection
responseTimeout = 15L * 1000L; // Max time to wait for data from server
int
countdown = 0; // loop() iterations until next time server query
unsigned long
lastPolledTime = 0L, // Last value retrieved from time server
sketchTime = 0L; // CPU milliseconds since last server query
void setup(void)
{
Serial.begin(115200);
Serial.println(F("Hello, CC3000!\n"));
displayDriverMode();
Serial.println(F("\nInitialising the CC3000 ..."));
if (!cc3000.begin()) {
Serial.println(F("Unable to initialise the CC3000! Check your wiring?"));
for(;;);
}
uint16_t firmware = checkFirmwareVersion();
if (firmware < 0x113) {
Serial.println(F("Wrong firmware version!"));
for(;;);
}
displayMACAddress();
Serial.println(F("\nDeleting old connection profiles"));
if (!cc3000.deleteProfiles()) {
Serial.println(F("Failed!"));
while(1);
}
/* Attempt to connect to an access point */
char *ssid = WLAN_SSID; /* Max 32 chars */
Serial.print(F("\nAttempting to connect to ")); Serial.println(ssid);
/* NOTE: Secure connections are not available in 'Tiny' mode! */
if (!cc3000.connectToAP(WLAN_SSID, WLAN_PASS, WLAN_SECURITY)) {
Serial.println(F("Failed!"));
while(1);
}
Serial.println(F("Connected!"));
/* Wait for DHCP to complete */
Serial.println(F("Request DHCP"));
while (!cc3000.checkDHCP()) {
delay(100); // ToDo: Insert a DHCP timeout!
}
/* Display the IP address DNS, Gateway, etc. */
while (!displayConnectionDetails()) {
delay(1000);
}
}
// To reduce load on NTP servers, time is polled once per roughly 24 hour period.
// Otherwise use millis() to estimate time since last query. Plenty accurate.
void loop(void) {
if(countdown == 0) { // Time's up?
unsigned long t = getTime(); // Query time server
if(t) { // Success?
lastPolledTime = t; // Save time
sketchTime = millis(); // Save sketch time of last valid time query
countdown = 24*60*4-1; // Reset counter: 24 hours * 15-second intervals
}
} else {
countdown--; // Don't poll; use math to figure current time
}
unsigned long currentTime = lastPolledTime + (millis() - sketchTime) / 1000;
Serial.print(F("Current UNIX time: "));
Serial.print(currentTime);
Serial.println(F(" (seconds since 1/1/1970 UTC)"));
delay(15000L); // Pause 15 seconds
}
/**************************************************************************/
/*!
@brief Displays the driver mode (tiny of normal), and the buffer
size if tiny mode is not being used
@note The buffer size and driver mode are defined in cc3000_common.h
*/
/**************************************************************************/
void displayDriverMode(void)
{
#ifdef CC3000_TINY_DRIVER
Serial.println(F("CC3000 is configure in 'Tiny' mode"));
#else
Serial.print(F("RX Buffer : "));
Serial.print(CC3000_RX_BUFFER_SIZE);
Serial.println(F(" bytes"));
Serial.print(F("TX Buffer : "));
Serial.print(CC3000_TX_BUFFER_SIZE);
Serial.println(F(" bytes"));
#endif
}
/**************************************************************************/
/*!
@brief Tries to read the CC3000's internal firmware patch ID
*/
/**************************************************************************/
uint16_t checkFirmwareVersion(void)
{
uint8_t major, minor;
uint16_t version;
#ifndef CC3000_TINY_DRIVER
if(!cc3000.getFirmwareVersion(&major, &minor))
{
Serial.println(F("Unable to retrieve the firmware version!\r\n"));
version = 0;
}
else
{
Serial.print(F("Firmware V. : "));
Serial.print(major); Serial.print(F(".")); Serial.println(minor);
version = major; version <<= 8; version |= minor;
}
#endif
return version;
}
/**************************************************************************/
/*!
@brief Tries to read the 6-byte MAC address of the CC3000 module
*/
/**************************************************************************/
void displayMACAddress(void)
{
uint8_t macAddress[6];
if(!cc3000.getMacAddress(macAddress))
{
Serial.println(F("Unable to retrieve MAC Address!\r\n"));
}
else
{
Serial.print(F("MAC Address : "));
cc3000.printHex((byte*)&macAddress, 6);
}
}
/**************************************************************************/
/*!
@brief Tries to read the IP address and other connection details
*/
/**************************************************************************/
bool displayConnectionDetails(void)
{
uint32_t ipAddress, netmask, gateway, dhcpserv, dnsserv;
if(!cc3000.getIPAddress(&ipAddress, &netmask, &gateway, &dhcpserv, &dnsserv))
{
Serial.println(F("Unable to retrieve the IP Address!\r\n"));
return false;
}
else
{
Serial.print(F("\nIP Addr: ")); cc3000.printIPdotsRev(ipAddress);
Serial.print(F("\nNetmask: ")); cc3000.printIPdotsRev(netmask);
Serial.print(F("\nGateway: ")); cc3000.printIPdotsRev(gateway);
Serial.print(F("\nDHCPsrv: ")); cc3000.printIPdotsRev(dhcpserv);
Serial.print(F("\nDNSserv: ")); cc3000.printIPdotsRev(dnsserv);
Serial.println();
return true;
}
}
// Minimalist time server query; adapted from Adafruit Gutenbird sketch,
// which in turn has roots in Arduino UdpNTPClient tutorial.
unsigned long getTime(void) {
uint8_t buf[48];
unsigned long ip, startTime, t = 0L;
Serial.print(F("Locating time server..."));
// Hostname to IP lookup; use NTP pool (rotates through servers)
if(cc3000.getHostByName("pool.ntp.org", &ip)) {
static const char PROGMEM
timeReqA[] = { 227, 0, 6, 236 },
timeReqB[] = { 49, 78, 49, 52 };
Serial.println(F("\r\nAttempting connection..."));
startTime = millis();
do {
client = cc3000.connectUDP(ip, 123);
} while((!client.connected()) &&
((millis() - startTime) < connectTimeout));
if(client.connected()) {
Serial.print(F("connected!\r\nIssuing request..."));
// Assemble and issue request packet
memset(buf, 0, sizeof(buf));
memcpy_P( buf , timeReqA, sizeof(timeReqA));
memcpy_P(&buf[12], timeReqB, sizeof(timeReqB));
client.write(buf, sizeof(buf));
Serial.print(F("\r\nAwaiting response..."));
memset(buf, 0, sizeof(buf));
startTime = millis();
while((!client.available()) &&
((millis() - startTime) < responseTimeout));
if(client.available()) {
client.read(buf, sizeof(buf));
t = (((unsigned long)buf[40] << 24) |
((unsigned long)buf[41] << 16) |
((unsigned long)buf[42] << 8) |
(unsigned long)buf[43]) - 2208988800UL;
Serial.print(F("OK\r\n"));
}
client.close();
}
}
if(!t) Serial.println(F("error"));
return t;
}

View File

@ -1,447 +0,0 @@
/*
IMPORTANT: THIS SOFTWARE CURRENTLY DOES NOT WORK, and future
status is uncertain. Twitter has changed their API to require
SSL (Secure Sockets Layer) on -all- connections, a complex
operation beyond the Arduino's ability to handle. The code is
being kept around on the chance that a suitable proxy service
becomes available...but at present we have no such service, no
code for such, nor a schedule or even a firm commitment to
pursue it. For projects requiring Twitter we now recommend
using an SSL-capable system such as Raspberry Pi.
*/
/*
Send tweets wirelessly from Arduino using the new Twitter 1.1 API.
Self-contained, operates directly -- no proxy server required!
Designed for IoTA -- Internet of Things by Adafruit -- a series of Arduino-
compatible WiFi products based on the TI CC3000 module, to be available in
shield, breakout and standalone development board form-factors.
Written by Adafruit Industries, distributed under BSD License.
MUST BE CONFIGURED FOR TWITTER 1.1 API BEFORE USE. See notes below.
REQUIRES ARDUINO IDE 1.0 OR LATER -- Back-porting is not likely to occur,
as the code is deeply dependent on the Stream class, etc.
Requires Adafruit fork of Peter Knight's Cryptosuite library for Arduino:
https://github.com/adafruit/Cryptosuite
Required hardware includes an 802.11 wireless access point, any of the
Adafruit IoTa WiFi devices, a compatible Arduino board (for shield and
breakout form-factors) and, optionally, sensors to be read and reported
via Twitter.
Resources:
http://www.adafruit.com/products/1469 IoTa breakout board
http://www.adafruit.com/products/201 Arduino Uno
[ additional links will go here ]
Uses Twitter 1.1 API. This REQUIRES a Twitter account and some account
configuration. Start at dev.twitter.com, sign in with your Twitter
credentials, select "My Applications" from the avatar drop-down menu at the
top right, then "Create a new application." Provide a name, description,
placeholder URL and complete the captcha, after which you'll be provided a
"consumer key" and "consumer secret" for your app. Select "Create access
token" to also generate an "access token" and "access token secret."
ALL FOUR STRINGS must be copied to the correct positions in the globals below,
and configure the search string to your liking. DO NOT SHARE your keys or
secrets! If you put code on Github or other public repository, replace them
with dummy strings. Next, from the Twitter "Settings" tab, change the
Application Type to "Read and Write" -- MANDATORY or the sketch won't work!
Copyright (c) 2013 Adafruit Industries.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
#include <Adafruit_CC3000.h>
#include <ccspi.h>
#include <SPI.h>
#include <sha1.h>
// --------------------------------------------------------------------------
// This is a relatively complex sketch, not recommended as a first
// introduction to IoTa. Try running some of the other, simpler sketches
// first before attempting to adapt this code. Additionally, some of the
// CC3000 helper and status functions have been pared back in this code.
// See other example sketches for more complete and verbose debugging info
// during your initial IoTa experiments.
// Configurable globals and defines. Edit to your needs. -------------------
// CC3000 interrupt and control pins
#define ADAFRUIT_CC3000_IRQ 3 // MUST be an interrupt pin!
#define ADAFRUIT_CC3000_VBAT 5 // These can be
#define ADAFRUIT_CC3000_CS 10 // any two pins
// Hardware SPI required for remaining pins.
// On an UNO, SCK = 13, MISO = 12, and MOSI = 11
Adafruit_CC3000 cc3000 = Adafruit_CC3000(
ADAFRUIT_CC3000_CS, ADAFRUIT_CC3000_IRQ, ADAFRUIT_CC3000_VBAT,
SPI_CLOCK_DIVIDER);
// WiFi access point credentials
#define WLAN_SSID "myNetwork" // 32 characters max
#define WLAN_PASS "myPassword"
#define WLAN_SECURITY WLAN_SEC_WPA2 // WLAN_SEC_UNSEC/WLAN_SEC_WEP/WLAN_SEC_WPA/WLAN_SEC_WPA2
const char PROGMEM
// Twitter application credentials -- see notes above -- DO NOT SHARE.
consumer_key[] = "PUT_YOUR_CONSUMER_KEY_HERE",
access_token[] = "PUT_YOUR_ACCESS_TOKEN_HERE",
signingKey[] = "PUT_YOUR_CONSUMER_SECRET_HERE" // Consumer secret
"&" "PUT_YOUR_ACCESS_TOKEN_SECRET_HERE", // Access token secret
// The ampersand is intentional -- do not delete!
// Other globals. You probably won't need to change these. ---------------
endpoint[] = "/1.1/statuses/update.json",
agent[] = "Arduino-Tweet-Test v1.0";
const char
host[] = "api.twitter.com";
const unsigned long
dhcpTimeout = 60L * 1000L, // Max time to wait for address from DHCP
connectTimeout = 15L * 1000L, // Max time to wait for server connection
responseTimeout = 15L * 1000L; // Max time to wait for data from server
unsigned long
currentTime = 0L;
Adafruit_CC3000_Client
client; // For WiFi connections
// Similar to F(), but for PROGMEM string pointers rather than literals
#define F2(progmem_ptr) (const __FlashStringHelper *)progmem_ptr
// --------------------------------------------------------------------------
void setup(void) {
uint32_t ip = 0L, t;
Serial.begin(115200);
Serial.print(F("Hello! Initializing CC3000..."));
if(!cc3000.begin()) hang(F("failed. Check your wiring?"));
uint16_t firmware = checkFirmwareVersion();
if ((firmware != 0x113) && (firmware != 0x118)) {
hang(F("Wrong firmware version!"));
}
Serial.print(F("OK\r\nDeleting old connection profiles..."));
if(!cc3000.deleteProfiles()) hang(F("failed."));
Serial.print(F("OK\r\nConnecting to network..."));
/* NOTE: Secure connections are not available in 'Tiny' mode! */
if(!cc3000.connectToAP(WLAN_SSID, WLAN_PASS, WLAN_SECURITY)) hang(F("Failed!"));
Serial.print(F("OK\r\nRequesting address from DHCP server..."));
for(t=millis(); !cc3000.checkDHCP() && ((millis() - t) < dhcpTimeout); delay(100));
if(!cc3000.checkDHCP()) hang(F("failed"));
Serial.println(F("OK"));
while(!displayConnectionDetails());
// Get initial time from time server (make a few tries if needed)
for(uint8_t i=0; (i<5) && !(currentTime = getTime()); delay(5000L), i++);
// Initialize crypto library
Sha1.initHmac_P((uint8_t *)signingKey, sizeof(signingKey) - 1);
}
// On error, print PROGMEM string to serial monitor and stop
void hang(const __FlashStringHelper *str) {
Serial.println(str);
for(;;);
}
uint8_t countdown = 23; // Countdown to next time server query (once per ~24hr)
void loop() {
unsigned long t = millis();
// For now this just issues a fixed tweet. In reality, you might want to
// read from some sensors or that sort of thing, then nicely format the
// results into a buffer to be passed to the sendTweet() function.
sendTweet("Adafruit IoTa test. Tweet directly from Arduino...no proxy, no wires! http://www.adafruit.com/products/1469");
// Delay remainder of 1 hour (takes tweeting time into account)
Serial.println("Waiting ~1 hour...");
delay((60L * 60L * 1000L) - (millis() - t));
currentTime += 60L * 60L * 1000L;
if(!countdown) { // 24 hours elapsed?
if((t = getTime())) { // Synchronize time if server contacted
currentTime = t;
countdown = 23; // and reset counter
}
} else countdown--;
}
// Returns true on success, false on error
boolean sendTweet(char *msg) { // 140 chars max! No checks made here.
uint8_t *in, out, i;
char nonce[9], // 8 random digits + NUL
searchTime[11], // 32-bit int + NUL
b64[29];
unsigned long startTime, t, ip;
static const char PROGMEM b64chars[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
startTime = millis();
sprintf(nonce, "%04x%04x", random() ^ currentTime, startTime ^ currentTime);
sprintf(searchTime, "%ld", currentTime);
// A dirty hack makes the Oauth song and dance MUCH simpler within the
// Arduino's limited RAM and CPU. A proper general-purpose implementation
// would be expected to URL-encode keys and values (from the complete list
// of POST parameters and authentication values), sort by encoded key,
// concatenate and URL-encode the combined result. Sorting is avoided
// because every POST this program performs has exactly the same set of
// parameters, so we've pre-sorted the list as it appears here. Keys
// (and many values) are pre-encoded because they never change; many are
// passed through verbatim because the format is known to not require
// encoding. Most reside in PROGMEM, not RAM. This is bending a LOT of
// rules of Good and Proper Authentication and would land you an 'F' in
// Comp Sci class, but it handles the required task and is VERY compact.
Sha1.print(F("POST&http%3A%2F%2F"));
Sha1.print(host);
urlEncode(Sha1, endpoint, true, false);
Sha1.print(F("&oauth_consumer_key%3D"));
Sha1.print(F2(consumer_key));
Sha1.print(F("%26oauth_nonce%3D"));
Sha1.print(nonce);
Sha1.print(F("%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D"));
Sha1.print(searchTime);
Sha1.print(F("%26oauth_token%3D"));
Sha1.print(F2(access_token));
Sha1.print(F("%26oauth_version%3D1.0%26status%3D"));
urlEncode(Sha1, msg, false, true);
// base64-encode SHA-1 hash output. This is NOT a general-purpose base64
// encoder! It's stripped down for the fixed-length hash -- always 20
// bytes input, always 27 chars output + '='.
for(in = Sha1.resultHmac(), out=0; ; in += 3) { // octets to sextets
b64[out++] = in[0] >> 2;
b64[out++] = ((in[0] & 0x03) << 4) | (in[1] >> 4);
if(out >= 26) break;
b64[out++] = ((in[1] & 0x0f) << 2) | (in[2] >> 6);
b64[out++] = in[2] & 0x3f;
}
b64[out] = (in[1] & 0x0f) << 2;
// Remap sextets to base64 ASCII chars
for(i=0; i<=out; i++) b64[i] = pgm_read_byte(&b64chars[b64[i]]);
b64[i++] = '=';
b64[i++] = 0;
// Hostname lookup
Serial.print(F("Locating Twitter server..."));
cc3000.getHostByName((char *)host, &ip);
// Connect to numeric IP
Serial.print(F("OK\r\nConnecting to server..."));
t = millis();
do {
client = cc3000.connectTCP(ip, 80);
} while((!client.connected()) &&
((millis() - t) < connectTimeout));
if(client.connected()) { // Success!
Serial.print(F("OK\r\nIssuing HTTP request..."));
// Unlike the hash prep, parameters in the HTTP request don't require sorting.
client.fastrprint(F("POST "));
client.fastrprint(F2(endpoint));
client.fastrprint(F(" HTTP/1.1\r\nHost: "));
client.fastrprint(host);
client.fastrprint(F("\r\nUser-Agent: "));
client.fastrprint(F2(agent));
client.fastrprint(F("\r\nConnection: close\r\n"
"Content-Type: application/x-www-form-urlencoded;charset=UTF-8\r\n"
"Content-Length: "));
client.print(7 + encodedLength(msg));
client.fastrprint(F("\r\nAuthorization: Oauth oauth_consumer_key=\""));
client.fastrprint(F2(consumer_key));
client.fastrprint(F("\", oauth_nonce=\""));
client.fastrprint(nonce);
client.fastrprint(F("\", oauth_signature=\""));
urlEncode(client, b64, false, false);
client.fastrprint(F("\", oauth_signature_method=\"HMAC-SHA1\", oauth_timestamp=\""));
client.fastrprint(searchTime);
client.fastrprint(F("\", oauth_token=\""));
client.fastrprint(F2(access_token));
client.fastrprint(F("\", oauth_version=\"1.0\"\r\n\r\nstatus="));
urlEncode(client, msg, false, false);
Serial.print(F("OK\r\nAwaiting response..."));
int c = 0;
// Dirty trick: instead of parsing results, just look for opening
// curly brace indicating the start of a successful JSON response.
while(((c = timedRead()) > 0) && (c != '{'));
if(c == '{') Serial.println(F("success!"));
else if(c < 0) Serial.println(F("timeout"));
else Serial.println(F("error (invalid Twitter credentials?)"));
client.close();
return (c == '{');
} else { // Couldn't contact server
Serial.println(F("failed"));
return false;
}
}
// Helper functions. --------------------------------------------------------
uint16_t checkFirmwareVersion(void) {
uint8_t major, minor;
uint16_t version = 0;
#ifndef CC3000_TINY_DRIVER
if(!cc3000.getFirmwareVersion(&major, &minor)) {
Serial.println(F("Unable to retrieve the firmware version!\r\n"));
} else {
Serial.print(F("Firmware V. : "));
Serial.print(major); Serial.print(F(".")); Serial.println(minor);
version = ((uint16_t)major << 8) | minor;
}
#endif
return version;
}
bool displayConnectionDetails(void) {
uint32_t addr, netmask, gateway, dhcpserv, dnsserv;
if(!cc3000.getIPAddress(&addr, &netmask, &gateway, &dhcpserv, &dnsserv))
return false;
Serial.print(F("IP Addr: ")); cc3000.printIPdotsRev(addr);
Serial.print(F("\r\nNetmask: ")); cc3000.printIPdotsRev(netmask);
Serial.print(F("\r\nGateway: ")); cc3000.printIPdotsRev(gateway);
Serial.print(F("\r\nDHCPsrv: ")); cc3000.printIPdotsRev(dhcpserv);
Serial.print(F("\r\nDNSserv: ")); cc3000.printIPdotsRev(dnsserv);
Serial.println();
return true;
}
// Read from client stream with a 5 second timeout. Although an
// essentially identical method already exists in the Stream() class,
// it's declared private there...so this is a local copy.
int timedRead(void) {
unsigned long start = millis();
while((!client.available()) && ((millis() - start) < responseTimeout));
return client.read(); // -1 on timeout
}
// For URL-encoding functions below
static const char PROGMEM hexChar[] = "0123456789ABCDEF";
// URL-encoding output function for Print class.
// Input from RAM or PROGMEM (flash). Double-encoding is a weird special
// case for Oauth (encoded strings get encoded a second time).
void urlEncode(
Print &p, // EthernetClient, Sha1, etc.
const char *src, // String to be encoded
boolean progmem, // If true, string is in PROGMEM (else RAM)
boolean x2) // If true, "double encode" parenthesis
{
uint8_t c;
while((c = (progmem ? pgm_read_byte(src) : *src))) {
if(((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z')) ||
((c >= '0') && (c <= '9')) || strchr_P(PSTR("-_.~"), c)) {
p.write(c);
} else {
if(x2) p.print("%25");
else p.write('%');
p.write(pgm_read_byte(&hexChar[c >> 4]));
p.write(pgm_read_byte(&hexChar[c & 15]));
}
src++;
}
}
// Returns would-be length of encoded string, without actually encoding
int encodedLength(char *src) {
uint8_t c;
int len = 0;
while((c = *src++)) {
len += (((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z')) ||
((c >= '0') && (c <= '9')) || strchr_P(PSTR("-_.~"), c)) ? 1 : 3;
}
return len;
}
// Minimalist time server query; adapted from Adafruit Gutenbird sketch,
// which in turn has roots in Arduino UdpNTPClient tutorial.
unsigned long getTime(void) {
uint8_t buf[48];
unsigned long ip, startTime, t = 0L;
Serial.print(F("Locating time server..."));
// Hostname to IP lookup; use NTP pool (rotates through servers)
if(cc3000.getHostByName("pool.ntp.org", &ip)) {
static const char PROGMEM
timeReqA[] = { 227, 0, 6, 236 },
timeReqB[] = { 49, 78, 49, 52 };
Serial.println(F("found\r\nConnecting to time server..."));
startTime = millis();
do {
client = cc3000.connectUDP(ip, 123);
} while((!client.connected()) &&
((millis() - startTime) < connectTimeout));
if(client.connected()) {
Serial.print(F("connected!\r\nIssuing request..."));
// Assemble and issue request packet
memset(buf, 0, sizeof(buf));
memcpy_P( buf , timeReqA, sizeof(timeReqA));
memcpy_P(&buf[12], timeReqB, sizeof(timeReqB));
client.write(buf, sizeof(buf));
Serial.print(F("OK\r\nAwaiting response..."));
memset(buf, 0, sizeof(buf));
startTime = millis();
while((!client.available()) &&
((millis() - startTime) < responseTimeout));
if(client.available()) {
client.read(buf, sizeof(buf));
t = (((unsigned long)buf[40] << 24) |
((unsigned long)buf[41] << 16) |
((unsigned long)buf[42] << 8) |
(unsigned long)buf[43]) - 2208988800UL;
Serial.println(F("success!"));
}
client.close();
}
}
if(!t) Serial.println(F("error"));
return t;
}

View File

@ -1,225 +0,0 @@
/***************************************************
This is an example for the Adafruit CC3000 Wifi Breakout & Shield
Designed specifically to work with the Adafruit WiFi products:
----> https://www.adafruit.com/products/1469
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
Written by Limor Fried & Kevin Townsend for Adafruit Industries.
BSD license, all text above must be included in any redistribution
****************************************************/
/* This sketch will attempt to establish an AP connection
using the SmartConfig tool, and save the connection
details for later use (with SmartConfigReconnect, etc.).
If a connection is successfully established, the data
will be stored as a connection profile in non-volatile
memory on the CC3000, and the device will be configured
to automatically connect to this profile on startup.
To see how to safely use the CC3000 without erasing
this SmartConfig data please consult the
SmartConfigReconnect sketch, which uses an optional flag
in Adafruit_CC3000.begin() to avoid erasing the
connection profiles from memory, as well as a new
.reconnect function.
Using other non SmartConfig example sketches will
erase the connection profile data on startup, but
this sketch combined with SmartConfigReconnect hopefully
illustrate how to use SmartConfig when hard-coded
connection details aren't appropriate.
SmartConfig is still beta and kind of works but is not fully
vetted! It might not work on all networks!
*/
#include <Adafruit_CC3000.h>
#include <ccspi.h>
#include <SPI.h>
#include <string.h>
#include "utility/debug.h"
// These are the interrupt and control pins
#define ADAFRUIT_CC3000_IRQ 3 // MUST be an interrupt pin!
// These can be any two pins
#define ADAFRUIT_CC3000_VBAT 5
#define ADAFRUIT_CC3000_CS 10
#define DEVICE_NAME "CC3000"
// Use hardware SPI for the remaining pins
// On an UNO, SCK = 13, MISO = 12, and MOSI = 11
Adafruit_CC3000 cc3000 = Adafruit_CC3000(ADAFRUIT_CC3000_CS,
ADAFRUIT_CC3000_IRQ,
ADAFRUIT_CC3000_VBAT,
SPI_CLOCK_DIVIDER);
// The SSID & Password are retrieved via the Smartconfig app
/**************************************************************************/
/*!
@brief Sets up the HW and the CC3000 module (called automatically
on startup)
*/
/**************************************************************************/
void setup(void)
{
Serial.begin(115200);
Serial.println(F("Hello, CC3000!\n"));
displayDriverMode();
Serial.print("Free RAM: "); Serial.println(getFreeRam(), DEC);
/* Initialise the module, deleting any existing profile data (which */
/* is the default behaviour) */
Serial.println(F("\nInitialising the CC3000 ..."));
if (!cc3000.begin(false))
{
Serial.println(F("Unable to initialise the CC3000! Check your wiring?"));
while(1);
}
uint16_t firmware = checkFirmwareVersion();
if ((firmware != 0x113) && (firmware != 0x118)) {
Serial.println(F("Wrong firmware version!"));
for(;;);
}
displayMACAddress();
/* Try to use the smart config app (no AES encryption), saving */
/* the connection details if we succeed */
Serial.println(F("Waiting for a SmartConfig connection (~60s) ..."));
if (!cc3000.startSmartConfig(DEVICE_NAME))
{
Serial.println(F("SmartConfig failed"));
while(1);
}
Serial.println(F("Saved connection details and connected to AP!"));
/* Wait for DHCP to complete */
Serial.println(F("Request DHCP"));
while (!cc3000.checkDHCP())
{
delay(100); // ToDo: Insert a DHCP timeout!
}
/* Display the IP address DNS, Gateway, etc. */
while (! displayConnectionDetails()) {
delay(1000);
}
Serial.println(F("\nTo use these connection details be sure to use"));
Serial.println(F("'.begin(false, true, DEVICE_NAME)' with your Adafruit_CC3000"));
Serial.println(F("code instead of the default '.begin()' values!"));
/* You need to make sure to clean up after yourself or the CC3000 can freak out */
/* the next time your try to connect ... */
Serial.println(F("\nClosing the connection"));
cc3000.disconnect();
}
void loop(void)
{
delay(1000);
}
/**************************************************************************/
/*!
@brief Displays the driver mode (tiny of normal), and the buffer
size if tiny mode is not being used
@note The buffer size and driver mode are defined in cc3000_common.h
*/
/**************************************************************************/
void displayDriverMode(void)
{
#ifdef CC3000_TINY_DRIVER
Serial.println(F("CC3000 is configure in 'Tiny' mode"));
#else
Serial.print(F("RX Buffer : "));
Serial.print(CC3000_RX_BUFFER_SIZE);
Serial.println(F(" bytes"));
Serial.print(F("TX Buffer : "));
Serial.print(CC3000_TX_BUFFER_SIZE);
Serial.println(F(" bytes"));
#endif
}
/**************************************************************************/
/*!
@brief Tries to read the CC3000's internal firmware patch ID
*/
/**************************************************************************/
uint16_t checkFirmwareVersion(void)
{
uint8_t major, minor;
uint16_t version;
#ifndef CC3000_TINY_DRIVER
if(!cc3000.getFirmwareVersion(&major, &minor))
{
Serial.println(F("Unable to retrieve the firmware version!\r\n"));
version = 0;
}
else
{
Serial.print(F("Firmware V. : "));
Serial.print(major); Serial.print(F(".")); Serial.println(minor);
version = major; version <<= 8; version |= minor;
}
#endif
return version;
}
/**************************************************************************/
/*!
@brief Tries to read the 6-byte MAC address of the CC3000 module
*/
/**************************************************************************/
void displayMACAddress(void)
{
uint8_t macAddress[6];
if(!cc3000.getMacAddress(macAddress))
{
Serial.println(F("Unable to retrieve MAC Address!\r\n"));
}
else
{
Serial.print(F("MAC Address : "));
cc3000.printHex((byte*)&macAddress, 6);
}
}
/**************************************************************************/
/*!
@brief Tries to read the IP address and other connection details
*/
/**************************************************************************/
bool displayConnectionDetails(void)
{
uint32_t ipAddress, netmask, gateway, dhcpserv, dnsserv;
if(!cc3000.getIPAddress(&ipAddress, &netmask, &gateway, &dhcpserv, &dnsserv))
{
Serial.println(F("Unable to retrieve the IP Address!\r\n"));
return false;
}
else
{
Serial.print(F("\nIP Addr: ")); cc3000.printIPdotsRev(ipAddress);
Serial.print(F("\nNetmask: ")); cc3000.printIPdotsRev(netmask);
Serial.print(F("\nGateway: ")); cc3000.printIPdotsRev(gateway);
Serial.print(F("\nDHCPsrv: ")); cc3000.printIPdotsRev(dhcpserv);
Serial.print(F("\nDNSserv: ")); cc3000.printIPdotsRev(dnsserv);
Serial.println();
return true;
}
}

View File

@ -1,146 +0,0 @@
/***************************************************
This is an example for the Adafruit CC3000 Wifi Breakout & Shield
Designed specifically to work with the Adafruit WiFi products:
----> https://www.adafruit.com/products/1469
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
Written by Limor Fried & Kevin Townsend for Adafruit Industries.
BSD license, all text above must be included in any redistribution
****************************************************/
/* This sketch attempts to re-connect to an AP using
data from a previous SmartConfig session (i.e. from
the SmartConfigCreate sketch!).
It will attempt to do the following:
* Initialization the CC3000
* Re-connect using previous SmartConfig data (see SmartConfigCreate)
* DHCP printout
* Disconnect
If the connection fails, there are two likely
explanations:
1.) You haven't run the SmartConfigCreate sketch and
successfully connected to a network, since this
is the process that 'saves' the AP details to the
device
2.) You've used one of the other non SmartConfig
sketches, which erase all stored profiles from
the CC3000 memory in order to manually establish
a connection using hard coded values. (This sketch
uses an optional flag in the Adafruit_CC3000.begin
function to avoid this erasure process!).
SmartConfig is still beta and kind of works but is not fully
vetted! It might not work on all networks!
*/
#include <Adafruit_CC3000.h>
#include <ccspi.h>
#include <SPI.h>
#include <string.h>
#include "utility/debug.h"
// These are the interrupt and control pins
#define ADAFRUIT_CC3000_IRQ 3 // MUST be an interrupt pin!
// These can be any two pins
#define ADAFRUIT_CC3000_VBAT 5
#define ADAFRUIT_CC3000_CS 10
#define DEVICE_NAME "CC3000"
// Use hardware SPI for the remaining pins
// On an UNO, SCK = 13, MISO = 12, and MOSI = 11
Adafruit_CC3000 cc3000 = Adafruit_CC3000(ADAFRUIT_CC3000_CS,
ADAFRUIT_CC3000_IRQ,
ADAFRUIT_CC3000_VBAT,
SPI_CLOCK_DIVIDER);
// We get the SSID & Password from memory thanks to SmartConfigCreate!
/**************************************************************************/
/*!
@brief Sets up the HW and the CC3000 module (called automatically
on startup)
*/
/**************************************************************************/
void setup(void)
{
Serial.begin(115200);
Serial.println(F("Hello, CC3000!\n"));
/* Try to reconnect using the details from SmartConfig */
/* This basically just resets the CC3000, and the auto connect */
/* tries to do it's magic if connections details are found */
Serial.println(F("Trying to reconnect using SmartConfig values ..."));
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
/* !!! Note the additional arguments in .begin that tell the !!! */
/* !!! app NOT to deleted previously stored connection details !!! */
/* !!! and reconnected using the connection details in memory! !!! */
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
if (!cc3000.begin(false, true, DEVICE_NAME))
{
Serial.println(F("Unable to re-connect!? Did you run the SmartConfigCreate"));
Serial.println(F("sketch to store your connection details?"));
while(1);
}
/* Round of applause! */
Serial.println(F("Reconnected!"));
/* Wait for DHCP to complete */
Serial.println(F("\nRequesting DHCP"));
while (!cc3000.checkDHCP()) {
delay(100); // ToDo: Insert a DHCP timeout!
}
/* Display the IP address DNS, Gateway, etc. */
while (! displayConnectionDetails()) {
delay(1000);
}
/* This is where you'd do your own thing! */
/* You need to make sure to clean up after yourself or the CC3000 can freak out */
/* the next time your try to connect ... */
Serial.println(F("\nClosing the connection"));
cc3000.disconnect();
}
void loop(void)
{
delay(1000);
}
/**************************************************************************/
/*!
@brief Tries to read the IP address and other connection details
*/
/**************************************************************************/
bool displayConnectionDetails(void)
{
uint32_t ipAddress, netmask, gateway, dhcpserv, dnsserv;
if(!cc3000.getIPAddress(&ipAddress, &netmask, &gateway, &dhcpserv, &dnsserv))
{
Serial.println(F("Unable to retrieve the IP Address!\r\n"));
return false;
}
else
{
Serial.print(F("\nIP Addr: ")); cc3000.printIPdotsRev(ipAddress);
Serial.print(F("\nNetmask: ")); cc3000.printIPdotsRev(netmask);
Serial.print(F("\nGateway: ")); cc3000.printIPdotsRev(gateway);
Serial.print(F("\nDHCPsrv: ")); cc3000.printIPdotsRev(dhcpserv);
Serial.print(F("\nDNSserv: ")); cc3000.printIPdotsRev(dnsserv);
Serial.println();
return true;
}
}

View File

@ -1,224 +0,0 @@
/***************************************************
This is an example for the Adafruit CC3000 Wifi Breakout & Shield
Designed specifically to work with the Adafruit WiFi products:
----> https://www.adafruit.com/products/1469
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
Written by Limor Fried & Kevin Townsend for Adafruit Industries.
BSD license, all text above must be included in any redistribution
****************************************************/
/*
This example does a test of the TCP client capability:
* Initialization
* Optional: SSID scan
* AP connection
* DHCP printout
* DNS lookup
* Optional: Ping
* Connect to website and print out webpage contents
* Disconnect
SmartConfig is still beta and kind of works but is not fully vetted!
It might not work on all networks!
*/
#include <Adafruit_CC3000.h>
#include <ccspi.h>
#include <SPI.h>
#include <string.h>
#include "utility/debug.h"
// These are the interrupt and control pins
#define ADAFRUIT_CC3000_IRQ 3 // MUST be an interrupt pin!
// These can be any two pins
#define ADAFRUIT_CC3000_VBAT 5
#define ADAFRUIT_CC3000_CS 10
// Use hardware SPI for the remaining pins
// On an UNO, SCK = 13, MISO = 12, and MOSI = 11
Adafruit_CC3000 cc3000 = Adafruit_CC3000(ADAFRUIT_CC3000_CS, ADAFRUIT_CC3000_IRQ, ADAFRUIT_CC3000_VBAT,
SPI_CLOCK_DIVIDER); // you can change this clock speed
#define WLAN_SSID "myNetwork" // cannot be longer than 32 characters!
#define WLAN_PASS "myPassword"
// Security can be WLAN_SEC_UNSEC, WLAN_SEC_WEP, WLAN_SEC_WPA or WLAN_SEC_WPA2
#define WLAN_SECURITY WLAN_SEC_WPA2
#define IDLE_TIMEOUT_MS 3000 // Amount of time to wait (in milliseconds) with no data
// received before closing the connection. If you know the server
// you're accessing is quick to respond, you can reduce this value.
// What page to grab!
#define WEBSITE "www.adafruit.com"
#define WEBPAGE "/testwifi/index.html"
/**************************************************************************/
/*!
@brief Sets up the HW and the CC3000 module (called automatically
on startup)
*/
/**************************************************************************/
uint32_t ip;
void setup(void)
{
Serial.begin(115200);
Serial.println(F("Hello, CC3000!\n"));
Serial.print("Free RAM: "); Serial.println(getFreeRam(), DEC);
/* Initialise the module */
Serial.println(F("\nInitializing..."));
if (!cc3000.begin())
{
Serial.println(F("Couldn't begin()! Check your wiring?"));
while(1);
}
// Optional SSID scan
// listSSIDResults();
Serial.print(F("\nAttempting to connect to ")); Serial.println(WLAN_SSID);
if (!cc3000.connectToAP(WLAN_SSID, WLAN_PASS, WLAN_SECURITY)) {
Serial.println(F("Failed!"));
while(1);
}
Serial.println(F("Connected!"));
/* Wait for DHCP to complete */
Serial.println(F("Request DHCP"));
while (!cc3000.checkDHCP())
{
delay(100); // ToDo: Insert a DHCP timeout!
}
/* Display the IP address DNS, Gateway, etc. */
while (! displayConnectionDetails()) {
delay(1000);
}
ip = 0;
// Try looking up the website's IP address
Serial.print(WEBSITE); Serial.print(F(" -> "));
while (ip == 0) {
if (! cc3000.getHostByName(WEBSITE, &ip)) {
Serial.println(F("Couldn't resolve!"));
}
delay(500);
}
cc3000.printIPdotsRev(ip);
// Optional: Do a ping test on the website
/*
Serial.print(F("\n\rPinging ")); cc3000.printIPdotsRev(ip); Serial.print("...");
replies = cc3000.ping(ip, 5);
Serial.print(replies); Serial.println(F(" replies"));
*/
/* Try connecting to the website.
Note: HTTP/1.1 protocol is used to keep the server from closing the connection before all data is read.
*/
Adafruit_CC3000_Client www = cc3000.connectTCP(ip, 80);
if (www.connected()) {
www.fastrprint(F("GET "));
www.fastrprint(WEBPAGE);
www.fastrprint(F(" HTTP/1.1\r\n"));
www.fastrprint(F("Host: ")); www.fastrprint(WEBSITE); www.fastrprint(F("\r\n"));
www.fastrprint(F("\r\n"));
www.println();
} else {
Serial.println(F("Connection failed"));
return;
}
Serial.println(F("-------------------------------------"));
/* Read data until either the connection is closed, or the idle timeout is reached. */
unsigned long lastRead = millis();
while (www.connected() && (millis() - lastRead < IDLE_TIMEOUT_MS)) {
while (www.available()) {
char c = www.read();
Serial.print(c);
lastRead = millis();
}
}
www.close();
Serial.println(F("-------------------------------------"));
/* You need to make sure to clean up after yourself or the CC3000 can freak out */
/* the next time your try to connect ... */
Serial.println(F("\n\nDisconnecting"));
cc3000.disconnect();
}
void loop(void)
{
delay(1000);
}
/**************************************************************************/
/*!
@brief Begins an SSID scan and prints out all the visible networks
*/
/**************************************************************************/
void listSSIDResults(void)
{
uint8_t valid, rssi, sec, index;
char ssidname[33];
index = cc3000.startSSIDscan();
Serial.print(F("Networks found: ")); Serial.println(index);
Serial.println(F("================================================"));
while (index) {
index--;
valid = cc3000.getNextSSID(&rssi, &sec, ssidname);
Serial.print(F("SSID Name : ")); Serial.print(ssidname);
Serial.println();
Serial.print(F("RSSI : "));
Serial.println(rssi);
Serial.print(F("Security Mode: "));
Serial.println(sec);
Serial.println();
}
Serial.println(F("================================================"));
cc3000.stopSSIDscan();
}
/**************************************************************************/
/*!
@brief Tries to read the IP address and other connection details
*/
/**************************************************************************/
bool displayConnectionDetails(void)
{
uint32_t ipAddress, netmask, gateway, dhcpserv, dnsserv;
if(!cc3000.getIPAddress(&ipAddress, &netmask, &gateway, &dhcpserv, &dnsserv))
{
Serial.println(F("Unable to retrieve the IP Address!\r\n"));
return false;
}
else
{
Serial.print(F("\nIP Addr: ")); cc3000.printIPdotsRev(ipAddress);
Serial.print(F("\nNetmask: ")); cc3000.printIPdotsRev(netmask);
Serial.print(F("\nGateway: ")); cc3000.printIPdotsRev(gateway);
Serial.print(F("\nDHCPsrv: ")); cc3000.printIPdotsRev(dhcpserv);
Serial.print(F("\nDNSserv: ")); cc3000.printIPdotsRev(dnsserv);
Serial.println();
return true;
}
}

View File

@ -1,320 +0,0 @@
/***************************************************
This is an example for the Adafruit CC3000 Wifi Breakout & Shield
Designed specifically to work with the Adafruit WiFi products:
----> https://www.adafruit.com/products/1469
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
Written by Kevin Townsend & Limor Fried for Adafruit Industries.
BSD license, all text above must be included in any redistribution
****************************************************/
/*
This example does a full test of core connectivity:
* Initialization
* SSID Scan
* AP connection
* DHCP printout
* DNS lookup
* Ping
* Disconnect
It's a good idea to run this sketch when first setting up the
module.
*/
#include <Adafruit_CC3000.h>
#include <ccspi.h>
#include <SPI.h>
#include <string.h>
#include "utility/debug.h"
// These are the interrupt and control pins
#define ADAFRUIT_CC3000_IRQ 3 // MUST be an interrupt pin!
// These can be any two pins
#define ADAFRUIT_CC3000_VBAT 5
#define ADAFRUIT_CC3000_CS 10
// Use hardware SPI for the remaining pins
// On an UNO, SCK = 13, MISO = 12, and MOSI = 11
Adafruit_CC3000 cc3000 = Adafruit_CC3000(ADAFRUIT_CC3000_CS, ADAFRUIT_CC3000_IRQ, ADAFRUIT_CC3000_VBAT,
SPI_CLOCK_DIVIDER); // you can change this clock speed but DI
#define WLAN_SSID "myNetwork" // cannot be longer than 32 characters!
#define WLAN_PASS "myPassword"
// Security can be WLAN_SEC_UNSEC, WLAN_SEC_WEP, WLAN_SEC_WPA or WLAN_SEC_WPA2
#define WLAN_SECURITY WLAN_SEC_WPA2
/**************************************************************************/
/*!
@brief Sets up the HW and the CC3000 module (called automatically
on startup)
*/
/**************************************************************************/
void setup(void)
{
Serial.begin(115200);
Serial.println(F("Hello, CC3000!\n"));
displayDriverMode();
Serial.print("Free RAM: "); Serial.println(getFreeRam(), DEC);
/* Initialise the module */
Serial.println(F("\nInitialising the CC3000 ..."));
if (!cc3000.begin())
{
Serial.println(F("Unable to initialise the CC3000! Check your wiring?"));
while(1);
}
/* Optional: Update the Mac Address to a known value */
/*
uint8_t macAddress[6] = { 0x08, 0x00, 0x28, 0x01, 0x79, 0xB7 };
if (!cc3000.setMacAddress(macAddress))
{
Serial.println(F("Failed trying to update the MAC address"));
while(1);
}
*/
uint16_t firmware = checkFirmwareVersion();
if (firmware < 0x113) {
Serial.println(F("Wrong firmware version!"));
for(;;);
}
displayMACAddress();
/* Optional: Get the SSID list (not available in 'tiny' mode) */
#ifndef CC3000_TINY_DRIVER
listSSIDResults();
#endif
/* Delete any old connection data on the module */
Serial.println(F("\nDeleting old connection profiles"));
if (!cc3000.deleteProfiles()) {
Serial.println(F("Failed!"));
while(1);
}
/* Optional: Set a static IP address instead of using DHCP.
Note that the setStaticIPAddress function will save its state
in the CC3000's internal non-volatile memory and the details
will be used the next time the CC3000 connects to a network.
This means you only need to call the function once and the
CC3000 will remember the connection details. To switch back
to using DHCP, call the setDHCP() function (again only needs
to be called once).
*/
/*
uint32_t ipAddress = cc3000.IP2U32(192, 168, 1, 19);
uint32_t netMask = cc3000.IP2U32(255, 255, 255, 0);
uint32_t defaultGateway = cc3000.IP2U32(192, 168, 1, 1);
uint32_t dns = cc3000.IP2U32(8, 8, 4, 4);
if (!cc3000.setStaticIPAddress(ipAddress, netMask, defaultGateway, dns)) {
Serial.println(F("Failed to set static IP!"));
while(1);
}
*/
/* Optional: Revert back from static IP addres to use DHCP.
See note for setStaticIPAddress above, this only needs to be
called once and will be remembered afterwards by the CC3000.
*/
/*
if (!cc3000.setDHCP()) {
Serial.println(F("Failed to set DHCP!"));
while(1);
}
*/
/* Attempt to connect to an access point */
char *ssid = WLAN_SSID; /* Max 32 chars */
Serial.print(F("\nAttempting to connect to ")); Serial.println(ssid);
/* NOTE: Secure connections are not available in 'Tiny' mode!
By default connectToAP will retry indefinitely, however you can pass an
optional maximum number of retries (greater than zero) as the fourth parameter.
*/
if (!cc3000.connectToAP(WLAN_SSID, WLAN_PASS, WLAN_SECURITY)) {
Serial.println(F("Failed!"));
while(1);
}
Serial.println(F("Connected!"));
/* Wait for DHCP to complete */
Serial.println(F("Request DHCP"));
while (!cc3000.checkDHCP())
{
delay(100); // ToDo: Insert a DHCP timeout!
}
/* Display the IP address DNS, Gateway, etc. */
while (! displayConnectionDetails()) {
delay(1000);
}
#ifndef CC3000_TINY_DRIVER
/* Try looking up www.adafruit.com */
uint32_t ip = 0;
Serial.print(F("www.adafruit.com -> "));
while (ip == 0) {
if (! cc3000.getHostByName("www.adafruit.com", &ip)) {
Serial.println(F("Couldn't resolve!"));
}
delay(500);
}
cc3000.printIPdotsRev(ip);
/* Do a quick ping test on adafruit.com */
Serial.print(F("\n\rPinging ")); cc3000.printIPdotsRev(ip); Serial.print("...");
uint8_t replies = cc3000.ping(ip, 5);
Serial.print(replies); Serial.println(F(" replies"));
if (replies)
Serial.println(F("Ping successful!"));
#endif
/* You need to make sure to clean up after yourself or the CC3000 can freak out */
/* the next time you try to connect ... */
Serial.println(F("\n\nClosing the connection"));
cc3000.disconnect();
}
void loop(void)
{
delay(1000);
}
/**************************************************************************/
/*!
@brief Displays the driver mode (tiny of normal), and the buffer
size if tiny mode is not being used
@note The buffer size and driver mode are defined in cc3000_common.h
*/
/**************************************************************************/
void displayDriverMode(void)
{
#ifdef CC3000_TINY_DRIVER
Serial.println(F("CC3000 is configure in 'Tiny' mode"));
#else
Serial.print(F("RX Buffer : "));
Serial.print(CC3000_RX_BUFFER_SIZE);
Serial.println(F(" bytes"));
Serial.print(F("TX Buffer : "));
Serial.print(CC3000_TX_BUFFER_SIZE);
Serial.println(F(" bytes"));
#endif
}
/**************************************************************************/
/*!
@brief Tries to read the CC3000's internal firmware patch ID
*/
/**************************************************************************/
uint16_t checkFirmwareVersion(void)
{
uint8_t major, minor;
uint16_t version;
#ifndef CC3000_TINY_DRIVER
if(!cc3000.getFirmwareVersion(&major, &minor))
{
Serial.println(F("Unable to retrieve the firmware version!\r\n"));
version = 0;
}
else
{
Serial.print(F("Firmware V. : "));
Serial.print(major); Serial.print(F(".")); Serial.println(minor);
version = major; version <<= 8; version |= minor;
}
#endif
return version;
}
/**************************************************************************/
/*!
@brief Tries to read the 6-byte MAC address of the CC3000 module
*/
/**************************************************************************/
void displayMACAddress(void)
{
uint8_t macAddress[6];
if(!cc3000.getMacAddress(macAddress))
{
Serial.println(F("Unable to retrieve MAC Address!\r\n"));
}
else
{
Serial.print(F("MAC Address : "));
cc3000.printHex((byte*)&macAddress, 6);
}
}
/**************************************************************************/
/*!
@brief Tries to read the IP address and other connection details
*/
/**************************************************************************/
bool displayConnectionDetails(void)
{
uint32_t ipAddress, netmask, gateway, dhcpserv, dnsserv;
if(!cc3000.getIPAddress(&ipAddress, &netmask, &gateway, &dhcpserv, &dnsserv))
{
Serial.println(F("Unable to retrieve the IP Address!\r\n"));
return false;
}
else
{
Serial.print(F("\nIP Addr: ")); cc3000.printIPdotsRev(ipAddress);
Serial.print(F("\nNetmask: ")); cc3000.printIPdotsRev(netmask);
Serial.print(F("\nGateway: ")); cc3000.printIPdotsRev(gateway);
Serial.print(F("\nDHCPsrv: ")); cc3000.printIPdotsRev(dhcpserv);
Serial.print(F("\nDNSserv: ")); cc3000.printIPdotsRev(dnsserv);
Serial.println();
return true;
}
}
/**************************************************************************/
/*!
@brief Begins an SSID scan and prints out all the visible networks
*/
/**************************************************************************/
void listSSIDResults(void)
{
uint8_t valid, rssi, sec, index;
char ssidname[33];
index = cc3000.startSSIDscan();
Serial.print(F("Networks found: ")); Serial.println(index);
Serial.println(F("================================================"));
while (index) {
index--;
valid = cc3000.getNextSSID(&rssi, &sec, ssidname);
Serial.print(F("SSID Name : ")); Serial.print(ssidname);
Serial.println();
Serial.print(F("RSSI : "));
Serial.println(rssi);
Serial.print(F("Security Mode: "));
Serial.println(sec);
Serial.println();
}
Serial.println(F("================================================"));
cc3000.stopSSIDscan();
}

View File

@ -1,347 +0,0 @@
// This driver patcher will take 1.11.1 firmware modules up to 1.12
// It seems to work, but it is 100% not guaranteed! Based on the TI driver patch
// code for MSP430 - ladyada
// If you fail halfway thru update, you may have to restart and you may have lost
// the MAC address in EEPROM so before you begin, write down your mac address!
// You can re-burn the mac address in the buildtest example
#include <Adafruit_CC3000.h>
#include <ccspi.h>
#include <SPI.h>
#include <string.h>
#include <EEPROM.h>
#include "utility/debug.h"
#include "utility/nvmem.h"
#include "driverpatchinc.h"
#define ADAFRUIT_CC3000_IRQ 3 // MUST be an interrupt pin!
#define ADAFRUIT_CC3000_CS 10
#define ADAFRUIT_CC3000_VBAT 5
Adafruit_CC3000 cc3000 = Adafruit_CC3000(ADAFRUIT_CC3000_CS, ADAFRUIT_CC3000_IRQ, ADAFRUIT_CC3000_VBAT);
/**************************************************************************/
/*!
@brief Displays the driver mode (tiny of normal), and the buffer
size if tiny mode is not being used
@note The buffer size and driver mode are defined in cc3000_common.h
*/
/**************************************************************************/
void displayDriverMode(void)
{
#ifdef CC3000_TINY_DRIVER
Serial.println(F("CC3000 is configure in 'Tiny' mode"));
#else
Serial.print(F("RX Buffer : "));
Serial.print(CC3000_RX_BUFFER_SIZE);
Serial.println(F(" bytes"));
Serial.print(F("TX Buffer : "));
Serial.print(CC3000_TX_BUFFER_SIZE);
Serial.println(F(" bytes"));
#endif
}
/**************************************************************************/
/*!
@brief Tries to read the CC3000's internal firmware patch ID
*/
/**************************************************************************/
void displayFirmwareVersion(void)
{
#ifndef CC3000_TINY_DRIVER
uint8_t major, minor;
if(!cc3000.getFirmwareVersion(&major, &minor))
{
Serial.println(F("Unable to retrieve the firmware version!\r\n"));
}
else
{
Serial.print(F("Firmware V. : "));
Serial.print(major); Serial.print(F(".")); Serial.println(minor);
}
#endif
}
/**************************************************************************/
/*!
@brief Tries to read the 6-byte MAC address of the CC3000 module
*/
/**************************************************************************/
boolean MACvalid = false;
// array to store MAC address from EEPROM
uint8_t cMacFromEeprom[MAC_ADDR_LEN];
void displayMACAddress(void)
{
if(!cc3000.getMacAddress(cMacFromEeprom))
{
Serial.println(F("Unable to retrieve MAC Address!\r\n"));
MACvalid = false;
}
else
{
Serial.print(F("MAC Address : "));
cc3000.printHex((byte*)&cMacFromEeprom, 6);
MACvalid = true;
}
}
/**************************************************************************/
/*!
@brief Sets up the HW and the CC3000 module (called automatically
on startup)
*/
/**************************************************************************/
uint8_t ucStatus_Dr, return_status = 0xFF;
uint8_t counter = 0;
// array to store RM parameters from EEPROM
unsigned char cRMParamsFromEeprom[128];
// 2 dim array to store address and length of new FAT
uint16_t aFATEntries[2][NVMEM_RM_FILEID + 1] =
/* address */ {{0x50, 0x1f0, 0x1390, 0x0390, 0x2390, 0x4390, 0x6390, 0x63a0, 0x63b0, 0x63f0, 0x6430, 0x6830},
/* length */ {0x1a0, 0x1a0, 0x1000, 0x1000, 0x2000, 0x2000, 0x10, 0x10, 0x40, 0x40, 0x400, 0x200 }};
/* 0. NVS */
/* 1. NVS Shadow */
/* 2. Wireless Conf */
/* 3. Wireless Conf Shadow */
/* 4. BT (WLAN driver) Patches */
/* 5. WiLink (Firmware) Patches */
/* 6. MAC addr */
/* 7. Frontend Vars */
/* 8. IP config */
/* 9. IP config Shadow */
/* 10. Bootloader Patches */
/* 11. Radio Module params */
/* 12. AES128 for smart config */
/* 13. user file */
/* 14. user file */
/* 15. user file */
void setup(void)
{
Serial.begin(115200);
Serial.println(F("Hello, CC3000!\n"));
Serial.println(F("Hit any key & return to start"));
while (!Serial.available());
pinMode(9, OUTPUT);
pinMode(8, OUTPUT);
pinMode(7, OUTPUT);
pinMode(6, OUTPUT);
digitalWrite(9, LOW);
digitalWrite(8, LOW);
digitalWrite(7, LOW);
digitalWrite(6, LOW);
displayDriverMode();
displayFreeRam();
/* Initialise the module */
Serial.println(F("\nInitialising the CC3000 ..."));
if (!cc3000.begin(2)) // init with NO patches!
{
Serial.println(F("Unable to initialise the CC3000! Check your wiring?"));
while(1);
}
//displayFirmwareVersion();
displayMACAddress();
return_status = 1;
uint8_t index;
uint8_t *pRMParams;
while ((return_status) && (counter < 3)) {
// read RM parameters
// read in 16 parts to work with tiny driver
return_status = 0;
pRMParams = cRMParamsFromEeprom;
for (index = 0; index < 16; index++) {
return_status |= nvmem_read(NVMEM_RM_FILEID, 8, 8*index, pRMParams);
Serial.print(F("\n\rRead NVRAM $")); Serial.print(8*index); Serial.print("\t");
for(uint8_t x=0; x<8; x++) {
Serial.print("0x"); Serial.print(pRMParams[x], HEX); Serial.print(", ");
}
pRMParams += 8;
}
counter++;
}
// if RM file is not valid, load the default one
if (counter == 3) {
Serial.println(F("\n\rLoad default params"));
pRMParams = (uint8_t *)cRMdefaultParams;
} else {
Serial.println(F("\n\rLoad EEPROM params"));
pRMParams = cRMParamsFromEeprom;
if (EEPROM.read(0) == 0xFF) {
for (uint8_t e=0; e<128; e++) {
EEPROM.write(e, cRMParamsFromEeprom[e]);
}
Serial.println(F("Backed up to eeprom!"));
}
}
return_status = 1;
while (return_status) {
// write new FAT
return_status = fat_write_content(aFATEntries[0], aFATEntries[1]);
Serial.print(F("Wrote FAT entries: ")); Serial.println(return_status, DEC);
}
//Serial.println(F("Stopping..."));
//cc3000.stop();
//Serial.println(F("\nInitialising the CC3000 ..."));
//if (!cc3000.begin(2)) // no patches!
//{
// Serial.println(F("Unable to initialise the CC3000! Check your wiring?"));
// while(1);
//}
return_status = 1;
Serial.println(F("Write params"));
while (return_status) {
// write RM parameters
// write in 4 parts to work with tiny driver
return_status = 0;
for (index = 0; index < 4; index++) {
return_status |= nvmem_write(NVMEM_RM_FILEID, 32, 32*index, (pRMParams + 32*index));
Serial.println(F("Wrote 32 bytes to NVRAM"));
}
}
Serial.println(F("Wrote params"));
return_status = 1;
// write back the MAC address, only if exist
if (MACvalid) {
// zero out MCAST bit if set
cMacFromEeprom[0] &= 0xfe;
while (return_status) {
return_status = nvmem_set_mac_address(cMacFromEeprom);
}
}
ucStatus_Dr = 1;
Serial.println(F("Writing driver patch"));
while (ucStatus_Dr) {
//writing driver patch to EEPRROM - PROTABLE CODE
// Note that the array itself is changing between the different Service Packs
ucStatus_Dr = nvmem_write_patch(NVMEM_WLAN_DRIVER_SP_FILEID, drv_length, wlan_drv_patch);
}
Serial.println(F("Wrote driver patch"));
Serial.println(F("Starting w/o patches"));
//if (!cc3000.begin(2))
//{
// Serial.println(F("Unable to initialise the CC3000! Check your wiring?"));
// while(1);
//}
Serial.println(F("Writing firmware"));
unsigned char ucStatus_FW = 1;
while (ucStatus_FW) {
//writing FW patch to EAPRROM - PROTABLE CODE
//Note that the array itself is changing between the different Service Packs
ucStatus_FW = nvmem_write_patch(NVMEM_WLAN_FW_SP_FILEID, fw_length, fw_patch);
}
Serial.println(F("Starting w/patches"));
cc3000.reboot();
/*
if (!)
{
Serial.println(F("Unable to initialise the CC3000! Check your wiring?"));
while(1);
}
*/
Serial.println(F("Patched!"));
displayFirmwareVersion();
displayMACAddress();
}
//*****************************************************************************
//
//! fat_write_content
//!
//! \param[in] file_address array of file address in FAT table:\n
//! this is the absolute address of the file in the EEPROM.
//! \param[in] file_length array of file length in FAT table:\n
//! this is the upper limit of the file size in the EEPROM.
//!
//! \return on succes 0, error otherwise
//!
//! \brief parse the FAT table from eeprom
//
//*****************************************************************************
uint8_t fat_write_content(uint16_t *file_address, uint16_t *file_length)
{
uint16_t index = 0;
uint8_t ucStatus;
uint8_t fatTable[48];
uint8_t* fatTablePtr = fatTable;
uint8_t LS[3] = "LS";
// first, write the magic number
ucStatus = nvmem_write(16, 2, 0, LS);
for (; index <= NVMEM_RM_FILEID; index++)
{
// write address low char and mark as allocated
*fatTablePtr++ = (uint8_t)(file_address[index] & 0xff) | _BV(0);
// write address high char
*fatTablePtr++ = (uint8_t)((file_address[index]>>8) & 0xff);
// write length low char
*fatTablePtr++ = (uint8_t)(file_length[index] & 0xff);
// write length high char
*fatTablePtr++ = (uint8_t)((file_length[index]>>8) & 0xff);
}
// second, write the FAT
// write in two parts to work with tiny driver
ucStatus = nvmem_write(16, 24, 4, fatTable);
ucStatus = nvmem_write(16, 24, 24+4, &fatTable[24]);
// third, we want to erase any user files
memset(fatTable, 0, sizeof(fatTable));
ucStatus = nvmem_write(16, 16, 52, fatTable);
return ucStatus;
}
void loop(void)
{
delay(1000);
}

View File

@ -1,104 +0,0 @@
//Service Pack version P1.12.7.15.26 - Driver patches
uint8_t cRMdefaultParams[128] = { 0x03, 0x00, 0x01, 0x01, 0x14, 0x14, 0x00, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x23, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x23, 0x23, 0x23, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x01, 0x77, 0x80, 0x1D, 0x1F, 0x22, 0x26, 0x28, 0x29, 0x1A, 0x1F, 0x22, 0x24, 0x26, 0x28, 0x16, 0x1D, 0x1E, 0x20, 0x24, 0x25, 0x1E, 0x2D, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x15, 0x15, 0x15, 0x11, 0x15, 0x15, 0x0E, 0x00};
unsigned char PROGMEM wlan_drv_patch[8076] = { 0x00, 0x01, 0x00, 0x00, 0x84, 0x1F, 0x00, 0x00, 0xF0, 0x03, 0x18, 0x00, 0xE4, 0x62, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x7A, 0x63, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x10, 0x64, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x20, 0x0C, 0x49, 0x08, 0x60, 0x0C, 0x48, 0x19, 0x30, 0xF7, 0x46, 0x30, 0xB5, 0x05, 0x1C, 0xAC, 0x69, 0x68, 0x68, 0x5F, 0x30, 0x09, 0xD1, 0x60, 0x6B, 0x0C, 0x38, 0x01, 0x21, 0x8E, 0x46, 0x06, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x00, 0x20, 0x60, 0x63, 0xAC, 0x69, 0x6C, 0x60, 0x04, 0x48, 0x5B, 0x30, 0x30, 0xBD, 0x40, 0x3B, 0x08, 0x00, 0x49, 0xD0, 0x01, 0x00, 0x09, 0xEA, 0x02, 0x00, 0x91, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xA6, 0x64, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x3C, 0x65, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xB5, 0x85, 0xB0, 0x05, 0x1C, 0xA8, 0x88, 0x00, 0x90, 0x28, 0x89, 0x01, 0x90, 0xE9, 0x68, 0x02, 0x91, 0x28, 0x7C, 0x03, 0x90, 0x2A, 0x6A, 0x00, 0x20, 0x17, 0x56, 0x68, 0x60, 0x00, 0x29, 0x4C, 0xD0, 0x00, 0x2F, 0x4A, 0xDC ,
0xCA, 0x49, 0x0C, 0x1C, 0x08, 0x26, 0x04, 0x90, 0x21, 0x88, 0x00, 0x98, 0x81, 0x42, 0x0C, 0xD1, 0x62, 0x88, 0x01, 0x98, 0x82, 0x42, 0x08, 0xD1, 0x46, 0x20, 0x02, 0x5D, 0x03, 0x98, 0x82, 0x42, 0x03, 0xD1, 0x0E, 0x20, 0x00, 0x57, 0xB8, 0x42, 0x0A, 0xD0, 0x46, 0x20, 0x00, 0x5D, 0x11, 0x28, 0x22, 0xD1, 0x00, 0x98, 0x81, 0x42, 0x1F, 0xD1, 0x0E, 0x20, 0x00, 0x57, 0xFF, 0xFF, 0xD2, 0x65, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0xB8, 0x42, 0x1B, 0xD1, 0x04, 0x20, 0x02, 0x1C, 0x02, 0x98, 0xB9, 0x49, 0x01, 0x23, 0x9E, 0x46, 0xEA, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x00, 0x28, 0x17, 0xD0, 0x20, 0x1D, 0x02, 0x99, 0x04, 0x22, 0x01, 0x23, 0x9E, 0x46, 0xE5, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x00, 0x28, 0x0D, 0xD0, 0x46, 0x20, 0x00, 0x5D, 0x11, 0x28, 0x09, 0xD0, 0xA0, 0x6D, 0x00, 0x28, 0x06, 0xD0, 0xAC, 0x34, 0x04, 0x98, 0x01, 0x30, 0x04, 0x90, 0x01, 0x3E, 0xC1, 0xD1, 0x07, 0xE0, 0x04, 0x98, 0x00, 0x06, 0x00, 0x0E ,
0xAC, 0x21, 0x41, 0x43, 0xA6, 0x48, 0x40, 0x18, 0x68, 0x60, 0xA6, 0x48, 0xAD, 0x30, 0x05, 0xB0, 0xF0, 0xBD, 0x00, 0xB5, 0xC2, 0x68, 0x90, 0x69, 0x02, 0x21, 0x01, 0x23, 0x9E, 0x46, 0xA2, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0xA2, 0x48, 0x61, 0x30, 0x00, 0xBD, 0x01, 0x79, 0x0B, 0x29, 0x03, 0xD0, 0x89, 0x00, 0x9F, 0x4A, 0x51, 0x5A, 0x01, 0xE0, 0x01, 0x21, 0x49, 0x02, 0x41, 0x60, 0x9D, 0x48, 0x0D, 0x30, 0xF7, 0x46, 0x01, 0x1C, 0xFF, 0xFF, 0x68, 0x66, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x9C, 0x48, 0x02, 0x68, 0x9C, 0x48, 0x01, 0x2A, 0x01, 0xD1, 0x25, 0x30, 0xF7, 0x46, 0x9B, 0x4A, 0x12, 0x68, 0x4A, 0x60, 0x19, 0x30, 0xF7, 0x46, 0x00, 0x21, 0x41, 0x60, 0x99, 0x48, 0x98, 0x49, 0x08, 0x18, 0xF7, 0x46, 0x00, 0x21, 0x41, 0x60, 0x97, 0x48, 0xE5, 0x49, 0x08, 0x18, 0xF7, 0x46, 0xFF, 0xB5, 0x46, 0x69, 0x40, 0x68, 0x01, 0x90, 0x94, 0x49, 0x0A, 0x7C, 0x9A, 0x4F, 0x01, 0x2A, 0x63, 0xD0, 0x09, 0x7C, 0x03, 0x29 ,
0x60, 0xD0, 0x91, 0x4A, 0x92, 0x4B, 0x00, 0x21, 0x02, 0x91, 0x59, 0x56, 0x24, 0x23, 0x59, 0x43, 0x53, 0x18, 0x03, 0x93, 0x01, 0x28, 0x17, 0xD1, 0x8A, 0x18, 0x04, 0x23, 0x6C, 0x46, 0x8C, 0x49, 0x15, 0x79, 0x08, 0x78, 0xC0, 0x43, 0x28, 0x43, 0x20, 0x70, 0x01, 0x32, 0x01, 0x31, 0x01, 0x34, 0x01, 0x3B, 0xF5, 0xD1, 0x31, 0x1D, 0x68, 0x46, 0x04, 0x22, 0x01, 0x23, 0x9E, 0x46, 0xA7, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x00, 0x28, 0x40, 0xD0, 0x35, 0x1D, 0x82, 0x48, 0x00, 0x78, 0xFF, 0x28, 0xFF, 0xFF, 0xFE, 0x66, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x11, 0xD0, 0x00, 0x28, 0x0F, 0xD0, 0x03, 0x98, 0x01, 0x1D, 0x28, 0x1C, 0x01, 0x24, 0xA6, 0x46, 0x7E, 0x4A, 0xFE, 0x44, 0x10, 0x47, 0x00, 0x28, 0x05, 0xD1, 0x7A, 0x48, 0xA6, 0x46, 0x7B, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x05, 0xE0, 0x28, 0x1C, 0x01, 0x21, 0x8E, 0x46, 0x78, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x01, 0x99, 0x01, 0x29, 0x01, 0xD1, 0x00, 0x28, 0x1E, 0xD1 ,
0x01, 0x99, 0x5F, 0x31, 0x01, 0xD0, 0x00, 0x28, 0x0F, 0xD1, 0xA8, 0x20, 0x81, 0x5D, 0x00, 0x29, 0x08, 0xD0, 0x49, 0x1E, 0x81, 0x55, 0x80, 0x5D, 0x00, 0x28, 0x09, 0xD1, 0x38, 0x1C, 0xFF, 0x30, 0x08, 0x30, 0x11, 0xE0, 0x03, 0x21, 0x02, 0x91, 0x00, 0xE0, 0xA8, 0x20, 0x02, 0x99, 0x81, 0x55, 0x38, 0x1C, 0xFF, 0x30, 0x16, 0x30, 0x07, 0xE0, 0x01, 0x98, 0x01, 0x28, 0x02, 0xD1, 0x38, 0x1C, 0xA3, 0x30, 0x01, 0xE0, 0x38, 0x1C, 0x9F, 0x30, 0x00, 0x90, 0xFF, 0xBD, 0x00, 0xB5, 0x02, 0x1C, 0x10, 0x6A, 0xD1, 0x69, 0x52, 0x69, 0xC3, 0x69, 0x5A, 0x60, 0xFF, 0xFF, 0x94, 0x67, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x01, 0x22, 0x96, 0x46, 0x5E, 0x4A, 0xFE, 0x44, 0x10, 0x47, 0x5E, 0x48, 0xFF, 0x30, 0x6E, 0x30, 0x00, 0xBD, 0x10, 0xB5, 0x0A, 0x1C, 0x41, 0x69, 0x00, 0x6A, 0x93, 0x69, 0xDB, 0x69, 0x58, 0x60, 0x90, 0x69, 0x01, 0x24, 0xA6, 0x46, 0x56, 0x4A, 0xFE, 0x44, 0x10, 0x47, 0xA6, 0x46, 0x56, 0x48, 0xFE, 0x44 ,
0x00, 0x47, 0x55, 0x48, 0xFF, 0x30, 0xB6, 0x30, 0x10, 0xBD, 0x70, 0xB5, 0x05, 0x1C, 0x6E, 0x69, 0x53, 0x48, 0x02, 0x68, 0x5C, 0x21, 0x88, 0x5D, 0x04, 0x28, 0x15, 0xD1, 0x07, 0x20, 0x88, 0x55, 0x10, 0x0B, 0x11, 0xD2, 0x01, 0x24, 0xA6, 0x46, 0x4E, 0x48, 0xFE, 0x44, 0x00, 0x47, 0x00, 0x28, 0x0A, 0xD0, 0x47, 0x21, 0x89, 0x57, 0xC1, 0x60, 0x11, 0x21, 0xC9, 0x02, 0x00, 0x22, 0x04, 0x23, 0xA6, 0x46, 0x48, 0x4C, 0xFE, 0x44, 0x20, 0x47, 0x01, 0x20, 0x68, 0x60, 0x43, 0x48, 0x46, 0x49, 0x08, 0x18, 0x70, 0xBD, 0x70, 0xB5, 0x05, 0x1C, 0xAE, 0x69, 0x9C, 0x20, 0x80, 0x19, 0x4B, 0x21, 0x89, 0x00, 0x01, 0x24, 0xFF, 0xFF, 0x2A, 0x68, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0xA6, 0x46, 0x41, 0x4A, 0xFE, 0x44, 0x10, 0x47, 0x5C, 0x21, 0x88, 0x5D, 0x07, 0x28, 0x01, 0xD1, 0x09, 0x20, 0x00, 0xE0, 0x05, 0x20, 0xAA, 0x69, 0x88, 0x54, 0x30, 0x1C, 0xA6, 0x46, 0xEA, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x68, 0x60, 0xE9, 0x48 ,
0x4D, 0x30, 0x70, 0xBD, 0xF0, 0xB5, 0x41, 0x68, 0x82, 0x68, 0x88, 0x23, 0x5E, 0x18, 0x37, 0x88, 0x0B, 0x6F, 0x00, 0x2B, 0x01, 0xD1, 0x00, 0x2F, 0x10, 0xD1, 0x06, 0x2F, 0x02, 0xDD, 0x00, 0x21, 0xC9, 0x43, 0x07, 0xE0, 0x33, 0x88, 0x9B, 0x00, 0xC9, 0x18, 0x0A, 0x67, 0x31, 0x88, 0x01, 0x31, 0x31, 0x80, 0x01, 0x21, 0x81, 0x60, 0xEA, 0x48, 0x1D, 0x30, 0xF0, 0xBD, 0x0B, 0x1C, 0x01, 0x24, 0x5D, 0x6F, 0x1D, 0x67, 0x04, 0x33, 0x01, 0x34, 0x06, 0x2C, 0xE1, 0xDA, 0xF8, 0xE7, 0x00, 0xB5, 0x00, 0x21, 0xC1, 0x60, 0xEB, 0x48, 0x01, 0x68, 0x10, 0x31, 0xE8, 0x48, 0x20, 0x22, 0x01, 0x23, 0x9E, 0x46, 0xE9, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0xE7, 0x48, 0xFB, 0x30, 0x00, 0xBD, 0xFF, 0xFF, 0xC0, 0x68, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x14, 0x0D, 0x1B, 0x00, 0x54, 0x19, 0x1B, 0x00, 0x91, 0x1A, 0x01, 0x00, 0x4B, 0xAD, 0x03, 0x00, 0x61, 0x4E, 0x01, 0x00, 0x06, 0x32, 0x08, 0x00, 0x1F, 0x0B, 0x02, 0x00, 0x54, 0x3F ,
0x08, 0x00, 0x45, 0xC1, 0x00, 0x00, 0x84, 0x3C, 0x08, 0x00, 0x1B, 0x02, 0x00, 0x00, 0xED, 0x17, 0x00, 0x00, 0xF3, 0xC1, 0x01, 0x00, 0x34, 0x19, 0x1B, 0x00, 0x08, 0x19, 0x1B, 0x00, 0xA6, 0x44, 0x08, 0x00, 0x1C, 0x17, 0x1B, 0x00, 0x18, 0x17, 0x1B, 0x00, 0xCB, 0x67, 0x03, 0x00, 0x0D, 0x47, 0x02, 0x00, 0x39, 0x42, 0x03, 0x00, 0xBD, 0xE7, 0x02, 0x00, 0xB1, 0x40, 0x03, 0x00, 0xB9, 0xEA, 0x01, 0x00, 0x45, 0xDA, 0x00, 0x00, 0x24, 0x41, 0x08, 0x00, 0x71, 0xC0, 0x02, 0x00, 0x7B, 0xC0, 0x02, 0x00, 0x9F, 0x03, 0x00, 0x00, 0x7D, 0xB8, 0x03, 0x00, 0xF0, 0xB5, 0x88, 0xB0, 0x06, 0x91, 0x07, 0x90, 0x86, 0x69, 0xF0, 0x1C, 0xE5, 0xA1, 0x04, 0x22, 0x01, 0x24, 0xA6, 0x46, 0x0F, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x00, 0x28, 0x40, 0xD1, 0xFF, 0xFF, 0x56, 0x69, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0xF3, 0x79, 0xE3, 0x48, 0x1A, 0x1C, 0x03, 0x70, 0x30, 0x7A, 0x00, 0x90, 0x70, 0x7A, 0x01, 0x90, 0x03, 0x20, 0x2F, 0x49 ,
0xF0, 0x31, 0xA6, 0x46, 0xDF, 0x4D, 0xFE, 0x44, 0x28, 0x47, 0xF2, 0x79, 0x35, 0x7A, 0x77, 0x7A, 0x78, 0x1B, 0x43, 0x1C, 0x93, 0x42, 0x1E, 0xD0, 0x16, 0x2A, 0x0F, 0xDB, 0x00, 0x2D, 0x0D, 0xD1, 0x01, 0xE0, 0x8F, 0xC6, 0x03, 0x00, 0xDB, 0x48, 0x04, 0x70, 0x0A, 0x20, 0x81, 0x19, 0xD5, 0x48, 0x1A, 0x1C, 0xA6, 0x46, 0xAF, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x82, 0xE0, 0xD7, 0x48, 0x04, 0x70, 0xD1, 0x48, 0x40, 0x19, 0x0A, 0x21, 0x89, 0x19, 0x7A, 0x1B, 0x52, 0x1C, 0xA6, 0x46, 0xA8, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x75, 0xE0, 0xCF, 0x48, 0x04, 0x70, 0xCF, 0x48, 0x04, 0x70, 0x0A, 0x20, 0x81, 0x19, 0xC8, 0x48, 0xA6, 0x46, 0xA2, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x69, 0xE0, 0xF0, 0x1C, 0x03, 0x27, 0xC1, 0xA1, 0x3A, 0x1C, 0xA6, 0x46, 0xCC, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x00, 0x28, 0x5F, 0xD1, 0xFF, 0xFF, 0xEC, 0x69, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0xFF, 0xE7, 0xF1, 0x79, 0xC0, 0x48, 0x01, 0x70, 0xC0, 0x4D ,
0xB2, 0x79, 0x2A, 0x70, 0x38, 0x1C, 0x0A, 0x49, 0xF4, 0x31, 0xA6, 0x46, 0xBE, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x28, 0x78, 0x00, 0x28, 0x0E, 0xD1, 0xBE, 0x48, 0x04, 0x70, 0xBE, 0x48, 0x04, 0x70, 0x38, 0x1C, 0x03, 0x49, 0xF5, 0x31, 0xA6, 0x46, 0xBC, 0x4A, 0xFE, 0x44, 0x10, 0x47, 0x02, 0xE0, 0xC0, 0x46, 0xC7, 0x04, 0x00, 0x00, 0x30, 0x7A, 0x00, 0x90, 0x70, 0x7A, 0x01, 0x90, 0xAF, 0x48, 0x02, 0x78, 0xF3, 0x79, 0x38, 0x1C, 0xB6, 0x49, 0xF6, 0x31, 0xA6, 0x46, 0xAA, 0x4D, 0xFE, 0x44, 0x28, 0x47, 0x23, 0x1C, 0xF2, 0x79, 0x37, 0x7A, 0x70, 0x7A, 0xC1, 0x1B, 0x4D, 0x1C, 0x95, 0x42, 0x1E, 0xD0, 0xA6, 0x49, 0x09, 0x78, 0x16, 0x29, 0x0C, 0xDB, 0x00, 0x2F, 0x0A, 0xD1, 0xA8, 0x48, 0x03, 0x70, 0x0A, 0x20, 0x81, 0x19, 0xE7, 0x48, 0x2A, 0x1C, 0xA6, 0x46, 0x7A, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x18, 0xE0, 0xA4, 0x49, 0x0B, 0x70, 0xE3, 0x49, 0xCB, 0x19, 0xFF, 0xFF, 0x82, 0x6A, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00 ,
0x0A, 0x21, 0x89, 0x19, 0xC0, 0x1B, 0x42, 0x1C, 0x18, 0x1C, 0xA6, 0x46, 0x73, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x0A, 0xE0, 0x9C, 0x48, 0x03, 0x70, 0x9C, 0x48, 0x03, 0x70, 0x0A, 0x20, 0x81, 0x19, 0xDA, 0x48, 0xA6, 0x46, 0x6D, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x94, 0x48, 0x00, 0x78, 0x00, 0x28, 0x0A, 0xD0, 0x93, 0x48, 0x00, 0x78, 0x00, 0x28, 0x06, 0xD0, 0x92, 0x48, 0x00, 0x78, 0x00, 0x28, 0x02, 0xD0, 0x91, 0x48, 0x00, 0x78, 0x00, 0x28, 0x00, 0xD1, 0x8C, 0xE0, 0x03, 0x20, 0x17, 0x21, 0x89, 0x01, 0xA6, 0x46, 0x8E, 0x4A, 0xFE, 0x44, 0x10, 0x47, 0x85, 0x48, 0x01, 0x78, 0x85, 0x48, 0x07, 0x78, 0x82, 0x4E, 0x80, 0x4D, 0xDF, 0x48, 0x00, 0x68, 0x00, 0x28, 0x2E, 0xD1, 0x07, 0x98, 0x41, 0x61, 0x06, 0x62, 0xC5, 0x48, 0x06, 0x9A, 0x10, 0x64, 0x02, 0x2F, 0x01, 0xD0, 0x03, 0x2F, 0x01, 0xD1, 0x03, 0x22, 0x00, 0xE0, 0x3A, 0x1C, 0x06, 0x9B, 0xDA, 0x63, 0x2A, 0x78, 0x9A, 0x63, 0x01, 0x2F, 0x03, 0xD1, 0x05, 0x29 ,
0xFF, 0xFF, 0x18, 0x6B, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x04, 0xD0, 0x0D, 0x29, 0x02, 0xD0, 0xEB, 0x48, 0xDB, 0x30, 0x64, 0xE0, 0x00, 0x25, 0x00, 0x95, 0x01, 0x91, 0x02, 0x96, 0x03, 0x95, 0x04, 0x90, 0x2B, 0x1C, 0x20, 0x1C, 0x01, 0x1C, 0x8E, 0x46, 0xE5, 0x4E, 0xFE, 0x44, 0x30, 0x47, 0xE5, 0x48, 0x04, 0x60, 0x28, 0x1C, 0xA6, 0x46, 0xE4, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x4C, 0xE0, 0x0D, 0x27, 0x00, 0x20, 0x39, 0x1C, 0x05, 0xAA, 0xA6, 0x46, 0xE1, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x68, 0x46, 0x80, 0x8A, 0x40, 0x08, 0x05, 0xD2, 0x38, 0x1C, 0x50, 0x21, 0xA6, 0x46, 0xDB, 0x4A, 0xFE, 0x44, 0x10, 0x47, 0x38, 0x1C, 0x23, 0x1C, 0x29, 0x1C, 0x00, 0x22, 0x9E, 0x46, 0xEE, 0x4F, 0xFE, 0x44, 0x38, 0x47, 0x2B, 0x78, 0x0D, 0x20, 0x31, 0x1C, 0x22, 0x1C, 0x96, 0x46, 0xEA, 0x4E, 0xFE, 0x44, 0x30, 0x47, 0x28, 0x78, 0x01, 0x30, 0x02, 0x1C, 0x0D, 0x20, 0x56, 0x49, 0x23, 0x1C, 0x9E, 0x46, 0xE5, 0x4E, 0xFE, 0x44 ,
0x30, 0x47, 0x54, 0x4E, 0x28, 0x78, 0x02, 0x30, 0x02, 0x1C, 0xFF, 0xFF, 0xAE, 0x6B, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x0D, 0x20, 0x31, 0x1C, 0x23, 0x1C, 0x9E, 0x46, 0xE0, 0x4F, 0xFE, 0x44, 0x38, 0x47, 0x30, 0x78, 0x00, 0x28, 0x0A, 0xD0, 0x28, 0x78, 0x03, 0x30, 0x02, 0x1C, 0x4A, 0x48, 0x03, 0x78, 0x0D, 0x20, 0x8F, 0x49, 0xA6, 0x46, 0xD9, 0x4D, 0xFE, 0x44, 0x28, 0x47, 0xBE, 0x48, 0x21, 0x1C, 0x01, 0x60, 0x00, 0x20, 0x8E, 0x46, 0xBD, 0x49, 0xFE, 0x44, 0x08, 0x47, 0xB8, 0x48, 0xEB, 0x49, 0x08, 0x18, 0x08, 0xB0, 0xF0, 0xBD, 0xC0, 0x46, 0xC9, 0x21, 0x01, 0x00, 0x91, 0xE1, 0x00, 0x00, 0x01, 0x1C, 0xE7, 0x48, 0x02, 0x68, 0xE7, 0x48, 0x00, 0x2A, 0x04, 0xD0, 0x00, 0x22, 0x0A, 0x62, 0x8A, 0x61, 0x1D, 0x30, 0xF7, 0x46, 0xD7, 0x30, 0xF7, 0x46, 0x01, 0x1C, 0xE2, 0x48, 0x02, 0x68, 0xE2, 0x48, 0x00, 0x2A, 0x02, 0xD0, 0xFF, 0x30, 0xB4, 0x30, 0xF7, 0x46, 0x00, 0x22, 0xCA, 0x61, 0x8A, 0x61, 0x4F, 0x30 ,
0xF7, 0x46, 0xC0, 0x46, 0x89, 0x17, 0x02, 0x00, 0xDC, 0x48, 0x01, 0x68, 0x8A, 0x69, 0x01, 0x20, 0xC0, 0x03, 0x10, 0x43, 0xFF, 0xFF, 0x44, 0x6C, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x88, 0x61, 0x00, 0x20, 0x08, 0x61, 0xD9, 0x48, 0x23, 0x30, 0xF7, 0x46, 0x46, 0x17, 0x1B, 0x00, 0x30, 0x3F, 0x08, 0x00, 0x41, 0xEB, 0x00, 0x00, 0x09, 0xB4, 0x03, 0x00, 0x70, 0xB5, 0x05, 0x1C, 0xD3, 0x4E, 0x29, 0x6A, 0xEA, 0x69, 0x30, 0x1C, 0x01, 0x24, 0xA6, 0x46, 0xD4, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x68, 0x69, 0xA6, 0x46, 0xCF, 0x49, 0xFE, 0x44, 0x08, 0x47, 0xA8, 0x69, 0x06, 0x30, 0xA8, 0x60, 0xCD, 0x48, 0x00, 0x68, 0x68, 0x60, 0xEE, 0x60, 0xCC, 0x48, 0x6D, 0x30, 0x70, 0xBD, 0x30, 0xB5, 0xF1, 0x48, 0x01, 0x6D, 0x80, 0x6C, 0x08, 0x43, 0x18, 0xD0, 0xEF, 0x49, 0x08, 0x1C, 0x07, 0x22, 0xFF, 0x23, 0x09, 0x33, 0x1B, 0x58, 0x00, 0x2B, 0x04, 0xD0, 0xFF, 0x30, 0x1D, 0x30, 0x01, 0x3A, 0xF6, 0xD1, 0x0B, 0xE0, 0x02, 0x20 ,
0xF0, 0x4A, 0xF1, 0x4B, 0x01, 0x24, 0xA6, 0x46, 0xF0, 0x4D, 0xFE, 0x44, 0x28, 0x47, 0xA6, 0x46, 0xEF, 0x48, 0xFE, 0x44, 0x00, 0x47, 0xEF, 0x48, 0xFF, 0x30, 0x5C, 0x30, 0x30, 0xBD, 0xFF, 0xFF, 0xDA, 0x6C, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0xC0, 0x46, 0x53, 0x53, 0x49, 0x44, 0x00, 0xC0, 0x46, 0xC0, 0x4B, 0x45, 0x59, 0x00, 0xEE, 0x62, 0x08, 0x00, 0x13, 0x7F, 0x03, 0x00, 0xF0, 0x62, 0x08, 0x00, 0xEC, 0x62, 0x08, 0x00, 0xED, 0x62, 0x08, 0x00, 0xE7, 0x7E, 0x03, 0x00, 0xE8, 0x62, 0x08, 0x00, 0xE9, 0x62, 0x08, 0x00, 0xEA, 0x62, 0x08, 0x00, 0xEB, 0x62, 0x08, 0x00, 0xDD, 0x7E, 0x03, 0x00, 0x8F, 0xC6, 0x03, 0x00, 0xC7, 0x04, 0x00, 0x00, 0xF0, 0xB5, 0x87, 0xB0, 0x00, 0x91, 0x01, 0x90, 0x6B, 0x48, 0x01, 0x68, 0xCD, 0x4A, 0x14, 0x1C, 0x02, 0x94, 0x07, 0x26, 0x00, 0x25, 0x03, 0x95, 0x04, 0x94, 0x05, 0x95, 0xDD, 0x48, 0x00, 0x68, 0x08, 0x43, 0x27, 0xD0, 0xE0, 0x68, 0x03, 0x99, 0x88, 0x42, 0x0A, 0xDD ,
0x03, 0x90, 0x40, 0x1C, 0x00, 0x99, 0x88, 0x60, 0xC3, 0x49, 0xFF, 0x20, 0x1D, 0x30, 0x68, 0x43, 0x0C, 0x18, 0xE0, 0x68, 0x04, 0x91, 0x02, 0x99, 0xC9, 0x68, 0x88, 0x42, 0x10, 0xDB, 0x88, 0x42, 0x10, 0xD1, 0x02, 0x98, 0x01, 0x27, 0xBE, 0x46, 0xFF, 0xFF, 0x70, 0x6D, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0xCC, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x06, 0x90, 0x20, 0x1C, 0xBE, 0x46, 0xC9, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x06, 0x99, 0x88, 0x42, 0x01, 0xDA, 0x05, 0x95, 0x02, 0x94, 0x51, 0x48, 0x01, 0x68, 0xFF, 0x27, 0x09, 0x37, 0x38, 0x59, 0x00, 0x28, 0x06, 0xD0, 0xC5, 0x48, 0x00, 0x68, 0x07, 0x2E, 0x00, 0xD1, 0x2E, 0x1C, 0x08, 0x43, 0x04, 0xD0, 0xFF, 0x34, 0x1D, 0x34, 0x01, 0x35, 0x07, 0x2D, 0xC2, 0xDB, 0x07, 0x2E, 0x0A, 0xD1, 0xBE, 0x48, 0x00, 0x68, 0x08, 0x43, 0x06, 0xD0, 0x05, 0x9E, 0x30, 0x1C, 0x01, 0x21, 0x8E, 0x46, 0xB8, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x01, 0x98, 0x47, 0x61, 0x00, 0x21, 0x81, 0x61 ,
0xFF, 0x22, 0x1D, 0x32, 0x72, 0x43, 0x04, 0x99, 0x89, 0x18, 0xC1, 0x61, 0x06, 0x62, 0xB2, 0x48, 0x39, 0x30, 0x07, 0xB0, 0xF0, 0xBD, 0x10, 0xB5, 0x04, 0x1C, 0x00, 0x20, 0x01, 0x21, 0x8E, 0x46, 0xAF, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x40, 0x1E, 0x00, 0xD5, 0x00, 0x20, 0x60, 0x60, 0xE0, 0x61, 0xAC, 0x48, 0xFF, 0xFF, 0x06, 0x6E, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x21, 0x30, 0x10, 0xBD, 0xC0, 0x46, 0x10, 0x63, 0x08, 0x00, 0x70, 0xB5, 0x04, 0x1C, 0xE5, 0x69, 0x66, 0x69, 0x00, 0x20, 0x01, 0x21, 0x8E, 0x46, 0xA5, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x60, 0x60, 0xAB, 0x19, 0xA4, 0x4A, 0xA3, 0x49, 0x93, 0x42, 0x02, 0xD3, 0x9A, 0x1A, 0x82, 0x42, 0x02, 0xD9, 0x08, 0x1C, 0x99, 0x30, 0x70, 0xBD, 0x08, 0x1C, 0xAB, 0x30, 0x70, 0xBD, 0x08, 0x6B, 0x41, 0x7D, 0x02, 0x88, 0x92, 0x00, 0x51, 0x1A, 0x3C, 0x39, 0xFF, 0x22, 0x5F, 0x32, 0x91, 0x42, 0x03, 0xD9, 0x65, 0x21, 0x01, 0x80, 0x02, 0x21, 0x81, 0x73, 0x99, 0x48 ,
0x97, 0x49, 0x08, 0x18, 0xF7, 0x46, 0xC0, 0x46, 0x30, 0x63, 0x08, 0x00, 0xF8, 0xB5, 0x40, 0x68, 0x24, 0x21, 0x41, 0x43, 0x95, 0x48, 0x45, 0x18, 0x28, 0x1D, 0x0C, 0x21, 0x49, 0x19, 0x04, 0x22, 0x01, 0x23, 0x9E, 0x46, 0x92, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x8F, 0x4C, 0x00, 0x28, 0x1B, 0xD0, 0x2B, 0x1C, 0x04, 0x22, 0x6E, 0x46, 0x8F, 0x49, 0x1F, 0x7B, 0x08, 0x78, 0xFF, 0xFF, 0x9C, 0x6E, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0xC0, 0x43, 0x38, 0x43, 0x30, 0x70, 0x01, 0x33, 0x01, 0x31, 0x01, 0x36, 0x01, 0x3A, 0xF5, 0xD1, 0x0C, 0x20, 0x41, 0x19, 0x68, 0x46, 0x04, 0x22, 0x01, 0x23, 0x9E, 0x46, 0x85, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x00, 0x28, 0x02, 0xD0, 0x20, 0x1C, 0x4A, 0x30, 0xF8, 0xBD, 0x20, 0x1C, 0xF8, 0xBD, 0xB1, 0xBD, 0x00, 0x00, 0x15, 0x95, 0x00, 0x00, 0x58, 0x3F, 0x08, 0x00, 0xF3, 0xF8, 0x00, 0x00, 0xE9, 0x09, 0x02, 0x00, 0xDD, 0x0A, 0x02, 0x00, 0xF8, 0xB5, 0x05, 0x1C, 0xAA, 0x69, 0x7C, 0x49 ,
0x00, 0x20, 0x08, 0x56, 0x24, 0x21, 0x41, 0x43, 0x75, 0x48, 0x43, 0x18, 0x04, 0x24, 0x6E, 0x46, 0x75, 0x49, 0x1F, 0x79, 0x08, 0x78, 0xC0, 0x43, 0x38, 0x43, 0x30, 0x70, 0x01, 0x33, 0x01, 0x31, 0x01, 0x36, 0x01, 0x3C, 0xF5, 0xD1, 0x11, 0x1D, 0x68, 0x46, 0x04, 0x22, 0x01, 0x24, 0xA6, 0x46, 0x6C, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x01, 0x1C, 0x6C, 0x48, 0x04, 0xD0, 0x6D, 0x49, 0x09, 0x78, 0x69, 0x60, 0x45, 0x30, 0xF8, 0xBD, 0xFF, 0xFF, 0x32, 0x6F, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0xEC, 0x61, 0xAF, 0x30, 0xF8, 0xBD, 0x2B, 0x09, 0x02, 0x00, 0x70, 0xB5, 0xC5, 0x68, 0x81, 0x68, 0x0A, 0x89, 0x6B, 0x4E, 0x00, 0x2A, 0x22, 0xD0, 0x01, 0x24, 0xC2, 0x6D, 0xA2, 0x18, 0xC2, 0x65, 0x08, 0x89, 0x0D, 0x28, 0x1B, 0xD1, 0x68, 0x6B, 0x21, 0x1C, 0xA6, 0x46, 0x61, 0x4A, 0xFE, 0x44, 0x10, 0x47, 0x22, 0x1C, 0x28, 0x1C, 0x00, 0x21, 0xA6, 0x46, 0x5E, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x2C, 0x60, 0xE9, 0x6B, 0x28, 0x1C ,
0xA6, 0x46, 0x5C, 0x4A, 0xFE, 0x44, 0x10, 0x47, 0x28, 0x1C, 0xA6, 0x46, 0x5A, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x30, 0x1C, 0x3D, 0x30, 0x70, 0xBD, 0x30, 0x1C, 0x23, 0x30, 0x70, 0xBD, 0xC0, 0x46, 0xB1, 0x02, 0x00, 0x00, 0x74, 0x3F, 0x08, 0x00, 0x19, 0xC6, 0x00, 0x00, 0x5C, 0x3F, 0x08, 0x00, 0x1D, 0xC2, 0x00, 0x00, 0x68, 0x44, 0x08, 0x00, 0x43, 0x12, 0x03, 0x00, 0x34, 0x63, 0x08, 0x00, 0x2F, 0x7A, 0x02, 0x00, 0xB4, 0x36, 0x08, 0x00, 0x8F, 0xF4, 0x01, 0x00, 0x09, 0xB4, 0x03, 0x00, 0xFF, 0xFF, 0xC8, 0x6F, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0xF0, 0xB5, 0x05, 0x1C, 0xAB, 0x69, 0xEC, 0x69, 0x60, 0x68, 0x00, 0x68, 0x2A, 0x30, 0x01, 0x78, 0x0A, 0x06, 0x41, 0x78, 0x09, 0x04, 0x8A, 0x18, 0x81, 0x78, 0x09, 0x02, 0x8A, 0x18, 0xC1, 0x78, 0x8A, 0x18, 0x8E, 0x26, 0xF1, 0x5A, 0x09, 0x0A, 0x01, 0x70, 0xF0, 0x5C, 0x61, 0x68, 0x09, 0x68, 0x2B, 0x26, 0x70, 0x54, 0x8C, 0x20, 0xC0, 0x18, 0x61, 0x68, 0x0E, 0x68 ,
0x01, 0x88, 0x09, 0x0A, 0x2C, 0x27, 0xB9, 0x55, 0x61, 0x68, 0x09, 0x68, 0x2D, 0x26, 0x00, 0x78, 0x70, 0x54, 0x60, 0x68, 0x01, 0x68, 0x32, 0x31, 0x08, 0x78, 0x00, 0x02, 0x49, 0x78, 0x08, 0x18, 0x00, 0x04, 0x00, 0x0C, 0x8C, 0x21, 0xCB, 0x58, 0x32, 0x49, 0x41, 0x40, 0x08, 0x04, 0x00, 0x0C, 0xC0, 0x18, 0x80, 0x1A, 0x01, 0x21, 0x8E, 0x46, 0x2F, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x61, 0x68, 0x0A, 0x68, 0x32, 0x23, 0x01, 0x0A, 0x99, 0x54, 0x61, 0x68, 0x09, 0x68, 0x33, 0x22, 0x50, 0x54, 0x60, 0x68, 0x68, 0x60, 0x29, 0x48, 0xF0, 0xBD, 0x00, 0x00, 0xFF, 0xFF, 0x5E, 0x70, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x34, 0x04, 0x1B, 0x00, 0x02, 0x6A, 0x8B, 0x69, 0xDB, 0x69, 0x1B, 0x68, 0x83, 0x60, 0x88, 0x69, 0xC0, 0x69, 0x41, 0x68, 0x8A, 0x42, 0x00, 0xDA, 0x42, 0x60, 0x22, 0x48, 0x79, 0x30, 0xF7, 0x46, 0x32, 0x04, 0x00, 0x00, 0xC4, 0x07, 0x00, 0x00, 0x15, 0x09, 0x02, 0x00, 0xC5, 0x93, 0x00, 0x00 ,
0x0D, 0x91, 0x00, 0x00, 0x40, 0x1E, 0x80, 0x00, 0x1C, 0x4B, 0x19, 0x50, 0x1A, 0x49, 0x0A, 0x50, 0xF7, 0x46, 0xC0, 0x46, 0xBD, 0xB5, 0x00, 0x00, 0x95, 0x92, 0x00, 0x00, 0xFD, 0x93, 0x00, 0x00, 0x54, 0x3F, 0x08, 0x00, 0x29, 0x4F, 0x03, 0x00, 0xDF, 0xE8, 0x02, 0x00, 0x36, 0x89, 0x41, 0x00, 0x81, 0x06, 0x00, 0x00, 0xB1, 0x78, 0x00, 0x00, 0x94, 0xEC, 0x01, 0x00, 0x08, 0x19, 0x1B, 0x00, 0x8F, 0xC6, 0x03, 0x00, 0x1C, 0x17, 0x1B, 0x00, 0x67, 0x66, 0x03, 0x00, 0xA6, 0x44, 0x08, 0x00, 0x18, 0x17, 0x1B, 0x00, 0xA7, 0x2F, 0x02, 0x00, 0x91, 0x44, 0x03, 0x00, 0x91, 0x63, 0x03, 0x00, 0x5B, 0x44, 0x03, 0x00, 0xFF, 0xFF, 0xF4, 0x70, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0xE7, 0x44, 0x03, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x61, 0xA2, 0x03, 0x00, 0x6A, 0x1E, 0x01, 0x00, 0x45, 0xDA, 0x00, 0x00, 0x04, 0xF3, 0x1A, 0x00, 0x80, 0x7B, 0x08, 0x00, 0xFC, 0xB5, 0x04, 0x1C, 0xA5, 0x69, 0x60, 0x6A, 0x01, 0x90, 0x20, 0x69 ,
0x00, 0x28, 0x35, 0xD4, 0x08, 0x28, 0x33, 0xDA, 0xE1, 0x69, 0x09, 0x68, 0x10, 0x29, 0x2F, 0xD1, 0xAC, 0x21, 0x41, 0x43, 0x9E, 0x4A, 0x51, 0x5C, 0x49, 0x08, 0x27, 0xD3, 0x00, 0x06, 0x00, 0x16, 0xA2, 0x68, 0x69, 0x46, 0x01, 0x23, 0x9E, 0x46, 0x9A, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x06, 0x1C, 0x39, 0x30, 0x1F, 0xD0, 0x00, 0x2E, 0x1D, 0xD0, 0x00, 0x98, 0x07, 0x68, 0x00, 0x99, 0x0C, 0x39, 0x01, 0x98, 0x01, 0x60, 0x28, 0x1D, 0x10, 0x21, 0x79, 0x1A, 0x04, 0x22, 0x01, 0x23, 0x9E, 0x46, 0x91, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x02, 0x22, 0x2A, 0x80, 0xA8, 0x1C, 0x08, 0x21, 0x79, 0x1A, 0x01, 0x23, 0x9E, 0x46, 0x8C, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x03, 0xE0, 0x38, 0x20, 0xFF, 0xFF, 0x8A, 0x71, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x20, 0xC6, 0x43, 0x26, 0x60, 0x89, 0x48, 0x7C, 0x30, 0x20, 0x62, 0xFC, 0xBD, 0x30, 0xB5, 0x05, 0x1C, 0x28, 0x69, 0xA9, 0x69, 0x90, 0x29, 0x1D, 0xD1, 0x69, 0x69 ,
0x09, 0x78, 0x04, 0x29, 0x19, 0xD0, 0x05, 0x29, 0x17, 0xD0, 0x0A, 0x29, 0x15, 0xD0, 0x06, 0x29, 0x13, 0xD0, 0x0C, 0x29, 0x01, 0xDB, 0x10, 0x29, 0x0F, 0xD1, 0x01, 0x24, 0xA6, 0x46, 0x7D, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x7C, 0x48, 0x7D, 0x49, 0x00, 0x22, 0xA6, 0x46, 0x7C, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x7C, 0x48, 0xFF, 0x30, 0x5F, 0x30, 0x28, 0x62, 0x30, 0xBD, 0xF0, 0xB5, 0x89, 0xB0, 0x05, 0x90, 0x41, 0x69, 0x02, 0x69, 0x75, 0x48, 0x79, 0x4E, 0x82, 0x42, 0x3A, 0xD0, 0x04, 0x30, 0x82, 0x42, 0x25, 0xD0, 0x74, 0x4D, 0xAA, 0x42, 0x00, 0xD0, 0xCC, 0xE0, 0x08, 0x68, 0x06, 0x1C, 0x0C, 0x22, 0x8F, 0x1A, 0x4A, 0x68, 0x89, 0x18, 0x09, 0x1D, 0x10, 0x22, 0x01, 0x24, 0xA6, 0x46, 0x6E, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x01, 0x1C, 0xFF, 0xFF, 0x20, 0x72, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x09, 0xD1, 0xAC, 0x22, 0x72, 0x43, 0xCB, 0x48, 0x80, 0x18, 0x46, 0x22, 0x12, 0x5C, 0x11, 0x2A, 0x01, 0xD1, 0x44, 0x22 ,
0x14, 0x54, 0x28, 0x1C, 0x3A, 0x1C, 0xA6, 0x46, 0x62, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x69, 0x48, 0xEC, 0x30, 0xAB, 0xE0, 0x08, 0x68, 0xC0, 0x00, 0x30, 0x18, 0x8A, 0x68, 0x02, 0x2A, 0x02, 0xD0, 0xE7, 0x20, 0x80, 0x00, 0xA2, 0xE0, 0xCA, 0x68, 0x89, 0x18, 0x09, 0x7B, 0x41, 0x60, 0x80, 0x21, 0x01, 0x60, 0x3B, 0x20, 0x00, 0x01, 0x99, 0xE0, 0x08, 0x68, 0x06, 0x90, 0xC0, 0x00, 0x34, 0x58, 0x10, 0x20, 0x04, 0x90, 0x01, 0x25, 0xAE, 0x46, 0x57, 0x48, 0xFE, 0x44, 0x00, 0x47, 0x07, 0x90, 0x00, 0x28, 0x00, 0xD1, 0x89, 0xE0, 0x0C, 0x21, 0x07, 0x98, 0x0F, 0x18, 0xB0, 0x49, 0xAC, 0x20, 0x06, 0x9A, 0x50, 0x43, 0x08, 0x18, 0x48, 0x22, 0x13, 0x5C, 0x5B, 0x06, 0x5B, 0x0E, 0x13, 0x54, 0x06, 0x9A, 0xD2, 0x00, 0xB6, 0x18, 0x71, 0x68, 0x00, 0x29, 0x47, 0xD1, 0x00, 0x2C, 0x01, 0xDD, 0x08, 0x2C, 0xFF, 0xFF, 0xB6, 0x72, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x21, 0xDB, 0x00, 0x22, 0x69, 0x46, 0x0A, 0x70, 0x01, 0x92 ,
0x0A, 0x81, 0x8A, 0x72, 0xCD, 0x72, 0x0D, 0x73, 0x4D, 0x73, 0x01, 0x88, 0x44, 0x48, 0x06, 0x23, 0xAE, 0x46, 0x44, 0x4C, 0xFE, 0x44, 0x20, 0x47, 0x04, 0x1C, 0x02, 0xDC, 0x00, 0x20, 0xC0, 0x43, 0x36, 0xE0, 0x34, 0x60, 0xAC, 0x20, 0x60, 0x43, 0x9A, 0x49, 0x09, 0x18, 0x5C, 0x22, 0x28, 0x1C, 0x50, 0x54, 0x48, 0x20, 0x42, 0x5C, 0x52, 0x06, 0x52, 0x0E, 0x42, 0x54, 0xAC, 0x20, 0x60, 0x43, 0x94, 0x49, 0x08, 0x18, 0x5C, 0x21, 0x09, 0x5C, 0x49, 0x1E, 0x02, 0x29, 0x16, 0xD9, 0x03, 0x39, 0x08, 0xD0, 0x00, 0x20, 0x30, 0x56, 0xAE, 0x46, 0xEA, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x80, 0x20, 0x30, 0x60, 0xDB, 0xE7, 0x08, 0x94, 0x80, 0x21, 0x31, 0x60, 0x48, 0x22, 0x13, 0x5C, 0x19, 0x43, 0x11, 0x54, 0xAE, 0x46, 0xE4, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x0A, 0xE0, 0x01, 0x20, 0xCE, 0xE7, 0x06, 0x98, 0x39, 0x1C, 0x04, 0xAA, 0xAE, 0x46, 0xE0, 0x4B, 0xFE, 0x44, 0xFF, 0xFF, 0x4C, 0x73, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00 ,
0x18, 0x47, 0x04, 0x1C, 0x08, 0x90, 0x06, 0x98, 0x38, 0x60, 0x08, 0x98, 0x78, 0x60, 0x00, 0x28, 0x15, 0xD0, 0xAC, 0x20, 0x60, 0x43, 0x7C, 0x49, 0x09, 0x18, 0x48, 0x88, 0x02, 0x04, 0x02, 0x20, 0x10, 0x43, 0xB8, 0x60, 0x48, 0x68, 0x02, 0x0E, 0x01, 0x02, 0x09, 0x0E, 0x09, 0x02, 0x11, 0x43, 0x02, 0x04, 0x12, 0x0E, 0x12, 0x04, 0x0A, 0x43, 0x00, 0x06, 0x10, 0x43, 0xF8, 0x60, 0x07, 0x98, 0x0D, 0x49, 0x00, 0x22, 0x10, 0x23, 0xAE, 0x46, 0xCE, 0x4C, 0xFE, 0x44, 0x20, 0x47, 0x13, 0x48, 0x00, 0xE0, 0x16, 0x20, 0xCC, 0x49, 0x09, 0x18, 0x05, 0x98, 0x01, 0x62, 0x09, 0xB0, 0xF0, 0xBD, 0x5D, 0x0D, 0x1B, 0x00, 0x81, 0xE7, 0x02, 0x00, 0x09, 0xB4, 0x03, 0x00, 0x27, 0x1A, 0x02, 0x00, 0x2F, 0x7A, 0x02, 0x00, 0x02, 0x02, 0x00, 0x00, 0x05, 0x10, 0x00, 0x00, 0xCF, 0xF6, 0x00, 0x00, 0xD5, 0xF4, 0x00, 0x00, 0x02, 0x10, 0x00, 0x00, 0x91, 0x19, 0x02, 0x00, 0x50, 0x65, 0x08, 0x00, 0x71, 0xC0, 0x02, 0x00, 0x50, 0x19 ,
0xFF, 0xFF, 0xE2, 0x73, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x29, 0x16, 0x01, 0x00, 0x2A, 0x03, 0x00, 0x00, 0xF0, 0xB5, 0x8B, 0xB0, 0x07, 0x90, 0x05, 0x69, 0x47, 0x69, 0x0C, 0x20, 0x38, 0x1A, 0x08, 0x90, 0xB6, 0x49, 0x8D, 0x42, 0x16, 0xD1, 0x78, 0x68, 0x0F, 0x30, 0x00, 0x11, 0x00, 0x01, 0x78, 0x60, 0x38, 0x68, 0x0B, 0x28, 0x0E, 0xD8, 0x00, 0x23, 0x68, 0x46, 0x03, 0x70, 0x08, 0x98, 0x05, 0x22, 0x01, 0x24, 0xA6, 0x46, 0xAE, 0x4C, 0xFE, 0x44, 0x20, 0x47, 0xAE, 0x48, 0xFF, 0x30, 0x95, 0x30, 0x07, 0x99, 0x08, 0x62, 0xAC, 0x48, 0x85, 0x42, 0x23, 0xD1, 0xAC, 0x48, 0x02, 0x78, 0x6C, 0x46, 0x22, 0x72, 0x43, 0x78, 0x63, 0x72, 0x81, 0x78, 0xA1, 0x72, 0xC0, 0x78, 0xE0, 0x72, 0x00, 0x91, 0x01, 0x90, 0x03, 0x20, 0xA6, 0x49, 0x01, 0x39, 0x01, 0x26, 0xB6, 0x46, 0xF3, 0x4E, 0xFE, 0x44, 0x30, 0x47, 0x04, 0x20, 0x20, 0x70, 0x08, 0x98, 0x9F, 0x49, 0x00, 0x22, 0x02, 0xAB, 0x01, 0x24, 0xA6, 0x46 ,
0x9B, 0x4C, 0xFE, 0x44, 0x20, 0x47, 0x9A, 0x48, 0xFF, 0x30, 0xFF, 0xFF, 0x78, 0x74, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x95, 0x30, 0x07, 0x99, 0x08, 0x62, 0xEB, 0x49, 0x8D, 0x42, 0x14, 0xD1, 0x02, 0x22, 0x68, 0x46, 0x02, 0x70, 0x3A, 0x68, 0xAC, 0x20, 0x42, 0x43, 0x30, 0x48, 0x68, 0x30, 0x83, 0x18, 0x08, 0x98, 0x00, 0x22, 0x01, 0x24, 0xA6, 0x46, 0x8F, 0x4C, 0xFE, 0x44, 0x20, 0x47, 0x8E, 0x48, 0xFF, 0x30, 0x95, 0x30, 0x07, 0x99, 0x08, 0x62, 0xEF, 0x48, 0x85, 0x42, 0x00, 0xD0, 0x04, 0xE1, 0x03, 0x20, 0x8C, 0x49, 0x01, 0x22, 0x96, 0x46, 0xEC, 0x4A, 0xFE, 0x44, 0x10, 0x47, 0x86, 0x48, 0xFF, 0x30, 0x95, 0x30, 0x09, 0x90, 0x38, 0x68, 0xEA, 0x4D, 0x00, 0x28, 0x00, 0xD1, 0xE2, 0xE0, 0x01, 0x24, 0xA6, 0x46, 0xE6, 0x48, 0xFE, 0x44, 0x00, 0x47, 0x00, 0x28, 0x00, 0xD1, 0xD6, 0xE0, 0xE4, 0x48, 0x02, 0x68, 0x03, 0x20, 0x7F, 0x49, 0x01, 0x31, 0xA6, 0x46, 0xE2, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0xDF, 0x48 ,
0x00, 0x68, 0x00, 0x28, 0x5A, 0xD1, 0xDF, 0x4D, 0x2E, 0x20, 0x41, 0x19, 0xB8, 0x68, 0x03, 0x30, 0x08, 0x70, 0x38, 0x7A, 0xFF, 0xFF, 0x0E, 0x75, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x48, 0x70, 0x2E, 0x1C, 0x30, 0x36, 0xB8, 0x68, 0x28, 0x18, 0x30, 0x30, 0xDA, 0x49, 0x0A, 0x68, 0x30, 0x3A, 0x31, 0x1C, 0xA6, 0x46, 0xD8, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x78, 0x68, 0x38, 0x18, 0x01, 0x1D, 0xBA, 0x68, 0x30, 0x1C, 0xA6, 0x46, 0xD9, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0xB8, 0x68, 0x41, 0x19, 0x97, 0x22, 0x09, 0x30, 0x50, 0x54, 0xB8, 0x68, 0x46, 0x19, 0x9E, 0x36, 0x30, 0x70, 0x01, 0x36, 0xB8, 0x68, 0x01, 0xE0, 0x14, 0x0D, 0x1B, 0x00, 0x30, 0x18, 0xCA, 0x49, 0x0A, 0x68, 0x9E, 0x3A, 0x31, 0x1C, 0xA6, 0x46, 0xC8, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x78, 0x68, 0x38, 0x18, 0x01, 0x1D, 0xBA, 0x68, 0x30, 0x1C, 0xA6, 0x46, 0xC9, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0xB8, 0x68, 0x40, 0x00, 0xC0, 0x49, 0x09, 0x68, 0x08, 0x18 ,
0x28, 0x18, 0xC0, 0x49, 0x0A, 0x79, 0x02, 0x70, 0x4A, 0x79, 0x42, 0x70, 0x8A, 0x79, 0x82, 0x70, 0xC9, 0x79, 0xC1, 0x70, 0x04, 0x30, 0x0F, 0x21, 0x41, 0x1A, 0x0A, 0x78, 0xBB, 0x68, 0xFF, 0xFF, 0xA4, 0x75, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x9A, 0x18, 0x0A, 0x70, 0x40, 0x1B, 0x00, 0x04, 0x00, 0x0C, 0xB5, 0x49, 0x08, 0x60, 0xB1, 0x48, 0x04, 0x60, 0x02, 0x20, 0x01, 0x1C, 0x11, 0x22, 0xA6, 0x46, 0xB4, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x06, 0x1C, 0x63, 0xD4, 0x03, 0x20, 0xA6, 0x46, 0xB1, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x0A, 0x90, 0x00, 0x25, 0x01, 0x1C, 0x8D, 0x42, 0x50, 0xD0, 0x29, 0x1C, 0x2B, 0x22, 0xA6, 0x46, 0xAD, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x0C, 0x20, 0x0A, 0x99, 0x40, 0x18, 0xAC, 0x22, 0x72, 0x43, 0xAB, 0x49, 0x8F, 0x18, 0x78, 0x63, 0x29, 0x1C, 0x18, 0x22, 0xA6, 0x46, 0xA6, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x9F, 0x48, 0x02, 0x68, 0x79, 0x6B, 0x4A, 0x60, 0x0A, 0x98, 0xAC, 0x30, 0x08, 0x60 ,
0x08, 0x68, 0x9A, 0x49, 0xA6, 0x46, 0xA0, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x29, 0x1C, 0x03, 0xA8, 0x10, 0x22, 0xA6, 0x46, 0x9C, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0xE0, 0x21, 0x68, 0x46, 0x01, 0x74, 0x45, 0x74, 0x85, 0x74, 0xFB, 0x21, 0xC1, 0x74, 0xFF, 0xFF, 0x3A, 0x76, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0xEE, 0x49, 0xC1, 0x81, 0x02, 0x21, 0x81, 0x81, 0x79, 0x6B, 0xCA, 0x68, 0x01, 0x20, 0xC0, 0x03, 0x10, 0x43, 0xC8, 0x60, 0x48, 0x68, 0x00, 0x90, 0x2A, 0x1C, 0x30, 0x1C, 0x0A, 0x9D, 0x29, 0x1C, 0x03, 0xAB, 0xA6, 0x46, 0xE6, 0x4F, 0xFE, 0x44, 0x38, 0x47, 0x07, 0x1C, 0x30, 0x06, 0x00, 0x16, 0xA6, 0x46, 0xEF, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x28, 0x1C, 0xA6, 0x46, 0xEE, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x11, 0xE0, 0x30, 0x06, 0x00, 0x16, 0xA6, 0x46, 0xE9, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x01, 0x20, 0xC7, 0x43, 0x08, 0xE0, 0x07, 0x1C, 0x06, 0xE0, 0x00, 0x20, 0x00, 0x21, 0xCF, 0x43, 0x01, 0xE0, 0x00, 0x20 ,
0x07, 0x1C, 0x28, 0x60, 0x00, 0x23, 0x68, 0x46, 0x03, 0x70, 0x3A, 0x06, 0x12, 0x0E, 0x08, 0x98, 0x6F, 0x49, 0x01, 0x24, 0xA6, 0x46, 0x09, 0x4C, 0xFE, 0x44, 0x20, 0x47, 0x07, 0x98, 0x09, 0x99, 0x01, 0x62, 0x0B, 0xB0, 0xF0, 0xBD, 0xC1, 0x18, 0x01, 0x00, 0xF1, 0x1B, 0x01, 0x00, 0xF3, 0x1C, 0x02, 0x00, 0xFF, 0xFF, 0xD0, 0x76, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x7B, 0xC0, 0x02, 0x00, 0x91, 0xF0, 0x00, 0x00, 0x03, 0x02, 0x00, 0x00, 0xA3, 0xC0, 0x02, 0x00, 0xA9, 0xE9, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0xE4, 0x62, 0x08, 0x00, 0xAC, 0x05, 0x00, 0x00, 0xFE, 0xB5, 0x07, 0x1C, 0x7D, 0x69, 0xBE, 0x69, 0x0C, 0x20, 0x30, 0x1A, 0x01, 0x90, 0xDF, 0x4C, 0x0A, 0x2D, 0x13, 0xD1, 0x30, 0x68, 0xDB, 0x49, 0x08, 0x60, 0x01, 0x20, 0x86, 0x46, 0xDA, 0x48, 0xFE, 0x44, 0x00, 0x47, 0x0A, 0x20, 0x00, 0x21, 0x01, 0x9A, 0x01, 0x23, 0x9E, 0x46, 0xE6, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0xF5, 0x20, 0x80, 0x00, 0x00, 0x19 ,
0x38, 0x62, 0x03, 0x2D, 0x79, 0xD1, 0xF5, 0x20, 0x80, 0x00, 0x00, 0x19, 0x02, 0x90, 0x70, 0x68, 0x00, 0x28, 0x0C, 0xD1, 0x00, 0x21, 0xCF, 0x48, 0x01, 0x60, 0xCF, 0x48, 0x00, 0x68, 0x00, 0x28, 0x61, 0xD0, 0x01, 0x21, 0x8E, 0x46, 0xCD, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x5B, 0xE0, 0xCC, 0x48, 0xB1, 0x68, 0x01, 0x60, 0xF1, 0x68, 0x41, 0x60, 0x31, 0x69, 0x81, 0x60, 0xFF, 0xFF, 0x66, 0x77, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x71, 0x69, 0xC1, 0x60, 0xB1, 0x69, 0xC1, 0x63, 0xF1, 0x69, 0x01, 0x64, 0x31, 0x6A, 0xC1, 0x64, 0x01, 0x24, 0xA6, 0x46, 0xC5, 0x48, 0xFE, 0x44, 0x00, 0x47, 0xA6, 0x46, 0xC4, 0x48, 0xFE, 0x44, 0x00, 0x47, 0x70, 0x68, 0x7D, 0x25, 0xED, 0x00, 0xA8, 0x42, 0x21, 0xD8, 0x01, 0x28, 0x18, 0xD0, 0x02, 0x28, 0x05, 0xD0, 0x28, 0x1C, 0xA6, 0x46, 0xBE, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x1C, 0xE0, 0xB9, 0x48, 0x00, 0x23, 0x19, 0x1C, 0x59, 0x43, 0x3E, 0x22, 0x4A, 0x43, 0x82, 0x83, 0x02, 0x30 ,
0x01, 0x33, 0x10, 0x2B, 0xF6, 0xDB, 0xA6, 0x46, 0xB4, 0x48, 0xFE, 0x44, 0x00, 0x47, 0xB5, 0x48, 0x0D, 0xE0, 0xB5, 0x4D, 0x28, 0x1C, 0xA6, 0x46, 0xB2, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x04, 0xE0, 0xA6, 0x46, 0xAF, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x75, 0x68, 0xAE, 0x48, 0x05, 0x60, 0x05, 0x1C, 0xA7, 0x4E, 0x30, 0x68, 0x00, 0x28, 0x06, 0xD1, 0xAD, 0x48, 0x00, 0x68, 0xA6, 0x46, 0xAC, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x30, 0x60, 0xFF, 0xFF, 0xFC, 0x77, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x00, 0x94, 0x2B, 0x68, 0xAA, 0x49, 0xAB, 0x4A, 0xA6, 0x46, 0xAB, 0x4D, 0xFE, 0x44, 0x28, 0x47, 0x9C, 0x48, 0x04, 0x60, 0x03, 0x20, 0x00, 0x21, 0x01, 0x9A, 0x01, 0x23, 0x9E, 0x46, 0xA7, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x02, 0x98, 0x38, 0x62, 0xFE, 0xBD, 0xC0, 0x46, 0x13, 0x7F, 0x03, 0x00, 0x12, 0x10, 0x00, 0x00, 0x30, 0xB5, 0x05, 0x1C, 0x00, 0x20, 0x01, 0x24, 0xA6, 0x46, 0xA0, 0x49, 0xFE, 0x44, 0x08, 0x47, 0xA6, 0x46 ,
0x9F, 0x49, 0xFE, 0x44, 0x08, 0x47, 0xA6, 0x46, 0x9E, 0x48, 0xFE, 0x44, 0x00, 0x47, 0x7D, 0x21, 0xC9, 0x00, 0xA6, 0x46, 0x9E, 0x4A, 0xFE, 0x44, 0x10, 0x47, 0x9B, 0x49, 0x08, 0x18, 0x99, 0x49, 0x08, 0x80, 0x9B, 0x48, 0x0A, 0x30, 0x28, 0x62, 0x30, 0xBD, 0x11, 0x10, 0x00, 0x00, 0xDD, 0x7E, 0x03, 0x00, 0xB9, 0x90, 0x00, 0x00, 0x6C, 0x64, 0x08, 0x00, 0xE7, 0x7E, 0x03, 0x00, 0x74, 0x64, 0x08, 0x00, 0x70, 0x64, 0x08, 0x00, 0x6D, 0xC6, 0x03, 0x00, 0x08, 0x19, 0x1B, 0x00, 0x11, 0x18, 0xFF, 0xFF, 0x92, 0x78, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x02, 0x00, 0xD1, 0x78, 0x02, 0x00, 0xC9, 0xBA, 0x03, 0x00, 0x09, 0xB4, 0x03, 0x00, 0x14, 0x0D, 0x1B, 0x00, 0xFE, 0xB5, 0x02, 0x90, 0x45, 0x69, 0x68, 0x46, 0x01, 0x21, 0x8E, 0x46, 0x89, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x89, 0x48, 0x04, 0x1C, 0x68, 0x68, 0x01, 0x69, 0x4A, 0x78, 0x00, 0x27, 0x3E, 0x1C, 0x20, 0x88, 0x40, 0x08, 0x22, 0xD3, 0x20, 0x1D, 0x89, 0x1C ,
0x01, 0x23, 0x9E, 0x46, 0x83, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x00, 0x28, 0x07, 0xD1, 0x68, 0x68, 0x00, 0x69, 0x40, 0x78, 0x21, 0x88, 0x09, 0x04, 0x89, 0x16, 0x81, 0x42, 0x3D, 0xD0, 0x02, 0x20, 0x00, 0x5F, 0x00, 0x99, 0x08, 0x1A, 0x00, 0x04, 0x00, 0x14, 0x3C, 0x28, 0x03, 0xDD, 0x20, 0x88, 0x40, 0x10, 0x40, 0x00, 0x20, 0x80, 0x78, 0x1C, 0x07, 0x06, 0x3F, 0x0E, 0x68, 0x68, 0x01, 0x69, 0x4A, 0x78, 0x2A, 0x34, 0x01, 0x36, 0x14, 0x2E, 0xD5, 0xDB, 0x00, 0x2A, 0x02, 0xD1, 0xAB, 0x20, 0x40, 0x00, 0x50, 0xE0, 0x00, 0x9B, 0x6D, 0x48, 0x14, 0x21, 0xFF, 0xFF, 0x28, 0x79, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x00, 0x22, 0x04, 0x88, 0x64, 0x08, 0x03, 0xD3, 0x2A, 0x30, 0x01, 0x32, 0x01, 0x39, 0xF8, 0xD1, 0x12, 0x06, 0x12, 0x0E, 0x14, 0x2F, 0x16, 0xD1, 0x66, 0x48, 0x00, 0x88, 0x00, 0x06, 0x44, 0x16, 0x64, 0x49, 0x00, 0x22, 0x01, 0x20, 0x4E, 0x8D, 0x36, 0x06, 0x76, 0x16, 0xA6, 0x42, 0x02, 0xDD, 0x34, 0x1C ,
0x02, 0x06, 0x12, 0x0E, 0x2A, 0x31, 0x01, 0x30, 0x14, 0x28, 0xF3, 0xDB, 0x02, 0xE0, 0x32, 0x06, 0x12, 0x0E, 0x00, 0x9B, 0x2A, 0x20, 0x42, 0x43, 0x5A, 0x48, 0x11, 0x18, 0x0C, 0x88, 0x01, 0x20, 0x20, 0x43, 0x00, 0x04, 0x00, 0x0C, 0x08, 0x80, 0xFE, 0x24, 0xA0, 0x43, 0x14, 0x24, 0x64, 0x57, 0x64, 0x06, 0x24, 0x0E, 0x04, 0x43, 0x52, 0x48, 0x14, 0x52, 0x14, 0x18, 0x63, 0x80, 0x08, 0x88, 0x80, 0x05, 0x82, 0x0D, 0x68, 0x68, 0x00, 0x69, 0x40, 0x78, 0x80, 0x02, 0x10, 0x43, 0x08, 0x80, 0x68, 0x68, 0x02, 0x69, 0x20, 0x1D, 0x91, 0x1C, 0x52, 0x78, 0x01, 0x23, 0x9E, 0x46, 0x4B, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0xFF, 0xFF, 0xBE, 0x79, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x02, 0x98, 0x04, 0x61, 0xFE, 0x20, 0x47, 0x49, 0x09, 0x18, 0x02, 0x98, 0x01, 0x62, 0xFE, 0xBD, 0x82, 0x69, 0x41, 0x69, 0x03, 0x69, 0x02, 0x2B, 0x0A, 0xD1, 0x01, 0x2A, 0x01, 0xD1, 0x00, 0x29, 0x05, 0xD0, 0x02, 0x2A, 0x04, 0xD1, 0x00, 0x29 ,
0x02, 0xD1, 0x11, 0x21, 0x00, 0xE0, 0x06, 0x21, 0x41, 0x61, 0xF7, 0x46, 0xC0, 0x46, 0x14, 0xE9, 0x00, 0x00, 0xC9, 0x18, 0x02, 0x00, 0x30, 0xB5, 0x05, 0x1C, 0x3A, 0x48, 0x00, 0x78, 0x00, 0x28, 0x04, 0xD0, 0x01, 0x20, 0x86, 0x46, 0x38, 0x48, 0xFE, 0x44, 0x00, 0x47, 0x01, 0x24, 0xA6, 0x46, 0x37, 0x48, 0xFE, 0x44, 0x00, 0x47, 0xA6, 0x46, 0x36, 0x48, 0xFE, 0x44, 0x00, 0x47, 0x35, 0x48, 0x0E, 0x30, 0x28, 0x62, 0x30, 0xBD, 0x49, 0x19, 0x01, 0x00, 0x2F, 0x7A, 0x02, 0x00, 0x18, 0xB5, 0x43, 0x69, 0x81, 0x69, 0x31, 0x48, 0x81, 0x29, 0x00, 0xD1, 0x0B, 0x38, 0x00, 0x21, 0x00, 0x91, 0x1A, 0x68, 0x9B, 0x68, 0x01, 0x24, 0xA6, 0x46, 0x2D, 0x4C, 0xFE, 0x44, 0x20, 0x47, 0xFF, 0xFF, 0x54, 0x7A, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x18, 0xBD, 0x18, 0xB5, 0x40, 0x69, 0x00, 0x21, 0x00, 0x91, 0x02, 0x68, 0x83, 0x68, 0x27, 0x48, 0x01, 0x30, 0x01, 0x24, 0xA6, 0x46, 0x26, 0x4C, 0xFE, 0x44, 0x20, 0x47, 0x18, 0xBD ,
0xC0, 0x46, 0x30, 0x63, 0x08, 0x00, 0x19, 0x9E, 0x00, 0x00, 0xB9, 0xEC, 0x00, 0x00, 0x74, 0x3F, 0x08, 0x00, 0x80, 0x3F, 0x08, 0x00, 0xB7, 0x5D, 0x03, 0x00, 0x00, 0x00, 0x1B, 0x00, 0xD3, 0x8E, 0x00, 0x00, 0xF7, 0xC6, 0x00, 0x00, 0xE5, 0x90, 0x00, 0x00, 0x68, 0x64, 0x08, 0x00, 0xC0, 0x27, 0x09, 0x00, 0xA0, 0x3B, 0x08, 0x00, 0x3D, 0x5D, 0x03, 0x00, 0x19, 0xC6, 0x00, 0x00, 0xE8, 0x3A, 0x08, 0x00, 0x81, 0x5D, 0x03, 0x00, 0xCF, 0xF6, 0x00, 0x00, 0x4B, 0x4F, 0x03, 0x00, 0x6B, 0xC0, 0x03, 0x00, 0x95, 0x1E, 0x01, 0x00, 0xDA, 0x40, 0x08, 0x00, 0xDC, 0x05, 0x00, 0x00, 0x55, 0xAA, 0x03, 0x00, 0x0D, 0x91, 0x00, 0x00, 0xD7, 0x56, 0x03, 0x00, 0x08, 0x51, 0x08, 0x00, 0x8F, 0xC6, 0x03, 0x00, 0x65, 0xB8, 0x00, 0x00, 0x09, 0xB4, 0xFF, 0xFF, 0xEA, 0x7A, 0x08, 0x00, 0x8C, 0x00, 0x00, 0x00, 0x03, 0x00, 0x84, 0x17, 0x1B, 0x00, 0xB5, 0x86, 0x01, 0x00, 0x3D, 0x47, 0x02, 0x00, 0x73, 0x49, 0x02, 0x00, 0x5F, 0x90 ,
0x00, 0x00, 0x0E, 0x10, 0x00, 0x00, 0xF7, 0xF6, 0x00, 0x00, 0xFF, 0xB5, 0x68, 0x46, 0xFF, 0xF7, 0x76, 0xFF, 0xFF, 0xBD, 0xFF, 0xB5, 0x68, 0x46, 0xFF, 0xF7, 0x5A, 0xFF, 0xFF, 0xBD, 0xFF, 0xB5, 0x68, 0x46, 0xFF, 0xF7, 0x99, 0xFF, 0xFF, 0xBD, 0xFF, 0xB5, 0x68, 0x46, 0xFF, 0xF7, 0x83, 0xFF, 0xFF, 0xBD, 0xFF, 0xB5, 0x68, 0x46, 0xFF, 0xF7, 0xB6, 0xFE, 0xFF, 0xBD, 0xFF, 0xB5, 0x68, 0x46, 0xFF, 0xF7, 0x55, 0xFC, 0xFF, 0xBD, 0xFF, 0xB5, 0x68, 0x46, 0xFF, 0xF7, 0x27, 0xFB, 0xFF, 0xBD, 0xFF, 0xB5, 0x68, 0x46, 0xFF, 0xF7, 0xDD, 0xFA, 0xFF, 0xBD, 0xFF, 0xB5, 0x68, 0x46, 0xFF, 0xF7, 0x68, 0xFE, 0xFF, 0xBD, 0xFF, 0xB5, 0x68, 0x46, 0xFF, 0xF7, 0x3D, 0xFB, 0xFF, 0xBD, 0xFF, 0xB5, 0x68, 0x46, 0xFF, 0xF7, 0xBE, 0xFD, 0xFF, 0xBD, 0x78, 0x7B, 0x08, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0xB5, 0xF8, 0xF0, 0x43, 0xFA, 0x00, 0xBD, 0x35, 0x66, 0x08, 0x00, 0x67, 0x66, 0x08, 0x00, 0x71, 0x65, 0x08, 0x00, 0x4D, 0x66 ,
0x08, 0x00, 0x25, 0x64, 0x08, 0x00, 0x81, 0x66, 0x08, 0x00, 0x8D, 0x66, 0x08, 0x00, 0x99, 0x66, 0x08, 0x00, 0x87, 0x67, 0x08, 0x00, 0xA7, 0x67, 0x08, 0x00, 0xD1, 0x67, 0x08, 0x00, 0x1B, 0x68, 0x08, 0x00, 0x57, 0x68, 0x08, 0x00, 0x39, 0x69, 0x08, 0x00, 0xFD, 0x6B, 0x08, 0x00, 0x17, 0x6C, 0x08, 0x00, 0x39, 0x6C, 0x08, 0x00, 0x61, 0x6C, 0x08, 0x00, 0xA1, 0x68, 0x08, 0x00, 0x95, 0x6C, 0x08, 0x00, 0xEB, 0x6D, 0x08, 0x00, 0x43, 0x6E, 0x08, 0x00, 0x6D, 0x6E, 0x08, 0x00, 0x3D, 0x6F, 0x08, 0x00, 0x1D, 0x6D, 0x08, 0x00, 0xE5, 0x6E, 0x08, 0x00, 0x11, 0x6E, 0x08, 0x00, 0xC9, 0x6F, 0x08, 0x00, 0x65, 0x70, 0x08, 0x00, 0x31, 0x64, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xF3, 0x1A, 0x00, 0x80, 0x00, 0x00, 0x00, 0xB2, 0x4E, 0x01, 0x00, 0x5A, 0xC1, 0x00, 0x00, 0x96, 0x1A, 0x01, 0x00, 0x22, 0x0B, 0x02, 0x00, 0x60, 0xD0, 0x01, 0x00, 0x06, 0x1A, 0x00, 0x00, 0xB8, 0xC6, 0x01, 0x00 ,
0xD8, 0x42, 0x03, 0x00, 0x16, 0x42, 0x03, 0x00, 0xEE, 0xDB, 0x00, 0x00, 0x62, 0xDC, 0x00, 0x00, 0xC8, 0xE1, 0x00, 0x00, 0x8A, 0x17, 0x02, 0x00, 0x38, 0xBE, 0x00, 0x00, 0x26, 0xC6, 0x00, 0x00, 0x56, 0xC2, 0x00, 0x00, 0x62, 0x12, 0x03, 0x00, 0xE4, 0xF4, 0x01, 0x00, 0x3A, 0xEC, 0x00, 0x00, 0x5E, 0x92, 0x00, 0x00, 0xFE, 0xE8, 0x02, 0x00, 0x18, 0x7F, 0x00, 0x00, 0x64, 0xEC, 0x01, 0x00, 0xFE, 0x44, 0x03, 0x00, 0x1C, 0x94, 0x00, 0x00, 0xA8, 0x66, 0x03, 0x00, 0x74, 0xE9, 0x02, 0x00, 0x68, 0x1E, 0x01, 0x00, 0xBC, 0xDA, 0x00, 0x00, 0xEA, 0xE1, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x18, 0x00, 0x96, 0x00, 0x00, 0x00, 0x00, 0x06, 0x01, 0x1A, 0xF0, 0xB5, 0x88, 0xB0, 0xCA, 0x4C, 0x03, 0x20, 0x22, 0x78, 0x63, 0x78, 0xCA, 0x4E, 0x31, 0x1C, 0x01, 0x39, 0x01, 0x25, 0xAE, 0x46, 0xC7, 0x4F, 0xFE, 0x44, 0x38, 0x47, 0xA2, 0x78, 0xE3, 0x78, 0x03, 0x20, 0x31, 0x1C, 0xAE, 0x46 ,
0xC3, 0x4F, 0xFE, 0x44, 0x38, 0x47, 0x03, 0x20, 0x31, 0x1C, 0x01, 0x31, 0xAE, 0x46, 0xC1, 0x4A, 0xFE, 0x44, 0x10, 0x47, 0xC1, 0x48, 0x21, 0x78, 0x01, 0x70, 0x61, 0x78, 0x41, 0x70, 0xE1, 0x78, 0xC1, 0x70, 0xA1, 0x78, 0x81, 0x70, 0xBF, 0x48, 0x04, 0x1C, 0x33, 0x3C, 0x20, 0x1C, 0x00, 0x21, 0xDC, 0x22, 0xAE, 0x46, 0xBA, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x84, 0x20, 0xA0, 0x70, 0x05, 0x27, 0xE7, 0x71, 0x0C, 0x26, 0x26, 0x73, 0x0D, 0x20, 0x00, 0x19, 0x98, 0xA1, 0x32, 0x1C, 0xAE, 0x46, 0xB4, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x04, 0x20, 0x60, 0x76, 0x1A, 0x20, 0x00, 0x19, 0x97, 0xA1, 0x06, 0x91, 0x04, 0x22, 0xAE, 0x46, 0xAE, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0xFF, 0xFF, 0x96, 0x00, 0x18, 0x00, 0x96, 0x00, 0x00, 0x00, 0xA7, 0x77, 0x1F, 0x34, 0x95, 0xA1, 0x07, 0x91, 0x20, 0x1C, 0x3A, 0x1C, 0xAE, 0x46, 0xA9, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0xE6, 0x71, 0x28, 0x1C, 0x60, 0x72, 0x11, 0x20, 0x20, 0x73, 0x94, 0x20 ,
0x60, 0x73, 0xC0, 0x25, 0x65, 0x74, 0xA6, 0x74, 0x09, 0x22, 0xE2, 0x74, 0xA3, 0x4C, 0x20, 0x1C, 0x8C, 0xA1, 0x01, 0x23, 0x9E, 0x46, 0x9F, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x07, 0x22, 0x62, 0x72, 0x9E, 0x4C, 0x0A, 0x34, 0x20, 0x1C, 0x89, 0xA1, 0x01, 0x23, 0x9E, 0x46, 0x9A, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x04, 0x20, 0xE0, 0x71, 0x98, 0x4C, 0x12, 0x34, 0x20, 0x1C, 0x06, 0x99, 0x04, 0x22, 0x01, 0x23, 0x9E, 0x46, 0x94, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x27, 0x71, 0x93, 0x4C, 0x17, 0x34, 0x20, 0x1C, 0x07, 0x99, 0x3A, 0x1C, 0x01, 0x23, 0x9E, 0x46, 0x8E, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0xE6, 0x71, 0x01, 0x20, 0x60, 0x72, 0x11, 0x20, 0x20, 0x73, 0x94, 0x20, 0x60, 0x73, 0x02, 0x20, 0xE0, 0x73, 0x25, 0x74, 0x66, 0x74, 0xFF, 0xFF, 0x2C, 0x01, 0x18, 0x00, 0x96, 0x00, 0x00, 0x00, 0xA5, 0x74, 0x2F, 0x27, 0xE7, 0x74, 0x10, 0x20, 0x60, 0x75, 0x80, 0x26, 0xA6, 0x75, 0x01, 0x20, 0xE0, 0x75, 0x11, 0x20, 0xA0, 0x76 ,
0x94, 0x20, 0xE0, 0x76, 0x24, 0x20, 0x60, 0x77, 0x0A, 0x22, 0xA2, 0x77, 0x80, 0x4C, 0x36, 0x34, 0x20, 0x1C, 0x6D, 0xA1, 0x01, 0x23, 0x9E, 0x46, 0x7C, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x18, 0x22, 0xA2, 0x72, 0x7A, 0x4C, 0x41, 0x34, 0x20, 0x1C, 0x6B, 0xA1, 0x01, 0x23, 0x9E, 0x46, 0x76, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x25, 0x76, 0x67, 0x76, 0x21, 0x20, 0xE0, 0x76, 0x26, 0x77, 0x01, 0x20, 0x60, 0x77, 0x72, 0x48, 0x61, 0x30, 0x11, 0x21, 0x01, 0x70, 0x94, 0x21, 0x41, 0x70, 0x04, 0x21, 0x01, 0x72, 0xD2, 0x21, 0x41, 0x72, 0xC5, 0x72, 0x1E, 0x21, 0x01, 0x73, 0x45, 0x73, 0x9E, 0x21, 0x81, 0x73, 0x01, 0x21, 0x01, 0x74, 0x46, 0x74, 0x81, 0x74, 0x11, 0x21, 0x41, 0x75, 0x94, 0x21, 0x81, 0x75, 0x04, 0x21, 0x01, 0x76, 0xAD, 0x20, 0x66, 0x49, 0x08, 0x60, 0x00, 0x24, 0x0F, 0x25, 0xFF, 0xFF, 0xC2, 0x01, 0x18, 0x00, 0x96, 0x00, 0x00, 0x00, 0x29, 0x06, 0x09, 0x0E, 0x00, 0x20, 0x6A, 0x46, 0x01, 0x23, 0x9E, 0x46 ,
0x62, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x6B, 0x46, 0x18, 0x88, 0x40, 0x08, 0x0E, 0xD3, 0xA0, 0x00, 0x0F, 0x21, 0xCA, 0x43, 0x69, 0x46, 0x0E, 0x88, 0x16, 0x40, 0x01, 0xAF, 0x3E, 0x52, 0x49, 0x88, 0x11, 0x40, 0x68, 0x44, 0xC1, 0x80, 0x60, 0x1C, 0x04, 0x04, 0x24, 0x0C, 0x01, 0x3D, 0x0B, 0x2D, 0xE0, 0xDA, 0x60, 0x1E, 0x00, 0x04, 0x00, 0x0C, 0x1D, 0xD0, 0x86, 0x46, 0x01, 0x1C, 0x01, 0xAD, 0x01, 0x22, 0xAE, 0x88, 0x90, 0x00, 0xC7, 0x5A, 0xB7, 0x42, 0x0A, 0xDA, 0xBC, 0x46, 0x07, 0x1C, 0x6F, 0x44, 0x7F, 0x88, 0x68, 0x44, 0x06, 0x80, 0xEE, 0x88, 0x46, 0x80, 0x60, 0x46, 0xA8, 0x80, 0xEF, 0x80, 0x04, 0x35, 0x50, 0x1C, 0x02, 0x04, 0x12, 0x0C, 0x01, 0x39, 0xE9, 0xD1, 0x70, 0x46, 0x01, 0x38, 0x86, 0x46, 0xE2, 0xD1, 0x99, 0x88, 0x68, 0x46, 0xC0, 0x88, 0x40, 0x18, 0x00, 0x04, 0x00, 0x0C, 0x42, 0x4B, 0x18, 0x80, 0x42, 0x49, 0x08, 0x1A, 0xFF, 0xFF, 0x58, 0x02, 0x18, 0x00, 0x96, 0x00, 0x00, 0x00, 0x58, 0x80 ,
0x02, 0x2C, 0x1E, 0xDB, 0x65, 0x1E, 0x01, 0xAA, 0x01, 0x20, 0x01, 0x1C, 0x8C, 0x00, 0x6B, 0x46, 0xE6, 0x5A, 0x93, 0x88, 0xD4, 0x88, 0xE7, 0x18, 0xB7, 0x42, 0x0C, 0xDA, 0x06, 0x24, 0x44, 0x43, 0x38, 0x4B, 0x1B, 0x19, 0x1F, 0x80, 0x1C, 0x88, 0x34, 0x1B, 0x5C, 0x80, 0x01, 0x24, 0x1C, 0x71, 0x40, 0x1C, 0x00, 0x04, 0x00, 0x0C, 0x04, 0x32, 0x49, 0x1C, 0x09, 0x06, 0x09, 0x0E, 0x01, 0x3D, 0xE4, 0xD1, 0x00, 0x24, 0x31, 0x48, 0x04, 0x70, 0x31, 0x48, 0x04, 0x70, 0x31, 0x48, 0x04, 0x70, 0x31, 0x48, 0x04, 0x70, 0x01, 0x20, 0x86, 0x46, 0x30, 0x48, 0xFE, 0x44, 0x00, 0x47, 0x2F, 0x49, 0x22, 0x1C, 0x08, 0x68, 0x00, 0x28, 0x02, 0xD0, 0x01, 0x20, 0x90, 0x40, 0x04, 0x43, 0x04, 0x31, 0x01, 0x32, 0x20, 0x2A, 0xF5, 0xD3, 0x2A, 0x48, 0x04, 0x60, 0x08, 0xB0, 0xF0, 0xBD, 0x5F, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x2D, 0x69, 0x6E, 0x66, 0x6F, 0x00, 0xC0, 0x46, 0xC0, 0x5F, 0x75, 0x64, 0x70, 0x00, 0xC0, 0xFF, 0xFF ,
0xEE, 0x02, 0x18, 0x00, 0x96, 0x00, 0x00, 0x00, 0x46, 0xC0, 0x6C, 0x6F, 0x63, 0x61, 0x6C, 0x00, 0xC0, 0x46, 0x5F, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x00, 0xC0, 0x46, 0x5F, 0x64, 0x6E, 0x73, 0x2D, 0x73, 0x64, 0x00, 0x64, 0x65, 0x76, 0x3D, 0x43, 0x43, 0x33, 0x30, 0x30, 0x30, 0x00, 0xC0, 0x76, 0x65, 0x6E, 0x64, 0x6F, 0x72, 0x3D, 0x54, 0x65, 0x78, 0x61, 0x73, 0x2D, 0x49, 0x6E, 0x73, 0x74, 0x72, 0x75, 0x6D, 0x65, 0x6E, 0x74, 0x73, 0x00, 0xC0, 0x46, 0xC0, 0x00, 0x00, 0x18, 0x00, 0xF3, 0x7E, 0x03, 0x00, 0xC6, 0x05, 0x00, 0x00, 0xDD, 0x7E, 0x03, 0x00, 0xE4, 0x62, 0x08, 0x00, 0xC9, 0xBA, 0x03, 0x00, 0x09, 0xB4, 0x03, 0x00, 0xA7, 0x64, 0x08, 0x00, 0x70, 0x64, 0x08, 0x00, 0xDD, 0x0A, 0x02, 0x00, 0x48, 0x32, 0x08, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xE8, 0x62, 0x08, 0x00, 0xE9, 0x62, 0x08, 0x00, 0xEA, 0x62, 0x08, 0x00, 0xEB, 0x62, 0x08, 0x00, 0x81, 0x03, 0x18, 0x00, 0x80, 0x7B, 0x08, 0x00 ,
0x84, 0xF3, 0x1A, 0x00, 0x0D, 0x49, 0x0E, 0x48, 0xFF, 0xFF, 0x84, 0x03, 0x18, 0x00, 0x6C, 0x00, 0x00, 0x00, 0x88, 0x67, 0x0E, 0x48, 0x88, 0x64, 0x0E, 0x48, 0x48, 0x64, 0x0E, 0x48, 0xC8, 0x64, 0x0E, 0x48, 0x08, 0x65, 0x11, 0x48, 0x02, 0x1C, 0x04, 0x32, 0x0C, 0x4B, 0x13, 0x60, 0x0C, 0x4B, 0x93, 0x62, 0x0C, 0x4A, 0x8A, 0x66, 0x0D, 0x49, 0x01, 0x60, 0x0D, 0x48, 0x0E, 0x49, 0x01, 0x60, 0x0E, 0x49, 0x41, 0x60, 0xF7, 0x46, 0x1C, 0x21, 0x08, 0x00, 0x4F, 0x7B, 0x08, 0x00, 0x45, 0x7B, 0x08, 0x00, 0x3B, 0x7B, 0x08, 0x00, 0x6D, 0x7B, 0x08, 0x00, 0x63, 0x7B, 0x08, 0x00, 0x59, 0x7B, 0x08, 0x00, 0x31, 0x7B, 0x08, 0x00, 0x13, 0x7B, 0x08, 0x00, 0x50, 0x23, 0x08, 0x00, 0x09, 0x7B, 0x08, 0x00, 0x58, 0x26, 0x08, 0x00, 0x27, 0x7B, 0x08, 0x00, 0x1D, 0x7B, 0x08, 0x00 };
uint16_t drv_length = 8076;
//Service Pack version P1.12.7.15.15 - FW patches
unsigned char PROGMEM fw_patch[5700] = { 0x00, 0x01, 0x00, 0x00, 0x3C, 0x16, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x14, 0x03, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x68, 0x46, 0x25, 0xF0, 0x95, 0xFB, 0xE0, 0x6B, 0xD0, 0x03, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x38, 0xFB, 0x2C, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x0A, 0xFB, 0x04, 0x15, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xB8, 0xF1, 0x90, 0x0F, 0xA4, 0x16, 0x00, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x66, 0xE0, 0x04, 0xA8, 0x35, 0x1D, 0x21, 0xF0, 0x99, 0xFC, 0x68, 0x46, 0x23, 0xF0, 0x28, 0xFB, 0x9A, 0xF8, 0x00, 0x00, 0x01, 0x28, 0x07, 0xD1, 0x28, 0x46, 0x05, 0xF0, 0xC3, 0xFE, 0x01, 0x46, 0x01, 0xAA, 0x00, 0x20, 0x21, 0xF0, 0x50, 0xF9, 0x28, 0x46, 0x05, 0xF0, 0xBB, 0xFE, 0x01, 0xA9, 0x21, 0xF0, 0x2A, 0xFA, 0xE9, 0x79, 0x4F, 0xEA, 0xE0, 0x00, 0x40, 0xB2, 0x11, 0xB1, 0x00, 0xF1, 0x06, 0x00, 0x40, 0xB2, 0xA8, 0x71, 0x1F, 0x38, 0x40, 0x00, 0xE8, 0x71, 0x30, 0x46 ,
0x01, 0xF0, 0x0D, 0xFF, 0x10, 0xF1, 0x00, 0x09, 0x4F, 0xF0, 0x00, 0x01, 0x09, 0xD0, 0x28, 0x68, 0x40, 0x0C, 0x09, 0xD3, 0xE8, 0x68, 0xC0, 0x0B, 0x03, 0xD2, 0x48, 0x46, 0xFF, 0xF7, 0xDD, 0xFE, 0x01, 0x21, 0x28, 0x68, 0x40, 0x0C, 0x0A, 0xD2, 0x38, 0x68, 0x40, 0x1C, 0x38, 0x60, 0x20, 0x68, 0x6F, 0xF3, 0x0F, 0x00, 0x20, 0x60, 0x22, 0x68, 0x38, 0x68, 0x10, 0x43, 0x20, 0x60, 0xE8, 0x68, 0xC0, 0x0B, 0x0F, 0xD3, 0xD8, 0xF8, 0x00, 0x00, 0x00, 0xF1, 0x01, 0x00, 0xC8, 0xF8, 0x00, 0x00, 0x20, 0x68, 0x6F, 0xF3, 0x1F, 0x40, 0x20, 0x60, 0xD8, 0xF8, 0x00, 0x20, 0x20, 0x68, 0x40, 0xEA, 0x02, 0x40, 0x20, 0x60, 0x49, 0xB9, 0xB9, 0xF1, 0x00, 0x0F, 0x03, 0xD1, 0x30, 0x46, 0x07, 0xF0, 0xBE, 0xF9, 0x02, 0xE0, 0x48, 0x46, 0x07, 0xF0, 0x06, 0xFA, 0x6C, 0x17, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x68, 0x46, 0x0E, 0xF0, 0x85, 0xFB, 0x00, 0x9E, 0x00, 0x2E, 0x96, 0xD1, 0x05, 0xB0, 0xBD, 0xE8, 0xF0, 0x87, 0xC0, 0x46 ,
0x9C, 0x20, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0xF0, 0x2A, 0xFE, 0x74, 0x47, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0B, 0x21, 0x21, 0xF0, 0x41, 0xFA, 0x20, 0x68, 0x18, 0x4B, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x21, 0xF0, 0x1C, 0xF9, 0x0A, 0xE0, 0x20, 0x68, 0x00, 0x68, 0x0C, 0x21, 0x40, 0xF0, 0x20, 0x00, 0x21, 0xF0, 0x14, 0xF9, 0x10, 0x57, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0xA8, 0x20, 0xF0, 0x97, 0xF9, 0x01, 0x98, 0x5C, 0x57, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0xA8, 0x20, 0xF0, 0x71, 0xF9, 0x03, 0x98, 0x00, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0xF0, 0x20, 0xF9, 0x1C, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0xF0, 0x12, 0xF9, 0x54, 0x58, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x09, 0xA8, 0x20, 0xF0, 0xF5, 0xF8, 0x04, 0xAB, 0x04, 0x62, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x79, 0x1F, 0xF0, 0x1B, 0xFD, 0x69, 0xE0, 0x60, 0x93, 0x00, 0x00, 0x40, 0x00 ,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0xA6, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x78, 0x1B, 0xF0, 0x39, 0xFB, 0x28, 0x46, 0x90, 0xA8, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x78, 0x1B, 0xF0, 0x69, 0xF9, 0x1E, 0x48, 0x34, 0xAD, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x09, 0x68, 0xFF, 0x29, 0x98, 0xAD, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x10, 0xD4, 0x21, 0xD4, 0xB2, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x09, 0xD0, 0x1A, 0xF0, 0x47, 0xFC, 0x20, 0x98, 0xAC, 0xC5, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x78, 0x19, 0xF0 ,
0xDB, 0xFA, 0x09, 0x49, 0x28, 0xC6, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x19, 0xF0, 0x9E, 0xFA, 0xDC, 0xD3, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0xB5, 0x18, 0xF0, 0xAB, 0xFC, 0x00, 0xF0, 0x03, 0xF8, 0x00, 0xBD, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xDF, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x17, 0xF0, 0xA8, 0xFD, 0xCC, 0xEB, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x38, 0x78, 0x17, 0xF0, 0x77, 0xF8, 0x38, 0x78, 0x16, 0xF0, 0xF0, 0xFF, 0xA8, 0xF7, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0E, 0x49, 0x09, 0x68, 0x23, 0x22, 0x41, 0x61, 0xC8, 0xF7, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x31, 0x2E, 0x31, 0x39, 0x2E, 0x33, 0x31, 0x34, 0x5F, 0x4E, 0x65, 0x77, 0x5F, 0x43, 0x43, 0x41, 0x5F, 0x61, 0x6C, 0x67, 0x6F, 0x72, 0x69, 0x74, 0x68, 0x6D, 0x00, 0xC0, 0x74, 0x56, 0x30, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xF9, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0xA8, 0x16, 0xF0, 0x79, 0xF8 ,
0x12, 0xE0, 0x38, 0xFA, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0xA8, 0x16, 0xF0, 0x03, 0xF8, 0x32, 0x20, 0x94, 0xFB, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x0C, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x05, 0xA8, 0x14, 0xF0, 0x05, 0xFF, 0x01, 0xF0, 0x10, 0x1B, 0x01, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x1E, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x13, 0xF0, 0x46, 0xBF, 0x18, 0x30, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x30, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x12, 0xF0, 0xD8, 0xFC, 0x9C, 0x31, 0x01, 0x00, 0x08, 0x00 ,
0x00, 0x00, 0x68, 0x46, 0x12, 0xF0, 0x51, 0xFC, 0xFE, 0xF7, 0xF0, 0x35, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x68, 0x46, 0x12, 0xF0, 0x27, 0xFA, 0xFE, 0xF7, 0xF0, 0x3D, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x05, 0xA9, 0x11, 0xF0, 0x27, 0xFE, 0x20, 0x6F, 0xD0, 0x62, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0F, 0xF0, 0xB8, 0xFB, 0x80, 0x7E, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0xDF, 0xF8, 0x58, 0x82, 0xE0, 0x7E, 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0D, 0xF0, 0x6A, 0xFE, 0x0B, 0xF0, 0x9A, 0xF9, 0x03, 0x20, 0xA8, 0xF5, 0x88, 0x71, 0x08, 0x60, 0xF2, 0xF7, 0x16, 0xF9, 0x7A, 0x48, 0x6B, 0x49, 0x9C, 0x7F, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x70, 0x51, 0x4D, 0xC4, 0x7F, 0x01, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x40, 0x49, 0x00, 0xF1, 0x52, 0x00, 0x3A, 0x4A, 0xA8, 0x81, 0x28, 0x83, 0xE8, 0x83, 0xE8, 0x84, 0xA8, 0x85, 0x2A, 0x60, 0x39, 0x48, 0x41, 0xF2, 0x11, 0x12, 0x2A, 0x85, 0x18, 0x90, 0x19, 0x91 ,
0x39, 0x49, 0x1A, 0x91, 0x39, 0x49, 0x1B, 0x91, 0x39, 0x49, 0x20, 0x46, 0xDF, 0xF8, 0xC4, 0x90, 0x1C, 0x91, 0x38, 0x49, 0xDF, 0xF8, 0xC0, 0xB0, 0x31, 0x4E, 0x1D, 0x91, 0x48, 0x80, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0xF0, 0x7C, 0xFA, 0xB4, 0x80, 0x01, 0x00, 0x34, 0x00, 0x00, 0x00, 0x34, 0x12, 0x66, 0x09, 0x84, 0x6B, 0x00, 0x20, 0x94, 0x70, 0x00, 0x20, 0xB4, 0x70, 0x00, 0x20, 0xC4, 0x78, 0x00, 0x20, 0x50, 0x7A, 0x00, 0x20, 0xFE, 0xFF, 0x03, 0x00, 0xA4, 0x70, 0x00, 0x20, 0xB0, 0x70, 0x00, 0x20, 0xB8, 0x70, 0x00, 0x20, 0x60, 0x55, 0x30, 0x80, 0x3C, 0x5C, 0x00, 0x20, 0x04, 0x74, 0x00, 0x20, 0xB8, 0xE4, 0x01, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x20, 0x78, 0x07, 0xF0, 0x01, 0xFC, 0x20, 0x78, 0x07, 0xF0, 0x7A, 0xFB, 0x04, 0x4D, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x2D, 0xE9, 0xF0, 0x4F, 0xAD, 0xF1, 0x8C, 0x0D, 0x04, 0x68, 0x0F, 0x30, 0x03, 0x94, 0xFE, 0xF7, 0xDB, 0xFA, 0x04, 0xF1, 0x14, 0x00 ,
0x04, 0x90, 0x21, 0x7D, 0x00, 0x20, 0x21, 0xF0, 0x73, 0x01, 0x88, 0x29, 0x08, 0xBF, 0x01, 0x20, 0x05, 0x90, 0x03, 0x98, 0x00, 0x1D, 0x06, 0x90, 0x5D, 0x48, 0x00, 0x68, 0x01, 0x28, 0x40, 0xF0, 0xFA, 0x83, 0x5B, 0x4D, 0x5C, 0x48, 0xDF, 0xF8, 0x70, 0x91, 0x29, 0x68, 0xDF, 0xF8, 0x70, 0x81, 0xDF, 0xF8, 0x74, 0xA1, 0x88, 0x42, 0x21, 0xD1, 0x10, 0x22, 0x00, 0x21, 0x48, 0x46, 0x4F, 0x46, 0xFB, 0xF7, 0xB7, 0xFE, 0x10, 0x22, 0x00, 0x21, 0x40, 0x46, 0xFB, 0xF7, 0xB2, 0xFE, 0x54, 0x49, 0x08, 0x68, 0x40, 0xF4, 0x80, 0x10, 0x08, 0x60, 0x01, 0x20, 0x51, 0x46, 0x08, 0x60, 0x00, 0x21, 0x29, 0x60, 0x39, 0x78, 0x46, 0x46, 0x00, 0x91, 0x31, 0x78, 0x41, 0xF2, 0x11, 0x13, 0x04, 0x22, 0x01, 0x91, 0x07, 0x21, 0x02, 0x90, 0x03, 0x20, 0xF3, 0xF7, 0x41, 0xFC, 0x51, 0x46, 0x07, 0x91, 0x08, 0x68, 0x56, 0x49, 0xDF, 0xF8, 0x5C, 0xB1, 0x01, 0x28, 0x08, 0x91, 0x56, 0x49, 0xDF, 0xF8, 0x48, 0xA1, 0x09, 0x91, 0x55, 0x49 ,
0x0A, 0x91, 0x44, 0x49, 0x0B, 0x91, 0x44, 0x49, 0x0C, 0x91, 0x44, 0x49, 0x0D, 0x91, 0x44, 0x49, 0x0E, 0x91, 0x44, 0x49, 0x0F, 0x91, 0x44, 0x49, 0x10, 0x91, 0x44, 0x49, 0xCC, 0x4D, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x11, 0x91, 0x44, 0x49, 0x12, 0x91, 0x44, 0x49, 0x13, 0x91, 0x44, 0x49, 0x14, 0x91, 0x44, 0x49, 0x15, 0x91, 0x44, 0x49, 0x16, 0x91, 0x9F, 0x49, 0x17, 0x91, 0x9F, 0x49, 0x18, 0x91, 0x9F, 0x49, 0x19, 0x91, 0x9F, 0x49, 0x1A, 0x91, 0x9F, 0x49, 0x1B, 0x91, 0x9F, 0x49, 0x1C, 0x91, 0x9F, 0x49, 0x1D, 0x91, 0x9F, 0x49, 0x1E, 0x91, 0x9F, 0x49, 0x1F, 0x91, 0x40, 0xF0, 0x00, 0x81, 0x04, 0x98, 0x40, 0x78, 0x00, 0xF0, 0x03, 0x01, 0x01, 0x29, 0x40, 0xF0, 0xF9, 0x80, 0x04, 0x99, 0x09, 0x78, 0x01, 0xF0, 0x0C, 0x01, 0x08, 0x29, 0x40, 0xF0, 0xF2, 0x80, 0x06, 0x99, 0x09, 0x88, 0xA1, 0xF1, 0x3C, 0x01, 0x0E, 0xB2, 0x05, 0x99, 0x11, 0xB1, 0xA6, 0xF1, 0x02, 0x06, 0x36, 0xB2, 0xC0, 0x09, 0x4F, 0xF0 ,
0x00, 0x07, 0x15, 0xD3, 0x08, 0x3E, 0x36, 0xB2, 0x03, 0x2E, 0x10, 0xD0, 0x17, 0x2E, 0x0E, 0xD0, 0x08, 0x3E, 0x36, 0xB2, 0x03, 0x2E, 0x08, 0xD0, 0x17, 0x2E, 0x06, 0xD0, 0x36, 0x1F, 0x36, 0xB2, 0x03, 0x2E, 0x14, 0xBF, 0x17, 0x2E, 0x02, 0x27, 0x02, 0xE0, 0x03, 0x27, 0x00, 0xE0, 0x01, 0x27, 0x03, 0x2E, 0x18, 0xBF, 0x17, 0x2E, 0x04, 0x9A, 0x40, 0xF0, 0xC8, 0x80, 0x0A, 0x32, 0x12, 0xF8, 0x01, 0x1B, 0x05, 0x24, 0x12, 0xF8, 0x01, 0x3B, 0x4B, 0x40, 0x64, 0x1E, 0xD9, 0xB2, 0xF9, 0xD1, 0x81, 0xEA, 0x21, 0x11, 0x03, 0x2E, 0x94, 0x4E, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x01, 0xF0, 0x0F, 0x01, 0x48, 0x46, 0x35, 0xD0, 0x43, 0x46, 0xCA, 0x5C, 0x52, 0x1C, 0xCA, 0x54, 0x0C, 0x18, 0x33, 0xE0, 0x50, 0x57, 0x02, 0x00, 0x04, 0x74, 0x00, 0x20, 0x34, 0x12, 0x66, 0x09, 0x60, 0x57, 0x02, 0x00, 0x70, 0x57, 0x02, 0x00, 0xC8, 0x48, 0x30, 0x80, 0x4C, 0x57, 0x02, 0x00, 0x88, 0x57, 0x02, 0x00, 0x80, 0x57, 0x02, 0x00 ,
0x18, 0x58, 0x02, 0x00, 0x20, 0x58, 0x02, 0x00, 0x28, 0x58, 0x02, 0x00, 0x30, 0x58, 0x02, 0x00, 0x38, 0x58, 0x02, 0x00, 0x40, 0x58, 0x02, 0x00, 0xE4, 0x58, 0x02, 0x00, 0xE2, 0x58, 0x02, 0x00, 0x14, 0x58, 0x02, 0x00, 0xEF, 0x58, 0x02, 0x00, 0xE0, 0x58, 0x02, 0x00, 0xEE, 0x58, 0x02, 0x00, 0x5C, 0x57, 0x02, 0x00, 0xE6, 0x58, 0x02, 0x00, 0xE8, 0x58, 0x02, 0x00, 0x0C, 0x18, 0x20, 0x78, 0x40, 0x1C, 0x20, 0x70, 0x20, 0x78, 0x43, 0x46, 0x03, 0xEB, 0x01, 0x08, 0x0A, 0x28, 0x76, 0xDB, 0x98, 0xF8, 0x00, 0x00, 0x0A, 0x28, 0x72, 0xDB, 0x94, 0x48, 0x00, 0x25, 0x01, 0x60, 0x04, 0x98, 0x00, 0xF1, 0x0A, 0x09, 0x40, 0x78, 0x41, 0x08, 0x24, 0xBF, 0x04, 0x99, 0x09, 0x1D, 0x04, 0xD2, 0x80, 0x08, 0x2E, 0xBF, 0x49, 0x46, 0x04, 0x99, 0x10, 0x31, 0x0B, 0x98, 0x06, 0x22, 0xFA, 0xF7, 0xB9, 0xFC, 0x0C, 0x98, 0x06, 0x22, 0x49, 0x46, 0xFA, 0xF7, 0xB4, 0xFC, 0x9B, 0x48, 0x9A, 0x49, 0x5C, 0x4F, 0x02, 0x00, 0xC8, 0x00 ,
0x00, 0x00, 0x00, 0x78, 0x08, 0x22, 0x08, 0x60, 0x58, 0x46, 0x07, 0x60, 0x0D, 0x98, 0x29, 0x46, 0xFB, 0xF7, 0xAF, 0xFD, 0x08, 0x22, 0x0E, 0x98, 0x29, 0x46, 0xFB, 0xF7, 0xAA, 0xFD, 0x08, 0x22, 0x0F, 0x98, 0x29, 0x46, 0xFB, 0xF7, 0xA5, 0xFD, 0x08, 0x22, 0x10, 0x98, 0x29, 0x46, 0xFB, 0xF7, 0xA0, 0xFD, 0x08, 0x22, 0x11, 0x98, 0x29, 0x46, 0xFB, 0xF7, 0x9B, 0xFD, 0x08, 0x22, 0x12, 0x98, 0x29, 0x46, 0xFB, 0xF7, 0x96, 0xFD, 0x07, 0x99, 0x02, 0x20, 0x08, 0x60, 0x13, 0x99, 0x28, 0x46, 0x08, 0x80, 0x08, 0x99, 0x08, 0x70, 0x14, 0x99, 0x08, 0x70, 0x15, 0x99, 0x08, 0x60, 0x16, 0x99, 0x08, 0x70, 0x17, 0x99, 0x08, 0x60, 0x18, 0x99, 0x08, 0x60, 0x19, 0x99, 0x08, 0x60, 0x09, 0x99, 0x08, 0x80, 0x0A, 0x99, 0x08, 0x80, 0x1A, 0x99, 0x08, 0x80, 0x7D, 0x49, 0x0D, 0x60, 0x1B, 0x99, 0x08, 0x70, 0x1C, 0x99, 0x08, 0x70, 0x1D, 0x99, 0x08, 0x70, 0x1E, 0x99, 0x08, 0x80, 0x1F, 0x99, 0x08, 0x80, 0x51, 0x46, 0x08, 0x80 ,
0x20, 0x78, 0x00, 0x96, 0x04, 0x22, 0x01, 0x90, 0x98, 0xF8, 0x00, 0x00, 0x41, 0xF2, 0x14, 0x13, 0x07, 0x21, 0x02, 0x90, 0x03, 0x20, 0xF3, 0xF7, 0x07, 0xFB, 0x07, 0x98, 0xA2, 0x49, 0x00, 0x68, 0x20, 0x91, 0xA2, 0x49, 0x05, 0x28, 0x21, 0x91, 0x9E, 0x49, 0x22, 0x91, 0x40, 0xF0, 0x37, 0x82, 0x04, 0x98, 0x40, 0x78, 0x24, 0x50, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x41, 0x08, 0x24, 0xBF, 0x04, 0x99, 0x09, 0x1D, 0x05, 0xD2, 0x80, 0x08, 0x27, 0xBF, 0x04, 0x99, 0x0A, 0x31, 0x04, 0x99, 0x10, 0x31, 0x0B, 0x98, 0xF8, 0xF7, 0x2D, 0xFC, 0x01, 0x28, 0x04, 0x98, 0x40, 0xF0, 0x23, 0x82, 0x40, 0x78, 0x00, 0xF0, 0x03, 0x00, 0x03, 0x28, 0x18, 0xD0, 0x02, 0x28, 0x07, 0xBF, 0x04, 0x99, 0x10, 0x31, 0x04, 0x99, 0x0A, 0x31, 0x13, 0xE0, 0x48, 0x58, 0x02, 0x00, 0x4C, 0x58, 0x02, 0x00, 0x50, 0x58, 0x02, 0x00, 0xF0, 0x58, 0x02, 0x00, 0xF2, 0x58, 0x02, 0x00, 0xF3, 0x58, 0x02, 0x00, 0xF4, 0x58, 0x02, 0x00, 0xEA, 0x58 ,
0x02, 0x00, 0xEC, 0x58, 0x02, 0x00, 0x04, 0x99, 0x18, 0x31, 0x0C, 0x98, 0xF8, 0xF7, 0x06, 0xFC, 0x04, 0x99, 0x01, 0x28, 0x40, 0xF0, 0xFC, 0x81, 0x49, 0x78, 0x01, 0xF0, 0x03, 0x01, 0x01, 0x29, 0x40, 0xF0, 0xF6, 0x81, 0x59, 0x46, 0x09, 0x68, 0x04, 0x9A, 0x8E, 0x46, 0x51, 0x46, 0xD2, 0x8A, 0x0B, 0x88, 0x12, 0x11, 0x93, 0x42, 0x00, 0xF0, 0x37, 0x82, 0x0A, 0x80, 0x06, 0x99, 0x09, 0x88, 0x3C, 0x39, 0x0B, 0xB2, 0x71, 0x46, 0x49, 0x1E, 0x09, 0xD0, 0x49, 0x1E, 0x04, 0xD0, 0x49, 0x1E, 0x08, 0xD1, 0xA3, 0xF1, 0x10, 0x03, 0x04, 0xE0, 0xA3, 0xF1, 0x14, 0x03, 0x01, 0xE0, 0xA3, 0xF1, 0x08, 0x03, 0x1B, 0xB2, 0x05, 0x98, 0x10, 0xB1, 0xA3, 0xF1, 0x02, 0x03, 0x1B, 0xB2, 0xEC, 0x50, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x00, 0xF1, 0xCE, 0x81, 0x16, 0x98, 0x40, 0xF2, 0x77, 0x51, 0x99, 0x42, 0x0B, 0x90, 0x14, 0x98, 0x05, 0x90, 0x00, 0xF0, 0xA3, 0x81, 0x08, 0x46, 0x00, 0xF1, 0x3C, 0x00, 0x98, 0x42 ,
0x05, 0x9A, 0x00, 0xF0, 0x9A, 0x81, 0xDF, 0xF8, 0x48, 0x82, 0x14, 0x78, 0x0B, 0x9A, 0xBB, 0x2C, 0x12, 0x78, 0x0C, 0x92, 0x63, 0xD1, 0xDD, 0xF8, 0x68, 0xC0, 0xBC, 0xF9, 0x00, 0x20, 0x91, 0x42, 0x18, 0xBF, 0x90, 0x42, 0x5B, 0xD1, 0x1C, 0x2B, 0x4F, 0xF0, 0x00, 0x00, 0xC0, 0xF2, 0x82, 0x81, 0x3D, 0x2B, 0x13, 0x9D, 0x80, 0xF2, 0x7E, 0x81, 0xA3, 0xF1, 0x1C, 0x01, 0x09, 0xB2, 0x29, 0x80, 0x1E, 0x9A, 0xDD, 0xF8, 0x30, 0x90, 0xB2, 0xF9, 0x00, 0x60, 0xB9, 0xF1, 0x01, 0x0F, 0x15, 0xD1, 0xDD, 0xF8, 0x24, 0x90, 0x03, 0x2E, 0x0D, 0xDA, 0xB9, 0xF9, 0x00, 0x70, 0xB9, 0x42, 0x07, 0xD0, 0x01, 0x26, 0x16, 0x80, 0x4A, 0x46, 0x0E, 0x46, 0x03, 0xE0, 0xC0, 0x46, 0x90, 0x57, 0x02, 0x00, 0x76, 0x1C, 0x16, 0x80, 0x1B, 0x9A, 0x16, 0x78, 0x1D, 0x9A, 0x16, 0x70, 0x0C, 0x9A, 0x1F, 0x9E, 0x02, 0x2A, 0x28, 0xD1, 0xB6, 0xF9, 0x00, 0x20, 0xBE, 0xF1, 0x00, 0x0F, 0x1A, 0xD0, 0x03, 0x2A, 0x35, 0x46, 0x0B, 0xDA, 0x0A, 0x9E ,
0xB6, 0xF9, 0x00, 0x70, 0xB9, 0x42, 0x04, 0xD0, 0x01, 0x22, 0x2A, 0x80, 0x0A, 0x46, 0x35, 0x46, 0x00, 0xE0, 0xB4, 0x51, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x52, 0x1C, 0x2A, 0x80, 0x1C, 0x99, 0x0A, 0x78, 0x1D, 0x99, 0x0A, 0x70, 0x0F, 0xE0, 0xC0, 0x46, 0x58, 0x57, 0x02, 0x00, 0xA6, 0x64, 0x00, 0x20, 0x54, 0x57, 0x02, 0x00, 0x28, 0x80, 0x05, 0x99, 0x08, 0x70, 0x08, 0x9A, 0x11, 0x78, 0x41, 0xF0, 0x04, 0x01, 0x11, 0x70, 0x04, 0x46, 0x45, 0x46, 0xAC, 0xF8, 0x00, 0x00, 0x28, 0x70, 0xCC, 0x2C, 0x09, 0x9A, 0x40, 0xF0, 0x00, 0x81, 0xDD, 0xF8, 0x7C, 0xC0, 0x0A, 0x99, 0x1E, 0x9F, 0x45, 0x46, 0xB1, 0xF9, 0x00, 0x60, 0xB2, 0xF9, 0x00, 0x90, 0x28, 0x78, 0xCD, 0xF8, 0x50, 0xC0, 0x16, 0x91, 0x0A, 0x97, 0x13, 0x92, 0x09, 0x95, 0x0C, 0x99, 0x01, 0x29, 0x05, 0xD1, 0x05, 0x9A, 0xB0, 0xEB, 0x49, 0x0F, 0x01, 0xD1, 0x00, 0x21, 0x11, 0x70, 0x0C, 0x99, 0x02, 0x29, 0x05, 0xD1, 0x05, 0x9A, 0xB0, 0xEB, 0x46, 0x0F ,
0x01, 0xD1, 0x00, 0x21, 0x11, 0x70, 0xB3, 0xF5, 0x14, 0x7F, 0x40, 0xF3, 0xBA, 0x80, 0x40, 0xF2, 0x51, 0x31, 0x99, 0x42, 0x08, 0x99, 0x40, 0xF3, 0xB4, 0x80, 0x09, 0x78, 0x06, 0x29, 0x00, 0xF0, 0xB0, 0x80, 0xA3, 0xF2, 0x51, 0x21, 0x0B, 0xB2, 0x4F, 0xEA, 0xE3, 0x01, 0x03, 0xEB, 0x11, 0x71, 0x4F, 0xEA, 0x21, 0x11, 0xCA, 0xB2, 0x4F, 0xEA, 0xE3, 0x01, 0x03, 0xEB, 0x11, 0x71, 0x15, 0x9D, 0x21, 0xF0, 0x0F, 0x01, 0xA3, 0xEB, 0x01, 0x03, 0x1D, 0x99, 0x2E, 0x68, 0x7C, 0x52, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x91, 0xF8, 0x00, 0xE0, 0x5F, 0xFA, 0x83, 0xF8, 0x60, 0xB1, 0x31, 0x18, 0x11, 0xF8, 0x01, 0x1C, 0x51, 0x40, 0xCB, 0xB2, 0x07, 0xE0, 0xC0, 0x46, 0x58, 0x58, 0x02, 0x00, 0x54, 0x58, 0x02, 0x00, 0xDC, 0x58, 0x02, 0x00, 0x13, 0x46, 0x19, 0x99, 0xDD, 0xF8, 0x6C, 0xA0, 0xDD, 0xF8, 0x70, 0xB0, 0xD1, 0xF8, 0x00, 0xC0, 0x00, 0xF0, 0x0F, 0x01, 0x99, 0x42, 0x22, 0xD0, 0x0A, 0x9B, 0x86, 0x45, 0x9A, 0xF8 ,
0x00, 0x10, 0xB3, 0xF9, 0x00, 0x30, 0x9B, 0xF8, 0x00, 0x50, 0x15, 0xDD, 0x37, 0x5C, 0x44, 0x1C, 0x82, 0xEA, 0x07, 0x0C, 0x04, 0xF0, 0x0F, 0x07, 0x67, 0x45, 0x0B, 0xD0, 0xA6, 0x45, 0x06, 0x44, 0x0A, 0xDD, 0x76, 0x78, 0x72, 0x40, 0x86, 0x1C, 0x06, 0xF0, 0x0F, 0x06, 0x96, 0x42, 0x03, 0xD1, 0xC0, 0x1C, 0x4D, 0xE0, 0x80, 0x1C, 0x4B, 0xE0, 0x05, 0x9E, 0x00, 0x22, 0x32, 0x70, 0x4A, 0xE0, 0x00, 0xF0, 0x1F, 0x01, 0x01, 0x22, 0x8A, 0x40, 0x17, 0x99, 0xC4, 0x10, 0x0B, 0x68, 0x24, 0xF0, 0x03, 0x01, 0x5C, 0xF8, 0x01, 0x70, 0x3A, 0x42, 0x32, 0xD1, 0x5F, 0x58, 0x3A, 0x42, 0x06, 0x44, 0x1F, 0xD0, 0x18, 0x9B, 0x37, 0x78, 0x1B, 0x68, 0xB8, 0x45, 0x04, 0xD1, 0x58, 0x58, 0x02, 0x42, 0x19, 0xD0, 0x63, 0x46, 0x15, 0xE0, 0xA1, 0x10, 0x8C, 0x00, 0x19, 0x59, 0x91, 0x43, 0x19, 0x51, 0x00, 0x90, 0x30, 0x78, 0x01, 0x90, 0x44, 0x53, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x03, 0x20, 0x06, 0x21, 0x02, 0x46, 0x4D, 0xF6 ,
0x80, 0x53, 0xF3, 0xF7, 0x63, 0xF9, 0x09, 0x99, 0x28, 0x68, 0x0E, 0x78, 0x36, 0x18, 0x06, 0xE0, 0xE3, 0x58, 0x02, 0x00, 0xA0, 0x10, 0x81, 0x00, 0x58, 0x58, 0x02, 0x43, 0x5A, 0x50, 0x86, 0xF8, 0x00, 0x80, 0x0B, 0x98, 0x00, 0x78, 0x0C, 0x90, 0x13, 0x98, 0xB0, 0xF9, 0x00, 0x90, 0x09, 0x98, 0x00, 0x78, 0x0A, 0x9A, 0x40, 0x1C, 0x9B, 0xF8, 0x00, 0x50, 0x9A, 0xF8, 0x00, 0x10, 0xB2, 0xF9, 0x00, 0x30, 0x09, 0x9A, 0xC0, 0xB2, 0x10, 0x70, 0x0C, 0x9A, 0x01, 0x2A, 0x03, 0xD1, 0x88, 0x42, 0xC8, 0xBF, 0x8A, 0xF8, 0x00, 0x00, 0x0C, 0x99, 0x02, 0x29, 0x07, 0xD1, 0xA8, 0x42, 0xC8, 0xBF, 0x8B, 0xF8, 0x00, 0x00, 0x02, 0xE0, 0x0A, 0x98, 0xB0, 0xF9, 0x00, 0x30, 0xB9, 0xF1, 0x00, 0x0F, 0x06, 0xDD, 0x03, 0x2B, 0x04, 0xD1, 0x11, 0x98, 0x01, 0x22, 0x49, 0x46, 0x00, 0xF0, 0x72, 0xFB, 0x16, 0x98, 0xB0, 0xF9, 0x00, 0x10, 0x14, 0x98, 0x00, 0x29, 0xB0, 0xF9, 0x00, 0x00, 0x05, 0xDD, 0x03, 0x28, 0x03, 0xD1, 0x12, 0x98 ,
0x02, 0x22, 0x00, 0xF0, 0x64, 0xFB, 0x05, 0x98, 0x04, 0x78, 0x0B, 0x98, 0x00, 0x78, 0x0C, 0x90, 0x08, 0x98, 0xBB, 0x2C, 0x01, 0x78, 0x02, 0xD0, 0xAA, 0x2C, 0x2F, 0xD0, 0x31, 0xE0, 0x0C, 0x98, 0x01, 0x28, 0x0B, 0xD1, 0x0D, 0x98, 0x17, 0x9A, 0x10, 0x60, 0x0C, 0x54, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x0F, 0x98, 0x18, 0x9A, 0x10, 0x60, 0x19, 0x9A, 0x11, 0x98, 0x10, 0x60, 0x47, 0x4A, 0x15, 0x98, 0x02, 0x60, 0x0C, 0x98, 0x02, 0x28, 0x0B, 0xD1, 0x0E, 0x98, 0x17, 0x9A, 0x10, 0x60, 0x10, 0x98, 0x18, 0x9A, 0x10, 0x60, 0x19, 0x9A, 0x12, 0x98, 0x10, 0x60, 0x41, 0x4A, 0x15, 0x98, 0x02, 0x60, 0xCC, 0x20, 0x0F, 0xE0, 0x08, 0x99, 0x09, 0x78, 0x0C, 0xE0, 0x02, 0x20, 0x00, 0xE0, 0x01, 0x20, 0x0B, 0x99, 0x08, 0x70, 0x1A, 0x99, 0x0B, 0x80, 0x13, 0x99, 0x00, 0x20, 0x08, 0x80, 0x08, 0x98, 0x01, 0x78, 0xBB, 0x20, 0x05, 0x9A, 0x10, 0x70, 0x06, 0x29, 0x07, 0x99, 0x11, 0xD1, 0x06, 0x20, 0x08, 0x60, 0x20, 0x98 ,
0x00, 0x25, 0x05, 0x70, 0x21, 0x98, 0x29, 0x46, 0x04, 0x22, 0xFB, 0xF7, 0x27, 0xFB, 0x01, 0x20, 0x00, 0xF0, 0x3A, 0xFA, 0x02, 0x20, 0x00, 0xF0, 0x37, 0xFA, 0x22, 0x98, 0x05, 0x60, 0x07, 0x98, 0x04, 0x99, 0x00, 0x68, 0x07, 0x28, 0x44, 0xD1, 0x09, 0x78, 0x03, 0x9C, 0x80, 0x29, 0x40, 0xD1, 0x38, 0x34, 0x21, 0x78, 0x64, 0x1C, 0x22, 0x46, 0x00, 0x29, 0x3A, 0xD1, 0x20, 0x98, 0x90, 0xF8, 0x00, 0xA0, 0x22, 0x98, 0x05, 0x90, 0xD0, 0xF8, 0x00, 0x90, 0x51, 0x46, 0x48, 0x46, 0xFD, 0xF7, 0x79, 0xF9, 0x5F, 0xFA, 0x80, 0xF8, 0x21, 0x9F, 0x15, 0x78, 0x51, 0x46, 0x48, 0x46, 0x17, 0xF8, 0x08, 0x30, 0xFD, 0xF7, 0xD4, 0x54, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x6F, 0xF9, 0x1E, 0x46, 0x1B, 0x1D, 0xC0, 0xB2, 0x38, 0x5C, 0x00, 0x1D, 0xA8, 0x42, 0x28, 0x46, 0x07, 0xDD, 0x80, 0x18, 0x82, 0x1C, 0x10, 0x78, 0x2D, 0x18, 0xAD, 0x1C, 0xAD, 0xB2, 0xAB, 0x42, 0xF7, 0xDC, 0x04, 0xF8, 0x01, 0x6B, 0x11, 0x49, 0x32, 0x46 ,
0x20, 0x46, 0x01, 0xEB, 0x48, 0x11, 0xFA, 0xF7, 0xDC, 0xF9, 0xAD, 0x1B, 0xFF, 0x20, 0x34, 0x19, 0xAD, 0x1E, 0x04, 0xF8, 0x01, 0x0B, 0x25, 0x70, 0x05, 0x98, 0x01, 0x68, 0x49, 0x1C, 0x01, 0x60, 0x07, 0x98, 0x00, 0x68, 0x07, 0x28, 0x04, 0xD0, 0x06, 0x99, 0x08, 0x68, 0x20, 0xF4, 0x80, 0x30, 0x08, 0x60, 0x23, 0xB0, 0xBD, 0xE8, 0xF0, 0x8F, 0xC0, 0x46, 0x94, 0x57, 0x02, 0x00, 0xD4, 0x57, 0x02, 0x00, 0x5C, 0x58, 0x02, 0x00, 0x6E, 0x48, 0x2D, 0xE9, 0xF0, 0x47, 0x6E, 0x4D, 0x82, 0x89, 0x4A, 0xF6, 0x55, 0x21, 0xAD, 0xF5, 0xFE, 0x7D, 0x91, 0x42, 0x4F, 0xF0, 0x00, 0x01, 0xAD, 0xF1, 0x38, 0x0D, 0x12, 0xD1, 0x29, 0x60, 0x68, 0x4A, 0x11, 0x70, 0x41, 0xF2, 0x10, 0x41, 0x81, 0x81, 0x4F, 0xF6, 0xFF, 0x70, 0x66, 0x49, 0x08, 0x60, 0x28, 0x68, 0x00, 0x90, 0x02, 0x22, 0x05, 0x21, 0x03, 0x20, 0x41, 0xF2, 0x34, 0x23, 0xF3, 0xF7, 0x48, 0xF8, 0x29, 0x68, 0x61, 0x4C, 0x01, 0x29, 0x20, 0x68, 0x40, 0xF0, 0xAF, 0x80 ,
0x5F, 0x4D, 0x02, 0x28, 0x29, 0x68, 0x23, 0xD1, 0x9C, 0x55, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x5E, 0x48, 0x00, 0x68, 0x5F, 0x4A, 0x12, 0x5C, 0x00, 0x92, 0x01, 0x91, 0x5E, 0x49, 0x09, 0x68, 0x02, 0x91, 0x5B, 0x49, 0x0B, 0x5C, 0x03, 0x20, 0x07, 0x21, 0x04, 0x22, 0xF3, 0xF7, 0x2E, 0xF8, 0x5B, 0x49, 0x4A, 0x79, 0x59, 0x48, 0x00, 0x92, 0x02, 0x79, 0x01, 0x92, 0x40, 0x79, 0x04, 0x22, 0x02, 0x90, 0x03, 0x20, 0x0B, 0x79, 0x07, 0x21, 0xF3, 0xF7, 0x20, 0xF8, 0x03, 0x20, 0x20, 0x60, 0xEC, 0xF7, 0x1A, 0xFF, 0x20, 0x68, 0x29, 0x68, 0x04, 0x28, 0x15, 0xD1, 0x0D, 0x20, 0x8D, 0xF8, 0x10, 0x00, 0x00, 0x25, 0x8D, 0xF8, 0x14, 0x50, 0x8D, 0xF8, 0x15, 0x10, 0x28, 0x46, 0x63, 0x21, 0x00, 0xF0, 0xAA, 0xFB, 0x63, 0x21, 0x28, 0x46, 0x00, 0xF0, 0xFA, 0xFA, 0x03, 0xA9, 0x04, 0xA8, 0xE0, 0xF7, 0xCA, 0xFC, 0x05, 0x20, 0x20, 0x60, 0x46, 0x4D, 0x05, 0x28, 0x29, 0x68, 0x01, 0xF1, 0x01, 0x01, 0x29, 0x60, 0x1D, 0xD1 ,
0x44, 0x4A, 0x8A, 0x42, 0x1A, 0xD1, 0x43, 0x48, 0x01, 0x68, 0x00, 0x91, 0x40, 0x68, 0x01, 0x90, 0x03, 0x20, 0x02, 0x46, 0x06, 0x21, 0x41, 0x4E, 0x33, 0x46, 0x22, 0x3B, 0xF2, 0xF7, 0xEB, 0xFF, 0x3E, 0x48, 0x01, 0x68, 0x00, 0x91, 0x40, 0x68, 0x33, 0x46, 0x06, 0x21, 0x01, 0x90, 0x03, 0x20, 0x02, 0x46, 0xF2, 0xF7, 0xE0, 0xFF, 0x00, 0x20, 0x28, 0x60, 0x20, 0x68, 0x06, 0x28, 0x47, 0xD1, 0x4F, 0xF0, 0x64, 0x56, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x07, 0x0A, 0xC4, 0xF8, 0x00, 0xA0, 0x03, 0x20, 0x48, 0xF2, 0x70, 0x53, 0x01, 0x22, 0x04, 0x21, 0xF2, 0xF7, 0xD0, 0xFF, 0xDF, 0xF8, 0xCC, 0x80, 0x31, 0x4F, 0x48, 0xF2, 0x70, 0x59, 0x01, 0x25, 0x49, 0xEA, 0x05, 0x03, 0x01, 0x22, 0x04, 0x21, 0x03, 0x20, 0xF2, 0xF7, 0xC3, 0xFF, 0x00, 0x24, 0x17, 0xF8, 0x02, 0x0F, 0x20, 0xE0, 0x69, 0x01, 0x04, 0xEB, 0x08, 0x02, 0x88, 0x18, 0xC6, 0x1C, 0x43, 0x78, 0x00, 0x93, 0x80, 0x78, 0x01, 0x90, 0x30, 0x78, 0x02, 0x90 ,
0x53, 0x5C, 0x51, 0x46, 0x04, 0x22, 0x03, 0x20, 0xF2, 0xF7, 0xAE, 0xFF, 0x38, 0x78, 0x01, 0x1B, 0xB1, 0xF1, 0xFF, 0x3F, 0x08, 0xD1, 0xF0, 0x78, 0x00, 0x90, 0xB3, 0x78, 0x03, 0x20, 0x02, 0x22, 0x05, 0x21, 0xF2, 0xF7, 0xA1, 0xFF, 0x38, 0x78, 0x24, 0x1D, 0xE4, 0xB2, 0xA0, 0x42, 0xDC, 0xDC, 0xAD, 0x1C, 0xED, 0xB2, 0x04, 0x2D, 0xCD, 0xDB, 0x63, 0x21, 0x4F, 0xF4, 0x05, 0x70, 0xF1, 0xF7, 0xA3, 0xFC, 0xE1, 0xF7, 0x85, 0xFD, 0x7F, 0xB0, 0x0E, 0xB0, 0xBD, 0xE8, 0xF0, 0x87, 0xC0, 0x46, 0x04, 0x74, 0x00, 0x20, 0x50, 0x57, 0x02, 0x00, 0x6C, 0x5D, 0x02, 0x00, 0x40, 0x00, 0x3D, 0x80, 0x4C, 0x57, 0x02, 0x00, 0x58, 0x57, 0x02, 0x00, 0x90, 0x57, 0x02, 0x00, 0x60, 0x57, 0x02, 0x00, 0x70, 0x57, 0x02, 0x00, 0x5C, 0x57, 0x02, 0x00, 0x80, 0x57, 0x02, 0x00, 0x2C, 0x57, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x88, 0x57, 0x02, 0x00, 0x54, 0x57, 0x02, 0x00, 0xFF, 0xFF, 0x03, 0x00, 0x38, 0x58, 0x02, 0x00, 0x40, 0x58 ,
0x02, 0x00, 0x66, 0x55, 0xDD, 0xEE, 0xDB, 0x58, 0x02, 0x00, 0x5C, 0x58, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF4, 0x57, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBC, 0x58, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2D, 0xE9, 0xFE, 0x4F, 0x4A, 0x4A, 0x49, 0x4D, 0x00, 0x90, 0xB2, 0xF9, 0x00, 0x20, 0x43, 0xA3, 0x29, 0x78, 0x01, 0x93, 0x43, 0xA3, 0x01, 0x28, 0x02, 0x93, 0x47, 0x4E, 0xDF, 0xF8, 0x1C, 0x81, 0xDF, 0xF8, 0x1C, 0x91, 0x1E, 0xD0, 0x43, 0x48, 0x04, 0x78, 0x48, 0x01, 0x87, 0x19, 0x30, 0x18, 0x01, 0x99, 0x06, 0x22, 0xF9, 0xF7, 0xC8, 0xFF, 0x40, 0x46, 0x01, 0x78, 0x00, 0x68, 0x07, 0xF1, 0x06, 0x07, 0x07, 0xF8, 0x01, 0x1B, 0x07, 0xF8, 0x01, 0x4B, 0x4F, 0xF0, 0x00, 0x01, 0x07, 0xF8, 0x01, 0x1B, 0x20, 0xB9, 0x39, 0x70, 0x28, 0x78, 0x4E, 0x46, 0x0A, 0x21, 0x58, 0xE0, 0xDF, 0xF8, 0xE4, 0xB0, 0x0F, 0xE0, 0xD4, 0xB2, 0x48, 0x01, 0x87, 0x19, 0x30, 0x18, 0x02, 0x99, 0x07, 0x22, 0xF9, 0xF7, 0xAA, 0xFF, 0xFF, 0x1D, 0x00, 0x20, 0xDF, 0xF8, 0xCC, 0xB0, 0x07, 0xF8, 0x01, 0x4B, 0x07, 0xF8, 0x01, 0x0B, 0x16, 0x2C, 0xB2, 0x46, 0xAE, 0xBF, 0x14, 0x20, 0x84, 0x59 ,
0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x60, 0x1E, 0xC0, 0xB2, 0x38, 0x70, 0x4E, 0x46, 0x7F, 0x1C, 0x40, 0x1C, 0xC2, 0xB2, 0x28, 0x78, 0x5B, 0x46, 0x00, 0x21, 0x32, 0x54, 0x38, 0x46, 0x00, 0xF0, 0xBC, 0xF9, 0x28, 0x78, 0x16, 0x2C, 0x31, 0x5C, 0x01, 0xF1, 0x0A, 0x01, 0x31, 0x54, 0x00, 0xF1, 0x01, 0x00, 0xC0, 0xB2, 0x28, 0x70, 0x2B, 0xDB, 0x00, 0x99, 0x0A, 0xEB, 0x40, 0x10, 0x07, 0x46, 0x01, 0x29, 0xA4, 0xF1, 0x01, 0x09, 0x09, 0xD0, 0x01, 0x99, 0x06, 0x22, 0xF9, 0xF7, 0x79, 0xFF, 0x40, 0x46, 0x00, 0x78, 0xBF, 0x1D, 0x07, 0xF8, 0x01, 0x0B, 0x04, 0xE0, 0x02, 0x99, 0x07, 0x22, 0xF9, 0xF7, 0x6F, 0xFF, 0xFF, 0x1D, 0x07, 0xF8, 0x01, 0x4B, 0x15, 0x3C, 0x15, 0x21, 0x28, 0x78, 0xE2, 0xB2, 0x5B, 0x46, 0x07, 0xF8, 0x01, 0x1B, 0x32, 0x54, 0x07, 0xF8, 0x01, 0x9B, 0x38, 0x46, 0x00, 0xF0, 0x8B, 0xF9, 0x28, 0x78, 0x31, 0x5C, 0x0A, 0x31, 0x31, 0x54, 0x40, 0x1C, 0x28, 0x70, 0xBD, 0xE8, 0xFE, 0x8F, 0xC0, 0x46 ,
0x54, 0x54, 0x54, 0x4B, 0x45, 0x59, 0x00, 0xC0, 0x54, 0x54, 0x54, 0x53, 0x53, 0x49, 0x44, 0x00, 0x54, 0x58, 0x02, 0x00, 0xE6, 0x58, 0x02, 0x00, 0xE8, 0x58, 0x02, 0x00, 0x5C, 0x58, 0x02, 0x00, 0x5C, 0x57, 0x02, 0x00, 0xDC, 0x58, 0x02, 0x00, 0xD4, 0x57, 0x02, 0x00, 0x94, 0x57, 0x02, 0x00, 0xFF, 0xB5, 0x0C, 0x46, 0x06, 0x46, 0xF7, 0xF7, 0x4C, 0x5A, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0xE3, 0xFE, 0x15, 0x49, 0x15, 0x4A, 0x0D, 0x68, 0x01, 0xA9, 0x92, 0xE8, 0x8C, 0x00, 0x81, 0xE8, 0x8C, 0x00, 0xF7, 0xF7, 0xFD, 0xFE, 0x01, 0x98, 0x11, 0x49, 0x28, 0x1A, 0x03, 0x9D, 0x25, 0x60, 0x02, 0x9A, 0x80, 0x18, 0x82, 0x42, 0x30, 0x60, 0x0E, 0xD8, 0x08, 0x46, 0x00, 0x68, 0x22, 0x68, 0x82, 0x42, 0x0E, 0xD2, 0x68, 0x46, 0xE8, 0xF7, 0xB9, 0xFF, 0x9D, 0xF8, 0x00, 0x00, 0x05, 0xF1, 0x01, 0x05, 0x30, 0xB9, 0x03, 0x95, 0x03, 0xE0, 0x25, 0x68, 0x6D, 0x1C, 0x25, 0x60, 0x0C, 0x46, 0x25, 0x60, 0x00, 0x20, 0x00, 0x90 ,
0xFF, 0xBD, 0x60, 0x55, 0x30, 0x80, 0x24, 0x5D, 0x00, 0x20, 0x6C, 0x5D, 0x02, 0x00, 0x70, 0xB5, 0x4D, 0x00, 0x20, 0x2D, 0x4F, 0xF0, 0x00, 0x01, 0x0C, 0x46, 0x4F, 0xEA, 0x55, 0x13, 0x09, 0xD3, 0x50, 0xF8, 0x21, 0x60, 0xB6, 0xF1, 0xFF, 0x3F, 0x04, 0xD1, 0x49, 0x1C, 0xC9, 0xB2, 0x20, 0x3D, 0x5B, 0x1E, 0xF5, 0xD1, 0x4D, 0xB1, 0x20, 0x2D, 0x09, 0xD2, 0x01, 0x23, 0xAB, 0x40, 0x5B, 0x1E, 0x50, 0xF8, 0x21, 0x00, 0x18, 0x40, 0x83, 0x42, 0x01, 0xD1, 0x4F, 0xF0, 0x01, 0x04, 0x07, 0x48, 0x03, 0x78, 0x2C, 0xB9, 0x01, 0x21, 0x91, 0x40, 0xC9, 0x43, 0xC9, 0xB2, 0x0B, 0x40, 0x03, 0xE0, 0x01, 0x21, 0x91, 0x40, 0xC9, 0xB2, 0x0B, 0x43, 0x03, 0x70, 0x70, 0xBD, 0xC0, 0x46, 0xEE, 0x58, 0x02, 0x00, 0x14, 0x5B, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x7E, 0xB5, 0x05, 0x46, 0x95, 0xF8, 0x36, 0x20, 0x0E, 0x46, 0x0F, 0x49, 0x07, 0x2A, 0x12, 0xBF, 0x08, 0x68, 0x01, 0x20, 0x08, 0x60, 0x0D, 0x4C, 0x00, 0x92, 0x21, 0x68 ,
0x41, 0xF2, 0x12, 0x13, 0x04, 0x22, 0x01, 0x91, 0x07, 0x21, 0x02, 0x90, 0x03, 0x20, 0xF2, 0xF7, 0x6B, 0xFD, 0x31, 0x46, 0x28, 0x46, 0xE7, 0xF7, 0x21, 0xFC, 0x21, 0x68, 0x00, 0x22, 0x05, 0x29, 0x02, 0xD1, 0x04, 0x49, 0x08, 0x31, 0x0A, 0x60, 0x7E, 0xBD, 0xC0, 0x46, 0x50, 0x57, 0x02, 0x00, 0x4C, 0x57, 0x02, 0x00, 0x00, 0x7C, 0x00, 0x20, 0x0E, 0x49, 0x09, 0x68, 0x49, 0x08, 0x15, 0xD2, 0x0D, 0x49, 0x09, 0x78, 0x91, 0xB1, 0x44, 0xF2, 0xE9, 0x21, 0x68, 0xB9, 0x0B, 0x48, 0x01, 0x78, 0x07, 0x48, 0x01, 0x29, 0x03, 0xD1, 0x0A, 0x49, 0x09, 0x78, 0x0E, 0x29, 0x02, 0xD0, 0x44, 0xF2, 0xDE, 0x21, 0x41, 0x60, 0x01, 0x21, 0x00, 0xE0, 0x06, 0x48, 0x01, 0x60, 0x70, 0x47, 0xC0, 0x46, 0x00, 0x97, 0x3C, 0x80, 0x10, 0x0C, 0x30, 0x80, 0xDD, 0x6A, 0x00, 0x20, 0xE0, 0x7C, 0x00, 0x20, 0xA6, 0x64, 0x00, 0x20, 0x04, 0x97, 0x3C, 0x80, 0x00, 0xB5, 0xAD, 0xF1, 0x18, 0x0D, 0x4F, 0xF0, 0x09, 0x00, 0x00, 0x90, 0x4F, 0xF4 ,
0x0C, 0x60, 0x03, 0x90, 0x4F, 0xF0, 0x00, 0x00, 0x01, 0x90, 0x02, 0x90, 0x08, 0x48, 0x08, 0x49, 0x05, 0x90, 0x08, 0x68, 0x20, 0xB9, 0xDC, 0x5B, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x68, 0x46, 0x03, 0x22, 0xED, 0xF7, 0x3A, 0xFA, 0x03, 0xE0, 0x68, 0x46, 0x03, 0x22, 0xED, 0xF7, 0xC1, 0xFC, 0x06, 0xB0, 0x00, 0xBD, 0xC0, 0x46, 0x81, 0x5C, 0x02, 0x00, 0xDC, 0x7C, 0x00, 0x20, 0x1C, 0xB5, 0x0F, 0x4C, 0x22, 0x68, 0x01, 0x2A, 0x15, 0xD1, 0x0C, 0x48, 0x00, 0x68, 0x07, 0x28, 0x14, 0xBF, 0x40, 0x20, 0x4F, 0xF4, 0x05, 0x70, 0x63, 0x21, 0xF1, 0xF7, 0x0F, 0xFA, 0x20, 0x68, 0x00, 0x90, 0x43, 0xF2, 0x33, 0x33, 0x06, 0x21, 0x40, 0x20, 0x01, 0x90, 0x03, 0x20, 0x02, 0x46, 0xF2, 0xF7, 0xF4, 0xFC, 0x1C, 0xBD, 0xF1, 0xF7, 0x01, 0xFA, 0x1C, 0xBD, 0x4C, 0x57, 0x02, 0x00, 0x50, 0x57, 0x02, 0x00, 0x1E, 0xB5, 0x04, 0x46, 0x0A, 0x49, 0x00, 0x20, 0x0A, 0x4A, 0x08, 0x60, 0x0A, 0x49, 0x00, 0x90, 0x01, 0x90, 0x11, 0x60 ,
0x09, 0x4A, 0x45, 0xF2, 0x55, 0x53, 0x02, 0x91, 0x10, 0x60, 0x07, 0x21, 0x04, 0x22, 0x03, 0x20, 0xF2, 0xF7, 0xD8, 0xFC, 0x20, 0x46, 0xE7, 0xF7, 0x59, 0xFD, 0x1E, 0xBD, 0x50, 0x57, 0x02, 0x00, 0x04, 0x74, 0x00, 0x20, 0x34, 0x12, 0x66, 0x09, 0x4C, 0x57, 0x02, 0x00, 0x00, 0xB5, 0x0B, 0x49, 0x00, 0x20, 0x08, 0x60, 0xE0, 0x20, 0xF7, 0xF7, 0xAA, 0xFD, 0x09, 0x49, 0x09, 0x78, 0x49, 0xB1, 0x08, 0x49, 0x0A, 0x78, 0x08, 0x49, 0x00, 0x2A, 0x06, 0xBF, 0x01, 0x22, 0x09, 0x1F, 0x44, 0xF2, 0xA4, 0x5C, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0xE9, 0x22, 0x0A, 0x60, 0xF7, 0xF7, 0xA1, 0xFD, 0x00, 0xBD, 0xC0, 0x46, 0xDC, 0x7C, 0x00, 0x20, 0xDD, 0x6A, 0x00, 0x20, 0xA7, 0x64, 0x00, 0x20, 0x04, 0x97, 0x3C, 0x80, 0x50, 0xB9, 0x09, 0x48, 0x00, 0x78, 0x01, 0x28, 0x06, 0xD1, 0x08, 0x48, 0x00, 0x78, 0x0E, 0x28, 0x08, 0xBF, 0x44, 0xF2, 0xCB, 0x20, 0x01, 0xD0, 0x44, 0xF2, 0xDE, 0x20, 0x04, 0x49, 0x08, 0x60, 0x01, 0x20 ,
0x41, 0xF8, 0x04, 0x0C, 0x70, 0x47, 0xE0, 0x7C, 0x00, 0x20, 0xA6, 0x64, 0x00, 0x20, 0x04, 0x97, 0x3C, 0x80, 0x30, 0xB5, 0x0D, 0x46, 0x84, 0x69, 0xDC, 0xF7, 0x97, 0xFB, 0x24, 0x1D, 0x01, 0x28, 0x04, 0xEB, 0x45, 0x01, 0x06, 0xD1, 0x89, 0x8E, 0x04, 0xEB, 0x85, 0x04, 0x11, 0xB9, 0x21, 0x69, 0x01, 0xB9, 0x00, 0x20, 0x30, 0xBD, 0x30, 0xB5, 0x05, 0x46, 0x5A, 0xB1, 0x03, 0xEB, 0x41, 0x03, 0x1C, 0x78, 0x59, 0x78, 0x41, 0xEA, 0x04, 0x11, 0x52, 0x1E, 0x03, 0xF1, 0x02, 0x03, 0x05, 0xF8, 0x01, 0x1B, 0xF5, 0xD1, 0x30, 0xBD, 0x00, 0xB5, 0x00, 0x20, 0xE7, 0xF7, 0xD6, 0xFE, 0x03, 0x48, 0x01, 0x68, 0x03, 0x29, 0x04, 0xBF, 0x04, 0x21, 0x01, 0x60, 0x00, 0xBD, 0xC0, 0x46, 0x4C, 0x57, 0x02, 0x00, 0x03, 0x4A, 0x12, 0x68, 0x01, 0x2A, 0x04, 0xBF, 0x02, 0x48, 0x63, 0x21, 0xF1, 0xF7, 0x76, 0xB9, 0x50, 0x57, 0x02, 0x00, 0x02, 0x20, 0x01, 0x00, 0x6C, 0x5D, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
uint16_t fw_length = 5700;

View File

@ -1,372 +0,0 @@
// Adafruit CC3000 Firmware V1.13 Upgrade Sketch
// Based on firmware patcher for MSP430 chips published by Texas Instruments.
//
// This sketch will upgrade CC3000 modules up to firmware version 1.13.
//
// You can find more details about the changes in the 1.13 firmware from TI at:
// http://processors.wiki.ti.com/index.php/CC3000_Release_Notes
//
// In general the 1.13 release is a bug fix release with fixes for stability
// issues that caused the CC3000 to hang when under load.
//
// WARNING: Upgrade firmware at your own risk! In general if the CC3000 is
// currently working fine for your needs then hold off on the upgrade.
//
// Usage (read all the steps before strarting):
// - Wire up your Arduino to the CC3000 just like you're running buildtest or
// other examples.
// - Adjust the ADAFRUIT_CC3000_IRQ, ADAFRUIT_CC3000_CS, ADAFRUIT_CC3000_VBAT
// defines below to match your wiring (just like running buildtest).
// - Load the sketch on your Arduino and open the serial monitor at 115200 baud.
// - You should see a prompt waiting for a key press to continue. Enter text
// and press enter to start the upgrade.
// - You will see text printed as the firmware is upgraded. The upgrade process
// should be quick and take less than a minute.
// - You might see a message at the end that the firmware version or MAC address
// couldn't be read--this can be ignored.
// - Once the firmware upgrade is complete, run the buildtest sketch to check
// the CC3000 functionality.
// - During the firmware upgrade the CC3000 MAC address might be lost. You can
// write a new MAC address by uncommenting the appropriate line in the buildtest
// example. Make sure to save your MAC address before upgrading the firmware
// if you'd like to keep it the same after
#include <Adafruit_CC3000.h>
#include <ccspi.h>
#include <SPI.h>
#include <string.h>
#include <EEPROM.h>
#include "utility/debug.h"
#include "utility/nvmem.h"
#include "driverpatchinc_1_13.h"
#define ADAFRUIT_CC3000_IRQ 3 // MUST be an interrupt pin!
#define ADAFRUIT_CC3000_CS 10
#define ADAFRUIT_CC3000_VBAT 5
Adafruit_CC3000 cc3000 = Adafruit_CC3000(ADAFRUIT_CC3000_CS, ADAFRUIT_CC3000_IRQ, ADAFRUIT_CC3000_VBAT);
/**************************************************************************/
/*!
@brief Displays the driver mode (tiny of normal), and the buffer
size if tiny mode is not being used
@note The buffer size and driver mode are defined in cc3000_common.h
*/
/**************************************************************************/
void displayDriverMode(void)
{
#ifdef CC3000_TINY_DRIVER
Serial.println(F("CC3000 is configure in 'Tiny' mode"));
#else
Serial.print(F("RX Buffer : "));
Serial.print(CC3000_RX_BUFFER_SIZE);
Serial.println(F(" bytes"));
Serial.print(F("TX Buffer : "));
Serial.print(CC3000_TX_BUFFER_SIZE);
Serial.println(F(" bytes"));
#endif
}
/**************************************************************************/
/*!
@brief Tries to read the CC3000's internal firmware patch ID
*/
/**************************************************************************/
void displayFirmwareVersion(void)
{
#ifndef CC3000_TINY_DRIVER
uint8_t major, minor;
if(!cc3000.getFirmwareVersion(&major, &minor))
{
Serial.println(F("Unable to retrieve the firmware version!\r\n"));
}
else
{
Serial.print(F("Firmware V. : "));
Serial.print(major); Serial.print(F(".")); Serial.println(minor);
}
#endif
}
/**************************************************************************/
/*!
@brief Tries to read the 6-byte MAC address of the CC3000 module
*/
/**************************************************************************/
boolean MACvalid = false;
// array to store MAC address from EEPROM
uint8_t cMacFromEeprom[MAC_ADDR_LEN];
void displayMACAddress(void)
{
if(!cc3000.getMacAddress(cMacFromEeprom))
{
Serial.println(F("Unable to retrieve MAC Address!\r\n"));
MACvalid = false;
}
else
{
Serial.print(F("MAC Address : "));
cc3000.printHex((byte*)&cMacFromEeprom, 6);
MACvalid = true;
}
}
/**************************************************************************/
/*!
@brief Sets up the HW and the CC3000 module (called automatically
on startup)
*/
/**************************************************************************/
uint8_t ucStatus_Dr, return_status = 0xFF;
uint8_t counter = 0;
// array to store RM parameters from EEPROM
unsigned char cRMParamsFromEeprom[128];
// 2 dim array to store address and length of new FAT
uint16_t aFATEntries[2][NVMEM_RM_FILEID + 1] =
/* address */ {{0x50, 0x1f0, 0x1390, 0x0390, 0x2390, 0x4390, 0x6390, 0x63a0, 0x63b0, 0x63f0, 0x6430, 0x6830},
/* length */ {0x1a0, 0x1a0, 0x1000, 0x1000, 0x2000, 0x2000, 0x10, 0x10, 0x40, 0x40, 0x400, 0x200 }};
/* 0. NVS */
/* 1. NVS Shadow */
/* 2. Wireless Conf */
/* 3. Wireless Conf Shadow */
/* 4. BT (WLAN driver) Patches */
/* 5. WiLink (Firmware) Patches */
/* 6. MAC addr */
/* 7. Frontend Vars */
/* 8. IP config */
/* 9. IP config Shadow */
/* 10. Bootloader Patches */
/* 11. Radio Module params */
/* 12. AES128 for smart config */
/* 13. user file */
/* 14. user file */
/* 15. user file */
void setup(void)
{
Serial.begin(115200);
Serial.println(F("Hello, CC3000!\n"));
Serial.println(F("Hit any key & return to start"));
while (!Serial.available());
pinMode(9, OUTPUT);
pinMode(8, OUTPUT);
pinMode(7, OUTPUT);
pinMode(6, OUTPUT);
digitalWrite(9, LOW);
digitalWrite(8, LOW);
digitalWrite(7, LOW);
digitalWrite(6, LOW);
displayDriverMode();
displayFreeRam();
/* Initialise the module */
Serial.println(F("\nInitialising the CC3000 ..."));
if (!cc3000.begin(2)) // init with NO patches!
{
Serial.println(F("Unable to initialise the CC3000! Check your wiring?"));
while(1);
}
displayFirmwareVersion();
displayMACAddress();
return_status = 1;
uint8_t index;
uint8_t *pRMParams;
while ((return_status) && (counter < 3)) {
// read RM parameters
// read in 16 parts to work with tiny driver
return_status = 0;
pRMParams = cRMParamsFromEeprom;
for (index = 0; index < 16; index++) {
return_status |= nvmem_read(NVMEM_RM_FILEID, 8, 8*index, pRMParams);
Serial.print(F("\n\rRead NVRAM $")); Serial.print(8*index); Serial.print("\t");
for(uint8_t x=0; x<8; x++) {
Serial.print("0x"); Serial.print(pRMParams[x], HEX); Serial.print(", ");
}
pRMParams += 8;
}
counter++;
}
// if RM file is not valid, load the default one
if (counter == 3) {
Serial.println(F("\n\rLoad default params"));
pRMParams = (uint8_t *)cRMdefaultParams;
} else {
Serial.println(F("\n\rLoad EEPROM params"));
pRMParams = cRMParamsFromEeprom;
if (EEPROM.read(0) == 0xFF) {
for (uint8_t e=0; e<128; e++) {
EEPROM.write(e, cRMParamsFromEeprom[e]);
}
Serial.println(F("Backed up to eeprom!"));
}
}
return_status = 1;
while (return_status) {
// write new FAT
return_status = fat_write_content(aFATEntries[0], aFATEntries[1]);
Serial.print(F("Wrote FAT entries: ")); Serial.println(return_status, DEC);
}
//Serial.println(F("Stopping..."));
//cc3000.stop();
//Serial.println(F("\nInitialising the CC3000 ..."));
//if (!cc3000.begin(2)) // no patches!
//{
// Serial.println(F("Unable to initialise the CC3000! Check your wiring?"));
// while(1);
//}
return_status = 1;
Serial.println(F("Write params"));
while (return_status) {
// write RM parameters
// write in 4 parts to work with tiny driver
return_status = 0;
for (index = 0; index < 4; index++) {
return_status |= nvmem_write(NVMEM_RM_FILEID, 32, 32*index, (pRMParams + 32*index));
Serial.println(F("Wrote 32 bytes to NVRAM"));
}
}
Serial.println(F("Wrote params"));
return_status = 1;
// write back the MAC address, only if exist
if (MACvalid) {
// zero out MCAST bit if set
cMacFromEeprom[0] &= 0xfe;
while (return_status) {
return_status = nvmem_set_mac_address(cMacFromEeprom);
}
}
ucStatus_Dr = 1;
Serial.println(F("Writing driver patch"));
while (ucStatus_Dr) {
//writing driver patch to EEPRROM - PROTABLE CODE
// Note that the array itself is changing between the different Service Packs
ucStatus_Dr = nvmem_write_patch(NVMEM_WLAN_DRIVER_SP_FILEID, drv_length, wlan_drv_patch);
}
Serial.println(F("Wrote driver patch"));
Serial.println(F("Starting w/o patches"));
//if (!cc3000.begin(2))
//{
// Serial.println(F("Unable to initialise the CC3000! Check your wiring?"));
// while(1);
//}
Serial.println(F("Writing firmware"));
unsigned char ucStatus_FW = 1;
while (ucStatus_FW) {
//writing FW patch to EAPRROM - PROTABLE CODE
//Note that the array itself is changing between the different Service Packs
ucStatus_FW = nvmem_write_patch(NVMEM_WLAN_FW_SP_FILEID, fw_length, fw_patch);
}
Serial.println(F("Starting w/patches"));
cc3000.reboot();
/*
if (!)
{
Serial.println(F("Unable to initialise the CC3000! Check your wiring?"));
while(1);
}
*/
Serial.println(F("Patched!"));
displayFirmwareVersion();
displayMACAddress();
}
//*****************************************************************************
//
//! fat_write_content
//!
//! \param[in] file_address array of file address in FAT table:\n
//! this is the absolute address of the file in the EEPROM.
//! \param[in] file_length array of file length in FAT table:\n
//! this is the upper limit of the file size in the EEPROM.
//!
//! \return on succes 0, error otherwise
//!
//! \brief parse the FAT table from eeprom
//
//*****************************************************************************
uint8_t fat_write_content(uint16_t *file_address, uint16_t *file_length)
{
uint16_t index = 0;
uint8_t ucStatus;
uint8_t fatTable[48];
uint8_t* fatTablePtr = fatTable;
uint8_t LS[3] = "LS";
// first, write the magic number
ucStatus = nvmem_write(16, 2, 0, LS);
for (; index <= NVMEM_RM_FILEID; index++)
{
// write address low char and mark as allocated
*fatTablePtr++ = (uint8_t)(file_address[index] & 0xff) | _BV(0);
// write address high char
*fatTablePtr++ = (uint8_t)((file_address[index]>>8) & 0xff);
// write length low char
*fatTablePtr++ = (uint8_t)(file_length[index] & 0xff);
// write length high char
*fatTablePtr++ = (uint8_t)((file_length[index]>>8) & 0xff);
}
// second, write the FAT
// write in two parts to work with tiny driver
ucStatus = nvmem_write(16, 24, 4, fatTable);
ucStatus = nvmem_write(16, 24, 24+4, &fatTable[24]);
// third, we want to erase any user files
memset(fatTable, 0, sizeof(fatTable));
ucStatus = nvmem_write(16, 16, 52, fatTable);
return ucStatus;
}
void loop(void)
{
delay(1000);
}

View File

@ -1,102 +0,0 @@
//Service Pack version P1.12.7.15.26 - Driver patches
uint8_t cRMdefaultParams[128] = { 0x03, 0x00, 0x01, 0x01, 0x14, 0x14, 0x00, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x23, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x23, 0x23, 0x23, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x01, 0x77, 0x80, 0x1D, 0x1F, 0x22, 0x26, 0x28, 0x29, 0x1A, 0x1F, 0x22, 0x24, 0x26, 0x28, 0x16, 0x1D, 0x1E, 0x20, 0x24, 0x25, 0x1E, 0x2D, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x15, 0x15, 0x15, 0x11, 0x15, 0x15, 0x0E, 0x00};
unsigned char PROGMEM wlan_drv_patch[8024] = { 0x00, 0x01, 0x00, 0x00, 0x50, 0x1F, 0x00, 0x00, 0xF0, 0x03, 0x18, 0x00, 0xE4, 0x62, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x7A, 0x63, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x10, 0x64, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x20, 0x0C, 0x49, 0x08, 0x60, 0x0C, 0x48, 0x19, 0x30, 0xF7, 0x46, 0x30, 0xB5, 0x05, 0x1C, 0xAC, 0x69, 0x68, 0x68, 0x5F, 0x30, 0x09, 0xD1, 0x60, 0x6B, 0x0C, 0x38, 0x01, 0x21, 0x8E, 0x46, 0x06, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x00, 0x20, 0x60, 0x63, 0xAC, 0x69, 0x6C, 0x60, 0x04, 0x48, 0x5B, 0x30, 0x30, 0xBD, 0x40, 0x3B, 0x08, 0x00, 0x49, 0xD0, 0x01, 0x00, 0x09, 0xEA, 0x02, 0x00, 0x91, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xA6, 0x64, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x3C, 0x65, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xB5, 0x85, 0xB0, 0x05, 0x1C, 0xA8, 0x88, 0x00, 0x90, 0x28, 0x89, 0x01, 0x90, 0xE9, 0x68, 0x02, 0x91, 0x28, 0x7C, 0x03, 0x90, 0x2A, 0x6A, 0x00, 0x20, 0x17, 0x56, 0x68, 0x60, 0x00, 0x29, 0x4C, 0xD0, 0x00, 0x2F, 0x4A, 0xDC ,
0xCA, 0x49, 0x0C, 0x1C, 0x08, 0x26, 0x04, 0x90, 0x21, 0x88, 0x00, 0x98, 0x81, 0x42, 0x0C, 0xD1, 0x62, 0x88, 0x01, 0x98, 0x82, 0x42, 0x08, 0xD1, 0x46, 0x20, 0x02, 0x5D, 0x03, 0x98, 0x82, 0x42, 0x03, 0xD1, 0x0E, 0x20, 0x00, 0x57, 0xB8, 0x42, 0x0A, 0xD0, 0x46, 0x20, 0x00, 0x5D, 0x11, 0x28, 0x22, 0xD1, 0x00, 0x98, 0x81, 0x42, 0x1F, 0xD1, 0x0E, 0x20, 0x00, 0x57, 0xFF, 0xFF, 0xD2, 0x65, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0xB8, 0x42, 0x1B, 0xD1, 0x04, 0x20, 0x02, 0x1C, 0x02, 0x98, 0xB9, 0x49, 0x01, 0x23, 0x9E, 0x46, 0xEC, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x00, 0x28, 0x17, 0xD0, 0x20, 0x1D, 0x02, 0x99, 0x04, 0x22, 0x01, 0x23, 0x9E, 0x46, 0xE7, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x00, 0x28, 0x0D, 0xD0, 0x46, 0x20, 0x00, 0x5D, 0x11, 0x28, 0x09, 0xD0, 0xA0, 0x6D, 0x00, 0x28, 0x06, 0xD0, 0xAC, 0x34, 0x04, 0x98, 0x01, 0x30, 0x04, 0x90, 0x01, 0x3E, 0xC1, 0xD1, 0x07, 0xE0, 0x04, 0x98, 0x00, 0x06, 0x00, 0x0E ,
0xAC, 0x21, 0x41, 0x43, 0xA6, 0x48, 0x40, 0x18, 0x68, 0x60, 0xA6, 0x48, 0xAD, 0x30, 0x05, 0xB0, 0xF0, 0xBD, 0x00, 0xB5, 0xC2, 0x68, 0x90, 0x69, 0x02, 0x21, 0x01, 0x23, 0x9E, 0x46, 0xA2, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0xA2, 0x48, 0x61, 0x30, 0x00, 0xBD, 0x01, 0x79, 0x0B, 0x29, 0x03, 0xD0, 0x89, 0x00, 0x9F, 0x4A, 0x51, 0x5A, 0x01, 0xE0, 0x01, 0x21, 0x49, 0x02, 0x41, 0x60, 0x9D, 0x48, 0x0D, 0x30, 0xF7, 0x46, 0x01, 0x1C, 0xFF, 0xFF, 0x68, 0x66, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x9C, 0x48, 0x02, 0x68, 0x9C, 0x48, 0x01, 0x2A, 0x01, 0xD1, 0x25, 0x30, 0xF7, 0x46, 0x9B, 0x4A, 0x12, 0x68, 0x4A, 0x60, 0x19, 0x30, 0xF7, 0x46, 0x00, 0x21, 0x41, 0x60, 0x99, 0x48, 0x98, 0x49, 0x08, 0x18, 0xF7, 0x46, 0x00, 0x21, 0x41, 0x60, 0x97, 0x48, 0xE7, 0x49, 0x08, 0x18, 0xF7, 0x46, 0xFF, 0xB5, 0x46, 0x69, 0x40, 0x68, 0x01, 0x90, 0x94, 0x49, 0x0A, 0x7C, 0x9A, 0x4F, 0x01, 0x2A, 0x63, 0xD0, 0x09, 0x7C, 0x03, 0x29 ,
0x60, 0xD0, 0x91, 0x4A, 0x92, 0x4B, 0x00, 0x21, 0x02, 0x91, 0x59, 0x56, 0x24, 0x23, 0x59, 0x43, 0x53, 0x18, 0x03, 0x93, 0x01, 0x28, 0x17, 0xD1, 0x8A, 0x18, 0x04, 0x23, 0x6C, 0x46, 0x8C, 0x49, 0x15, 0x79, 0x08, 0x78, 0xC0, 0x43, 0x28, 0x43, 0x20, 0x70, 0x01, 0x32, 0x01, 0x31, 0x01, 0x34, 0x01, 0x3B, 0xF5, 0xD1, 0x31, 0x1D, 0x68, 0x46, 0x04, 0x22, 0x01, 0x23, 0x9E, 0x46, 0xA9, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x00, 0x28, 0x40, 0xD0, 0x35, 0x1D, 0x82, 0x48, 0x00, 0x78, 0xFF, 0x28, 0xFF, 0xFF, 0xFE, 0x66, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x11, 0xD0, 0x00, 0x28, 0x0F, 0xD0, 0x03, 0x98, 0x01, 0x1D, 0x28, 0x1C, 0x01, 0x24, 0xA6, 0x46, 0x7E, 0x4A, 0xFE, 0x44, 0x10, 0x47, 0x00, 0x28, 0x05, 0xD1, 0x7A, 0x48, 0xA6, 0x46, 0x7B, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x05, 0xE0, 0x28, 0x1C, 0x01, 0x21, 0x8E, 0x46, 0x78, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x01, 0x99, 0x01, 0x29, 0x01, 0xD1, 0x00, 0x28, 0x1E, 0xD1 ,
0x01, 0x99, 0x5F, 0x31, 0x01, 0xD0, 0x00, 0x28, 0x0F, 0xD1, 0xA8, 0x20, 0x81, 0x5D, 0x00, 0x29, 0x08, 0xD0, 0x49, 0x1E, 0x81, 0x55, 0x80, 0x5D, 0x00, 0x28, 0x09, 0xD1, 0x38, 0x1C, 0xFF, 0x30, 0x08, 0x30, 0x11, 0xE0, 0x03, 0x21, 0x02, 0x91, 0x00, 0xE0, 0xA8, 0x20, 0x02, 0x99, 0x81, 0x55, 0x38, 0x1C, 0xFF, 0x30, 0x16, 0x30, 0x07, 0xE0, 0x01, 0x98, 0x01, 0x28, 0x02, 0xD1, 0x38, 0x1C, 0xA3, 0x30, 0x01, 0xE0, 0x38, 0x1C, 0x9F, 0x30, 0x00, 0x90, 0xFF, 0xBD, 0x00, 0xB5, 0x02, 0x1C, 0x10, 0x6A, 0xD1, 0x69, 0x52, 0x69, 0xC3, 0x69, 0x5A, 0x60, 0xFF, 0xFF, 0x94, 0x67, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x01, 0x22, 0x96, 0x46, 0x5E, 0x4A, 0xFE, 0x44, 0x10, 0x47, 0x5E, 0x48, 0xFF, 0x30, 0x6E, 0x30, 0x00, 0xBD, 0x10, 0xB5, 0x0A, 0x1C, 0x41, 0x69, 0x00, 0x6A, 0x93, 0x69, 0xDB, 0x69, 0x58, 0x60, 0x90, 0x69, 0x01, 0x24, 0xA6, 0x46, 0x56, 0x4A, 0xFE, 0x44, 0x10, 0x47, 0xA6, 0x46, 0x56, 0x48, 0xFE, 0x44 ,
0x00, 0x47, 0x55, 0x48, 0xFF, 0x30, 0xB6, 0x30, 0x10, 0xBD, 0x70, 0xB5, 0x05, 0x1C, 0x6E, 0x69, 0x53, 0x48, 0x02, 0x68, 0x5C, 0x21, 0x88, 0x5D, 0x04, 0x28, 0x15, 0xD1, 0x07, 0x20, 0x88, 0x55, 0x10, 0x0B, 0x11, 0xD2, 0x01, 0x24, 0xA6, 0x46, 0x4E, 0x48, 0xFE, 0x44, 0x00, 0x47, 0x00, 0x28, 0x0A, 0xD0, 0x47, 0x21, 0x89, 0x57, 0xC1, 0x60, 0x11, 0x21, 0xC9, 0x02, 0x00, 0x22, 0x04, 0x23, 0xA6, 0x46, 0xE8, 0x4C, 0xFE, 0x44, 0x20, 0x47, 0x01, 0x20, 0x68, 0x60, 0x43, 0x48, 0xED, 0x49, 0x08, 0x18, 0x70, 0xBD, 0x70, 0xB5, 0x05, 0x1C, 0xAE, 0x69, 0x9C, 0x20, 0x80, 0x19, 0x4B, 0x21, 0x89, 0x00, 0x01, 0x24, 0xFF, 0xFF, 0x2A, 0x68, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0xA6, 0x46, 0xE8, 0x4A, 0xFE, 0x44, 0x10, 0x47, 0x5C, 0x21, 0x88, 0x5D, 0x07, 0x28, 0x01, 0xD1, 0x09, 0x20, 0x00, 0xE0, 0x05, 0x20, 0xAA, 0x69, 0x88, 0x54, 0x30, 0x1C, 0xA6, 0x46, 0xE9, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x68, 0x60, 0xE8, 0x48 ,
0x4D, 0x30, 0x70, 0xBD, 0xF0, 0xB5, 0x41, 0x68, 0x82, 0x68, 0x88, 0x23, 0x5E, 0x18, 0x37, 0x88, 0x0B, 0x6F, 0x00, 0x2B, 0x01, 0xD1, 0x00, 0x2F, 0x10, 0xD1, 0x06, 0x2F, 0x02, 0xDD, 0x00, 0x21, 0xC9, 0x43, 0x07, 0xE0, 0x33, 0x88, 0x9B, 0x00, 0xC9, 0x18, 0x0A, 0x67, 0x31, 0x88, 0x01, 0x31, 0x31, 0x80, 0x01, 0x21, 0x81, 0x60, 0xE1, 0x48, 0x1D, 0x30, 0xF0, 0xBD, 0x0B, 0x1C, 0x01, 0x24, 0x5D, 0x6F, 0x1D, 0x67, 0x04, 0x33, 0x01, 0x34, 0x06, 0x2C, 0xE1, 0xDA, 0xF8, 0xE7, 0x00, 0xB5, 0x00, 0x21, 0xC1, 0x60, 0xE9, 0x48, 0x01, 0x68, 0x10, 0x31, 0xE6, 0x48, 0x20, 0x22, 0x01, 0x23, 0x9E, 0x46, 0xE7, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0xE5, 0x48, 0xFB, 0x30, 0x00, 0xBD, 0xFF, 0xFF, 0xC0, 0x68, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x14, 0x0D, 0x1B, 0x00, 0x54, 0x19, 0x1B, 0x00, 0x91, 0x1A, 0x01, 0x00, 0x4B, 0xAD, 0x03, 0x00, 0x61, 0x4E, 0x01, 0x00, 0x06, 0x32, 0x08, 0x00, 0x1F, 0x0B, 0x02, 0x00, 0x54, 0x3F ,
0x08, 0x00, 0x45, 0xC1, 0x00, 0x00, 0x84, 0x3C, 0x08, 0x00, 0x1B, 0x02, 0x00, 0x00, 0xED, 0x17, 0x00, 0x00, 0xF3, 0xC1, 0x01, 0x00, 0x34, 0x19, 0x1B, 0x00, 0x08, 0x19, 0x1B, 0x00, 0xA6, 0x44, 0x08, 0x00, 0x1C, 0x17, 0x1B, 0x00, 0x18, 0x17, 0x1B, 0x00, 0xCB, 0x67, 0x03, 0x00, 0x0D, 0x47, 0x02, 0x00, 0x39, 0x42, 0x03, 0x00, 0xBD, 0xE7, 0x02, 0x00, 0xB1, 0x40, 0x03, 0x00, 0xB9, 0xEA, 0x01, 0x00, 0x45, 0xDA, 0x00, 0x00, 0x24, 0x41, 0x08, 0x00, 0x71, 0xC0, 0x02, 0x00, 0xF0, 0xB5, 0x88, 0xB0, 0x06, 0x91, 0x07, 0x90, 0x86, 0x69, 0xF0, 0x1C, 0xD9, 0xA1, 0x04, 0x22, 0x01, 0x24, 0xA6, 0x46, 0x14, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x00, 0x28, 0x32, 0xD1, 0xF2, 0x79, 0xD7, 0x48, 0x02, 0x70, 0x35, 0x7A, 0x77, 0x7A, 0x78, 0x1B, 0xFF, 0xFF, 0x56, 0x69, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x43, 0x1C, 0x93, 0x42, 0x1D, 0xD0, 0x16, 0x2A, 0x0C, 0xDB, 0x00, 0x2D, 0x0A, 0xD1, 0xD6, 0x48, 0x04, 0x70, 0x0A, 0x20 ,
0x81, 0x19, 0xD0, 0x48, 0x1A, 0x1C, 0xA6, 0x46, 0xB8, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x74, 0xE0, 0xD2, 0x48, 0x04, 0x70, 0xCC, 0x48, 0x40, 0x19, 0x0A, 0x21, 0x89, 0x19, 0x7A, 0x1B, 0x52, 0x1C, 0xA6, 0x46, 0xB1, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x67, 0xE0, 0x8F, 0xC6, 0x03, 0x00, 0xC9, 0x48, 0x04, 0x70, 0xC9, 0x48, 0x04, 0x70, 0x0A, 0x20, 0x81, 0x19, 0xC2, 0x48, 0xA6, 0x46, 0xAA, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x59, 0xE0, 0xF0, 0x1C, 0x03, 0x21, 0x0A, 0x1C, 0xBC, 0xA1, 0xA6, 0x46, 0xC6, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x00, 0x28, 0x4F, 0xD1, 0xF1, 0x79, 0xBB, 0x48, 0x01, 0x70, 0xBB, 0x4D, 0xB2, 0x79, 0x2A, 0x70, 0x03, 0x20, 0x17, 0x49, 0xF4, 0x31, 0xA6, 0x46, 0xB8, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x28, 0x78, 0x00, 0x28, 0x0B, 0xD1, 0xFF, 0xE7, 0xB8, 0x49, 0x0C, 0x70, 0xB8, 0x49, 0xFF, 0xFF, 0xEC, 0x69, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x0C, 0x70, 0x03, 0x20, 0x0F, 0x49, 0xF5, 0x31, 0xA6, 0x46 ,
0xB6, 0x4A, 0xFE, 0x44, 0x10, 0x47, 0x20, 0x1C, 0xF2, 0x79, 0x35, 0x7A, 0x77, 0x7A, 0x79, 0x1B, 0x4B, 0x1C, 0x93, 0x42, 0x20, 0xD0, 0xA9, 0x49, 0x09, 0x78, 0x16, 0x29, 0x0F, 0xDB, 0x00, 0x2D, 0x0D, 0xD1, 0xAB, 0x49, 0x08, 0x70, 0x0A, 0x20, 0x81, 0x19, 0xE9, 0x48, 0x1A, 0x1C, 0xA6, 0x46, 0x8B, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x1A, 0xE0, 0xC0, 0x46, 0xC7, 0x04, 0x00, 0x00, 0xA5, 0x49, 0x08, 0x70, 0xE3, 0x48, 0x40, 0x19, 0x0A, 0x21, 0x89, 0x19, 0x7A, 0x1B, 0x52, 0x1C, 0xA6, 0x46, 0x83, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x0A, 0xE0, 0x9E, 0x49, 0x08, 0x70, 0x9E, 0x49, 0x08, 0x70, 0x0A, 0x20, 0x81, 0x19, 0xDB, 0x48, 0xA6, 0x46, 0x7D, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x96, 0x48, 0x00, 0x78, 0x00, 0x28, 0x0A, 0xD0, 0x95, 0x48, 0x00, 0x78, 0x00, 0x28, 0x06, 0xD0, 0x94, 0x48, 0x00, 0x78, 0x00, 0x28, 0x02, 0xD0, 0x93, 0x48, 0x00, 0x78, 0x00, 0x28, 0xFF, 0xFF, 0x82, 0x6A, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00 ,
0x00, 0xD1, 0x8C, 0xE0, 0x03, 0x20, 0x17, 0x21, 0x89, 0x01, 0xA6, 0x46, 0x90, 0x4A, 0xFE, 0x44, 0x10, 0x47, 0x87, 0x48, 0x01, 0x78, 0x87, 0x48, 0x07, 0x78, 0x84, 0x4E, 0x83, 0x4D, 0xE0, 0x48, 0x00, 0x68, 0x00, 0x28, 0x2E, 0xD1, 0x07, 0x98, 0x41, 0x61, 0x06, 0x62, 0xC6, 0x48, 0x06, 0x9A, 0x10, 0x64, 0x02, 0x2F, 0x01, 0xD0, 0x03, 0x2F, 0x01, 0xD1, 0x03, 0x22, 0x00, 0xE0, 0x3A, 0x1C, 0x06, 0x9B, 0xDA, 0x63, 0x2A, 0x78, 0x9A, 0x63, 0x01, 0x2F, 0x03, 0xD1, 0x05, 0x29, 0x04, 0xD0, 0x0D, 0x29, 0x02, 0xD0, 0xEC, 0x48, 0xDB, 0x30, 0x64, 0xE0, 0x00, 0x25, 0x00, 0x95, 0x01, 0x91, 0x02, 0x96, 0x03, 0x95, 0x04, 0x90, 0x2B, 0x1C, 0x20, 0x1C, 0x01, 0x1C, 0x8E, 0x46, 0xE6, 0x4E, 0xFE, 0x44, 0x30, 0x47, 0xE6, 0x48, 0x04, 0x60, 0x28, 0x1C, 0xA6, 0x46, 0xE5, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x4C, 0xE0, 0x0D, 0x27, 0x00, 0x20, 0x39, 0x1C, 0x05, 0xAA, 0xA6, 0x46, 0xE3, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x68, 0x46 ,
0xFF, 0xFF, 0x18, 0x6B, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x80, 0x8A, 0x40, 0x08, 0x05, 0xD2, 0x38, 0x1C, 0x50, 0x21, 0xA6, 0x46, 0xDC, 0x4A, 0xFE, 0x44, 0x10, 0x47, 0x38, 0x1C, 0x21, 0x1C, 0x0B, 0x1C, 0x29, 0x1C, 0x00, 0x22, 0xA6, 0x46, 0xD9, 0x4F, 0xFE, 0x44, 0x38, 0x47, 0x2B, 0x78, 0x0D, 0x20, 0x31, 0x1C, 0x22, 0x1C, 0xA6, 0x46, 0xD5, 0x4E, 0xFE, 0x44, 0x30, 0x47, 0x28, 0x78, 0x01, 0x30, 0x02, 0x1C, 0x0D, 0x20, 0x57, 0x49, 0x23, 0x1C, 0xA6, 0x46, 0xD0, 0x4E, 0xFE, 0x44, 0x30, 0x47, 0x55, 0x4E, 0x28, 0x78, 0x02, 0x30, 0x02, 0x1C, 0x0D, 0x20, 0x31, 0x1C, 0x23, 0x1C, 0xA6, 0x46, 0xCA, 0x4F, 0xFE, 0x44, 0x38, 0x47, 0x30, 0x78, 0x00, 0x28, 0x0A, 0xD0, 0x28, 0x78, 0x03, 0x30, 0x02, 0x1C, 0x4C, 0x48, 0x03, 0x78, 0x0D, 0x20, 0x8F, 0x49, 0xA6, 0x46, 0xC3, 0x4D, 0xFE, 0x44, 0x28, 0x47, 0xBF, 0x48, 0x04, 0x60, 0x00, 0x20, 0xA6, 0x46, 0xBE, 0x49, 0xFE, 0x44, 0x08, 0x47, 0xB9, 0x48, 0xEC, 0x49 ,
0x08, 0x18, 0x08, 0xB0, 0xF0, 0xBD, 0xC0, 0x46, 0x7B, 0xC0, 0xFF, 0xFF, 0xAE, 0x6B, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x1C, 0xE9, 0x48, 0x02, 0x68, 0xE9, 0x48, 0x00, 0x2A, 0x04, 0xD0, 0x00, 0x22, 0x0A, 0x62, 0x8A, 0x61, 0x1D, 0x30, 0xF7, 0x46, 0xD7, 0x30, 0xF7, 0x46, 0xC0, 0x46, 0x9F, 0x03, 0x00, 0x00, 0x7D, 0xB8, 0x03, 0x00, 0x01, 0x1C, 0xE2, 0x48, 0x02, 0x68, 0xE2, 0x48, 0x00, 0x2A, 0x02, 0xD0, 0xFF, 0x30, 0xB4, 0x30, 0xF7, 0x46, 0x00, 0x22, 0xCA, 0x61, 0x8A, 0x61, 0x4F, 0x30, 0xF7, 0x46, 0xC9, 0x21, 0x01, 0x00, 0x91, 0xE1, 0x00, 0x00, 0xDB, 0x48, 0x01, 0x68, 0x8A, 0x69, 0x01, 0x20, 0xC0, 0x03, 0x10, 0x43, 0x88, 0x61, 0x00, 0x20, 0x08, 0x61, 0xD8, 0x48, 0x23, 0x30, 0xF7, 0x46, 0x89, 0x17, 0x02, 0x00, 0x70, 0xB5, 0x05, 0x1C, 0xD5, 0x4E, 0x29, 0x6A, 0xEA, 0x69, 0x30, 0x1C, 0x01, 0x24, 0xA6, 0x46, 0x0B, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x68, 0x69, 0xA6, 0x46, 0xD1, 0x49 ,
0xFE, 0x44, 0x08, 0x47, 0xA8, 0x69, 0x06, 0x30, 0xA8, 0x60, 0xCF, 0x48, 0x00, 0x68, 0x68, 0x60, 0xEE, 0x60, 0xCE, 0x48, 0xFF, 0xFF, 0x44, 0x6C, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x6D, 0x30, 0x70, 0xBD, 0x46, 0x17, 0x1B, 0x00, 0x30, 0x3F, 0x08, 0x00, 0x41, 0xEB, 0x00, 0x00, 0x09, 0xB4, 0x03, 0x00, 0x30, 0xB5, 0xEE, 0x48, 0x01, 0x6D, 0x80, 0x6C, 0x08, 0x43, 0x18, 0xD0, 0xEC, 0x49, 0x08, 0x1C, 0x07, 0x22, 0xFF, 0x23, 0x09, 0x33, 0x1B, 0x58, 0x00, 0x2B, 0x04, 0xD0, 0xFF, 0x30, 0x1D, 0x30, 0x01, 0x3A, 0xF6, 0xD1, 0x0B, 0xE0, 0x02, 0x20, 0xF0, 0x4A, 0xF1, 0x4B, 0x01, 0x24, 0xA6, 0x46, 0xF0, 0x4D, 0xFE, 0x44, 0x28, 0x47, 0xA6, 0x46, 0xEF, 0x48, 0xFE, 0x44, 0x00, 0x47, 0xEF, 0x48, 0xFF, 0x30, 0x5C, 0x30, 0x30, 0xBD, 0xC0, 0x46, 0x53, 0x53, 0x49, 0x44, 0x00, 0xC0, 0x46, 0xC0, 0x4B, 0x45, 0x59, 0x00, 0xEE, 0x62, 0x08, 0x00, 0xF0, 0x62, 0x08, 0x00, 0xEC, 0x62, 0x08, 0x00, 0xED, 0x62, 0x08, 0x00 ,
0xE7, 0x7E, 0x03, 0x00, 0xE8, 0x62, 0x08, 0x00, 0xE9, 0x62, 0x08, 0x00, 0xEA, 0x62, 0x08, 0x00, 0xEB, 0x62, 0x08, 0x00, 0xDD, 0x7E, 0x03, 0x00, 0x8F, 0xC6, 0x03, 0x00, 0xF0, 0xB5, 0xFF, 0xFF, 0xDA, 0x6C, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x87, 0xB0, 0x00, 0x91, 0x01, 0x90, 0x6B, 0x48, 0x01, 0x68, 0xCC, 0x4A, 0x14, 0x1C, 0x02, 0x94, 0x07, 0x26, 0x00, 0x25, 0x03, 0x95, 0x04, 0x94, 0x05, 0x95, 0xDF, 0x48, 0x00, 0x68, 0x08, 0x43, 0x27, 0xD0, 0xE0, 0x68, 0x03, 0x99, 0x88, 0x42, 0x0A, 0xDD, 0x03, 0x90, 0x40, 0x1C, 0x00, 0x99, 0x88, 0x60, 0xC2, 0x49, 0xFF, 0x20, 0x1D, 0x30, 0x68, 0x43, 0x0C, 0x18, 0xE0, 0x68, 0x04, 0x91, 0x02, 0x99, 0xC9, 0x68, 0x88, 0x42, 0x10, 0xDB, 0x88, 0x42, 0x10, 0xD1, 0x02, 0x98, 0x01, 0x27, 0xBE, 0x46, 0xCE, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x06, 0x90, 0x20, 0x1C, 0xBE, 0x46, 0xCB, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x06, 0x99, 0x88, 0x42, 0x01, 0xDA, 0x05, 0x95, 0x02, 0x94 ,
0x51, 0x48, 0x01, 0x68, 0xFF, 0x27, 0x09, 0x37, 0x38, 0x59, 0x00, 0x28, 0x06, 0xD0, 0xC7, 0x48, 0x00, 0x68, 0x07, 0x2E, 0x00, 0xD1, 0x2E, 0x1C, 0x08, 0x43, 0x04, 0xD0, 0xFF, 0x34, 0x1D, 0x34, 0x01, 0x35, 0x07, 0x2D, 0xC2, 0xDB, 0x07, 0x2E, 0xFF, 0xFF, 0x70, 0x6D, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x0A, 0xD1, 0xC0, 0x48, 0x00, 0x68, 0x08, 0x43, 0x06, 0xD0, 0x05, 0x9E, 0x30, 0x1C, 0x01, 0x21, 0x8E, 0x46, 0xBA, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x01, 0x98, 0x47, 0x61, 0x00, 0x21, 0x81, 0x61, 0xFF, 0x22, 0x1D, 0x32, 0x72, 0x43, 0x04, 0x99, 0x89, 0x18, 0xC1, 0x61, 0x06, 0x62, 0xB4, 0x48, 0x39, 0x30, 0x07, 0xB0, 0xF0, 0xBD, 0x10, 0xB5, 0x04, 0x1C, 0x00, 0x20, 0x01, 0x21, 0x8E, 0x46, 0xB1, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x40, 0x1E, 0x00, 0xD5, 0x00, 0x20, 0x60, 0x60, 0xE0, 0x61, 0xAE, 0x48, 0x21, 0x30, 0x10, 0xBD, 0xC0, 0x46, 0x10, 0x63, 0x08, 0x00, 0x70, 0xB5, 0x04, 0x1C, 0xE5, 0x69, 0x66, 0x69 ,
0x00, 0x20, 0x01, 0x21, 0x8E, 0x46, 0xA7, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x60, 0x60, 0xAB, 0x19, 0xA6, 0x4A, 0xA5, 0x49, 0x93, 0x42, 0x02, 0xD3, 0x9A, 0x1A, 0x82, 0x42, 0x02, 0xD9, 0x08, 0x1C, 0x99, 0x30, 0x70, 0xBD, 0x08, 0x1C, 0xAB, 0x30, 0x70, 0xBD, 0x08, 0x6B, 0x41, 0x7D, 0x02, 0x88, 0x92, 0x00, 0xFF, 0xFF, 0x06, 0x6E, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x51, 0x1A, 0x3C, 0x39, 0xFF, 0x22, 0x5F, 0x32, 0x91, 0x42, 0x03, 0xD9, 0x65, 0x21, 0x01, 0x80, 0x02, 0x21, 0x81, 0x73, 0x9B, 0x48, 0x99, 0x49, 0x08, 0x18, 0xF7, 0x46, 0xC0, 0x46, 0x30, 0x63, 0x08, 0x00, 0xF8, 0xB5, 0x40, 0x68, 0x24, 0x21, 0x41, 0x43, 0x97, 0x48, 0x45, 0x18, 0x28, 0x1D, 0x0C, 0x21, 0x49, 0x19, 0x04, 0x22, 0x01, 0x23, 0x9E, 0x46, 0x94, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x91, 0x4C, 0x00, 0x28, 0x1B, 0xD0, 0x2B, 0x1C, 0x04, 0x22, 0x6E, 0x46, 0x91, 0x49, 0x1F, 0x7B, 0x08, 0x78, 0xC0, 0x43, 0x38, 0x43, 0x30, 0x70, 0x01, 0x33 ,
0x01, 0x31, 0x01, 0x36, 0x01, 0x3A, 0xF5, 0xD1, 0x0C, 0x20, 0x41, 0x19, 0x68, 0x46, 0x04, 0x22, 0x01, 0x23, 0x9E, 0x46, 0x87, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x00, 0x28, 0x02, 0xD0, 0x20, 0x1C, 0x4A, 0x30, 0xF8, 0xBD, 0x20, 0x1C, 0xF8, 0xBD, 0xB1, 0xBD, 0x00, 0x00, 0x15, 0x95, 0x00, 0x00, 0x58, 0x3F, 0x08, 0x00, 0xF3, 0xF8, 0x00, 0x00, 0xE9, 0x09, 0x02, 0x00, 0xFF, 0xFF, 0x9C, 0x6E, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x2B, 0x09, 0x02, 0x00, 0xDD, 0x0A, 0x02, 0x00, 0xF8, 0xB5, 0x05, 0x1C, 0xAA, 0x69, 0x7D, 0x49, 0x00, 0x20, 0x08, 0x56, 0x24, 0x21, 0x41, 0x43, 0x76, 0x48, 0x43, 0x18, 0x04, 0x24, 0x6E, 0x46, 0x76, 0x49, 0x1F, 0x79, 0x08, 0x78, 0xC0, 0x43, 0x38, 0x43, 0x30, 0x70, 0x01, 0x33, 0x01, 0x31, 0x01, 0x36, 0x01, 0x3C, 0xF5, 0xD1, 0x11, 0x1D, 0x68, 0x46, 0x04, 0x22, 0x01, 0x24, 0xA6, 0x46, 0x6D, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x01, 0x1C, 0x6D, 0x48, 0x04, 0xD0, 0x6E, 0x49, 0x09, 0x78 ,
0x69, 0x60, 0x45, 0x30, 0xF8, 0xBD, 0xEC, 0x61, 0xAF, 0x30, 0xF8, 0xBD, 0x70, 0xB5, 0xC5, 0x68, 0x81, 0x68, 0x0A, 0x89, 0x6D, 0x4E, 0x00, 0x2A, 0x22, 0xD0, 0x01, 0x24, 0xC2, 0x6D, 0xA2, 0x18, 0xC2, 0x65, 0x08, 0x89, 0x0D, 0x28, 0x1B, 0xD1, 0x68, 0x6B, 0x21, 0x1C, 0xA6, 0x46, 0x63, 0x4A, 0xFE, 0x44, 0x10, 0x47, 0x22, 0x1C, 0x28, 0x1C, 0x00, 0x21, 0xA6, 0x46, 0x60, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x2C, 0x60, 0xE9, 0x6B, 0xFF, 0xFF, 0x32, 0x6F, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x28, 0x1C, 0xA6, 0x46, 0x5E, 0x4A, 0xFE, 0x44, 0x10, 0x47, 0x28, 0x1C, 0xA6, 0x46, 0x5C, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x30, 0x1C, 0x3D, 0x30, 0x70, 0xBD, 0x30, 0x1C, 0x23, 0x30, 0x70, 0xBD, 0xC0, 0x46, 0xB1, 0x02, 0x00, 0x00, 0x74, 0x3F, 0x08, 0x00, 0x19, 0xC6, 0x00, 0x00, 0x5C, 0x3F, 0x08, 0x00, 0x1D, 0xC2, 0x00, 0x00, 0x68, 0x44, 0x08, 0x00, 0x43, 0x12, 0x03, 0x00, 0x34, 0x63, 0x08, 0x00, 0x2F, 0x7A, 0x02, 0x00 ,
0xB4, 0x36, 0x08, 0x00, 0x8F, 0xF4, 0x01, 0x00, 0xF0, 0xB5, 0x05, 0x1C, 0xAB, 0x69, 0xEC, 0x69, 0x60, 0x68, 0x00, 0x68, 0x2A, 0x30, 0x01, 0x78, 0x0A, 0x06, 0x41, 0x78, 0x09, 0x04, 0x8A, 0x18, 0x81, 0x78, 0x09, 0x02, 0x8A, 0x18, 0xC1, 0x78, 0x8A, 0x18, 0x8E, 0x26, 0xF1, 0x5A, 0x09, 0x0A, 0x01, 0x70, 0xF0, 0x5C, 0x61, 0x68, 0x09, 0x68, 0x2B, 0x26, 0x70, 0x54, 0x8C, 0x20, 0xC0, 0x18, 0x61, 0x68, 0x0E, 0x68, 0x01, 0x88, 0x09, 0x0A, 0x2C, 0x27, 0xB9, 0x55, 0x61, 0x68, 0x09, 0x68, 0xFF, 0xFF, 0xC8, 0x6F, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x2D, 0x26, 0x00, 0x78, 0x70, 0x54, 0x60, 0x68, 0x01, 0x68, 0x32, 0x31, 0x08, 0x78, 0x00, 0x02, 0x49, 0x78, 0x08, 0x18, 0x00, 0x04, 0x00, 0x0C, 0x8C, 0x21, 0xCB, 0x58, 0x35, 0x49, 0x41, 0x40, 0x08, 0x04, 0x00, 0x0C, 0xC0, 0x18, 0x80, 0x1A, 0x01, 0x21, 0x8E, 0x46, 0x32, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x61, 0x68, 0x0A, 0x68, 0x32, 0x23, 0x01, 0x0A, 0x99, 0x54 ,
0x61, 0x68, 0x09, 0x68, 0x33, 0x22, 0x50, 0x54, 0x60, 0x68, 0x68, 0x60, 0x2C, 0x48, 0xF0, 0xBD, 0x00, 0x00, 0x1B, 0x00, 0x34, 0x04, 0x1B, 0x00, 0x02, 0x6A, 0x8B, 0x69, 0xDB, 0x69, 0x1B, 0x68, 0x83, 0x60, 0x88, 0x69, 0xC0, 0x69, 0x41, 0x68, 0x8A, 0x42, 0x00, 0xDA, 0x42, 0x60, 0x25, 0x48, 0x79, 0x30, 0xF7, 0x46, 0x24, 0x48, 0x57, 0x30, 0xF7, 0x46, 0x24, 0x48, 0x91, 0x30, 0xF7, 0x46, 0x32, 0x04, 0x00, 0x00, 0xC4, 0x07, 0x00, 0x00, 0x15, 0x09, 0x02, 0x00, 0xC5, 0x93, 0x00, 0x00, 0x0D, 0x91, 0x00, 0x00, 0x40, 0x1E, 0x80, 0x00, 0x1E, 0x4B, 0xFF, 0xFF, 0x5E, 0x70, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x19, 0x50, 0x1C, 0x49, 0x0A, 0x50, 0xF7, 0x46, 0xC0, 0x46, 0xBD, 0xB5, 0x00, 0x00, 0x95, 0x92, 0x00, 0x00, 0xFD, 0x93, 0x00, 0x00, 0x54, 0x3F, 0x08, 0x00, 0x29, 0x4F, 0x03, 0x00, 0xDF, 0xE8, 0x02, 0x00, 0x36, 0x89, 0x41, 0x00, 0x81, 0x06, 0x00, 0x00, 0xB1, 0x78, 0x00, 0x00, 0x94, 0xEC, 0x01, 0x00 ,
0x08, 0x19, 0x1B, 0x00, 0x8F, 0xC6, 0x03, 0x00, 0x1C, 0x17, 0x1B, 0x00, 0x67, 0x66, 0x03, 0x00, 0xA6, 0x44, 0x08, 0x00, 0x18, 0x17, 0x1B, 0x00, 0xA7, 0x2F, 0x02, 0x00, 0x91, 0x44, 0x03, 0x00, 0x91, 0x63, 0x03, 0x00, 0x5B, 0x44, 0x03, 0x00, 0xE7, 0x44, 0x03, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x61, 0xA2, 0x03, 0x00, 0x6A, 0x1E, 0x01, 0x00, 0x45, 0xDA, 0x00, 0x00, 0xD7, 0xE8, 0x01, 0x00, 0xE9, 0x78, 0x02, 0x00, 0x04, 0xF3, 0x1A, 0x00, 0x80, 0x7B, 0x08, 0x00, 0xFC, 0xB5, 0x04, 0x1C, 0xA5, 0x69, 0x60, 0x6A, 0x01, 0x90, 0x20, 0x69, 0x00, 0x28, 0x35, 0xD4, 0x08, 0x28, 0x33, 0xDA, 0xE1, 0x69, 0x09, 0x68, 0xFF, 0xFF, 0xF4, 0x70, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x10, 0x29, 0x2F, 0xD1, 0xAC, 0x21, 0x41, 0x43, 0x9E, 0x4A, 0x51, 0x5C, 0x49, 0x08, 0x27, 0xD3, 0x00, 0x06, 0x00, 0x16, 0xA2, 0x68, 0x69, 0x46, 0x01, 0x23, 0x9E, 0x46, 0x9A, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x06, 0x1C, 0x39, 0x30, 0x1F, 0xD0 ,
0x00, 0x2E, 0x1D, 0xD0, 0x00, 0x98, 0x07, 0x68, 0x00, 0x99, 0x0C, 0x39, 0x01, 0x98, 0x01, 0x60, 0x28, 0x1D, 0x10, 0x21, 0x79, 0x1A, 0x04, 0x22, 0x01, 0x23, 0x9E, 0x46, 0x91, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x02, 0x22, 0x2A, 0x80, 0xA8, 0x1C, 0x08, 0x21, 0x79, 0x1A, 0x01, 0x23, 0x9E, 0x46, 0x8C, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x03, 0xE0, 0x38, 0x20, 0x00, 0xE0, 0x00, 0x20, 0xC6, 0x43, 0x26, 0x60, 0x89, 0x48, 0x7C, 0x30, 0x20, 0x62, 0xFC, 0xBD, 0x30, 0xB5, 0x05, 0x1C, 0x28, 0x69, 0xA9, 0x69, 0x90, 0x29, 0x1D, 0xD1, 0x69, 0x69, 0x09, 0x78, 0x04, 0x29, 0x19, 0xD0, 0x05, 0x29, 0x17, 0xD0, 0x0A, 0x29, 0x15, 0xD0, 0x06, 0x29, 0x13, 0xD0, 0x0C, 0x29, 0x01, 0xDB, 0xFF, 0xFF, 0x8A, 0x71, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x10, 0x29, 0x0F, 0xD1, 0x01, 0x24, 0xA6, 0x46, 0x7D, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x7C, 0x48, 0x7D, 0x49, 0x00, 0x22, 0xA6, 0x46, 0x7C, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x7C, 0x48 ,
0xFF, 0x30, 0x5F, 0x30, 0x28, 0x62, 0x30, 0xBD, 0xF0, 0xB5, 0x89, 0xB0, 0x05, 0x90, 0x41, 0x69, 0x02, 0x69, 0x75, 0x48, 0x79, 0x4E, 0x82, 0x42, 0x3A, 0xD0, 0x04, 0x30, 0x82, 0x42, 0x25, 0xD0, 0x74, 0x4D, 0xAA, 0x42, 0x00, 0xD0, 0xCC, 0xE0, 0x08, 0x68, 0x06, 0x1C, 0x0C, 0x22, 0x8F, 0x1A, 0x4A, 0x68, 0x89, 0x18, 0x09, 0x1D, 0x10, 0x22, 0x01, 0x24, 0xA6, 0x46, 0x6E, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x01, 0x1C, 0x09, 0xD1, 0xAC, 0x22, 0x72, 0x43, 0xCB, 0x48, 0x80, 0x18, 0x46, 0x22, 0x12, 0x5C, 0x11, 0x2A, 0x01, 0xD1, 0x44, 0x22, 0x14, 0x54, 0x28, 0x1C, 0x3A, 0x1C, 0xA6, 0x46, 0x62, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x69, 0x48, 0xEC, 0x30, 0xAB, 0xE0, 0x08, 0x68, 0xC0, 0x00, 0x30, 0x18, 0x8A, 0x68, 0x02, 0x2A, 0x02, 0xD0, 0xFF, 0xFF, 0x20, 0x72, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0xE7, 0x20, 0x80, 0x00, 0xA2, 0xE0, 0xCA, 0x68, 0x89, 0x18, 0x09, 0x7B, 0x41, 0x60, 0x80, 0x21, 0x01, 0x60, 0x3B, 0x20 ,
0x00, 0x01, 0x99, 0xE0, 0x08, 0x68, 0x06, 0x90, 0xC0, 0x00, 0x34, 0x58, 0x10, 0x20, 0x04, 0x90, 0x01, 0x25, 0xAE, 0x46, 0x57, 0x48, 0xFE, 0x44, 0x00, 0x47, 0x07, 0x90, 0x00, 0x28, 0x00, 0xD1, 0x89, 0xE0, 0x0C, 0x21, 0x07, 0x98, 0x0F, 0x18, 0xB0, 0x49, 0xAC, 0x20, 0x06, 0x9A, 0x50, 0x43, 0x08, 0x18, 0x48, 0x22, 0x13, 0x5C, 0x5B, 0x06, 0x5B, 0x0E, 0x13, 0x54, 0x06, 0x9A, 0xD2, 0x00, 0xB6, 0x18, 0x71, 0x68, 0x00, 0x29, 0x47, 0xD1, 0x00, 0x2C, 0x01, 0xDD, 0x08, 0x2C, 0x21, 0xDB, 0x00, 0x22, 0x69, 0x46, 0x0A, 0x70, 0x01, 0x92, 0x0A, 0x81, 0x8A, 0x72, 0xCD, 0x72, 0x0D, 0x73, 0x4D, 0x73, 0x01, 0x88, 0x44, 0x48, 0x06, 0x23, 0xAE, 0x46, 0x44, 0x4C, 0xFE, 0x44, 0x20, 0x47, 0x04, 0x1C, 0x02, 0xDC, 0x00, 0x20, 0xC0, 0x43, 0x36, 0xE0, 0x34, 0x60, 0xAC, 0x20, 0x60, 0x43, 0x9A, 0x49, 0xFF, 0xFF, 0xB6, 0x72, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x09, 0x18, 0x5C, 0x22, 0x28, 0x1C, 0x50, 0x54, 0x48, 0x20 ,
0x42, 0x5C, 0x52, 0x06, 0x52, 0x0E, 0x42, 0x54, 0xAC, 0x20, 0x60, 0x43, 0x94, 0x49, 0x08, 0x18, 0x5C, 0x21, 0x09, 0x5C, 0x49, 0x1E, 0x02, 0x29, 0x16, 0xD9, 0x03, 0x39, 0x08, 0xD0, 0x00, 0x20, 0x30, 0x56, 0xAE, 0x46, 0xEA, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x80, 0x20, 0x30, 0x60, 0xDB, 0xE7, 0x08, 0x94, 0x80, 0x21, 0x31, 0x60, 0x48, 0x22, 0x13, 0x5C, 0x19, 0x43, 0x11, 0x54, 0xAE, 0x46, 0xE4, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x0A, 0xE0, 0x01, 0x20, 0xCE, 0xE7, 0x06, 0x98, 0x39, 0x1C, 0x04, 0xAA, 0xAE, 0x46, 0xE0, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x04, 0x1C, 0x08, 0x90, 0x06, 0x98, 0x38, 0x60, 0x08, 0x98, 0x78, 0x60, 0x00, 0x28, 0x15, 0xD0, 0xAC, 0x20, 0x60, 0x43, 0x7C, 0x49, 0x09, 0x18, 0x48, 0x88, 0x02, 0x04, 0x02, 0x20, 0x10, 0x43, 0xB8, 0x60, 0x48, 0x68, 0x02, 0x0E, 0x01, 0x02, 0x09, 0x0E, 0x09, 0x02, 0x11, 0x43, 0x02, 0x04, 0x12, 0x0E, 0xFF, 0xFF, 0x4C, 0x73, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00 ,
0x12, 0x04, 0x0A, 0x43, 0x00, 0x06, 0x10, 0x43, 0xF8, 0x60, 0x07, 0x98, 0x0D, 0x49, 0x00, 0x22, 0x10, 0x23, 0xAE, 0x46, 0xCE, 0x4C, 0xFE, 0x44, 0x20, 0x47, 0x13, 0x48, 0x00, 0xE0, 0x16, 0x20, 0xCC, 0x49, 0x09, 0x18, 0x05, 0x98, 0x01, 0x62, 0x09, 0xB0, 0xF0, 0xBD, 0x5D, 0x0D, 0x1B, 0x00, 0x81, 0xE7, 0x02, 0x00, 0x09, 0xB4, 0x03, 0x00, 0x27, 0x1A, 0x02, 0x00, 0x2F, 0x7A, 0x02, 0x00, 0x02, 0x02, 0x00, 0x00, 0x05, 0x10, 0x00, 0x00, 0xCF, 0xF6, 0x00, 0x00, 0xD5, 0xF4, 0x00, 0x00, 0x02, 0x10, 0x00, 0x00, 0x91, 0x19, 0x02, 0x00, 0x50, 0x65, 0x08, 0x00, 0x71, 0xC0, 0x02, 0x00, 0x50, 0x19, 0x1B, 0x00, 0x29, 0x16, 0x01, 0x00, 0x2A, 0x03, 0x00, 0x00, 0xF0, 0xB5, 0x8B, 0xB0, 0x07, 0x90, 0x05, 0x69, 0x47, 0x69, 0x0C, 0x20, 0x38, 0x1A, 0x08, 0x90, 0xB6, 0x49, 0x8D, 0x42, 0x16, 0xD1, 0x78, 0x68, 0x0F, 0x30, 0x00, 0x11, 0x00, 0x01, 0x78, 0x60, 0x38, 0x68, 0x0B, 0x28, 0x0E, 0xD8, 0x00, 0x23, 0x68, 0x46 ,
0xFF, 0xFF, 0xE2, 0x73, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x03, 0x70, 0x08, 0x98, 0x05, 0x22, 0x01, 0x24, 0xA6, 0x46, 0xAE, 0x4C, 0xFE, 0x44, 0x20, 0x47, 0xAE, 0x48, 0xFF, 0x30, 0x95, 0x30, 0x07, 0x99, 0x08, 0x62, 0xAC, 0x48, 0x85, 0x42, 0x23, 0xD1, 0xAC, 0x48, 0x02, 0x78, 0x6C, 0x46, 0x22, 0x72, 0x43, 0x78, 0x63, 0x72, 0x81, 0x78, 0xA1, 0x72, 0xC0, 0x78, 0xE0, 0x72, 0x00, 0x91, 0x01, 0x90, 0x03, 0x20, 0xA6, 0x49, 0x01, 0x39, 0x01, 0x26, 0xB6, 0x46, 0xF3, 0x4E, 0xFE, 0x44, 0x30, 0x47, 0x04, 0x20, 0x20, 0x70, 0x08, 0x98, 0x9F, 0x49, 0x00, 0x22, 0x02, 0xAB, 0x01, 0x24, 0xA6, 0x46, 0x9B, 0x4C, 0xFE, 0x44, 0x20, 0x47, 0x9A, 0x48, 0xFF, 0x30, 0x95, 0x30, 0x07, 0x99, 0x08, 0x62, 0xEB, 0x49, 0x8D, 0x42, 0x14, 0xD1, 0x02, 0x22, 0x68, 0x46, 0x02, 0x70, 0x3A, 0x68, 0xAC, 0x20, 0x42, 0x43, 0x30, 0x48, 0x68, 0x30, 0x83, 0x18, 0x08, 0x98, 0x00, 0x22, 0x01, 0x24, 0xA6, 0x46, 0x8F, 0x4C, 0xFE, 0x44 ,
0x20, 0x47, 0x8E, 0x48, 0xFF, 0x30, 0x95, 0x30, 0x07, 0x99, 0xFF, 0xFF, 0x78, 0x74, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x08, 0x62, 0xEF, 0x48, 0x85, 0x42, 0x00, 0xD0, 0x04, 0xE1, 0x03, 0x20, 0x8C, 0x49, 0x01, 0x22, 0x96, 0x46, 0xEC, 0x4A, 0xFE, 0x44, 0x10, 0x47, 0x86, 0x48, 0xFF, 0x30, 0x95, 0x30, 0x09, 0x90, 0x38, 0x68, 0xEA, 0x4D, 0x00, 0x28, 0x00, 0xD1, 0xE2, 0xE0, 0x01, 0x24, 0xA6, 0x46, 0xE6, 0x48, 0xFE, 0x44, 0x00, 0x47, 0x00, 0x28, 0x00, 0xD1, 0xD6, 0xE0, 0xE4, 0x48, 0x02, 0x68, 0x03, 0x20, 0x7F, 0x49, 0x01, 0x31, 0xA6, 0x46, 0xE2, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0xDF, 0x48, 0x00, 0x68, 0x00, 0x28, 0x5A, 0xD1, 0xDF, 0x4D, 0x2E, 0x20, 0x41, 0x19, 0xB8, 0x68, 0x03, 0x30, 0x08, 0x70, 0x38, 0x7A, 0x48, 0x70, 0x2E, 0x1C, 0x30, 0x36, 0xB8, 0x68, 0x28, 0x18, 0x30, 0x30, 0xDA, 0x49, 0x0A, 0x68, 0x30, 0x3A, 0x31, 0x1C, 0xA6, 0x46, 0xD8, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x78, 0x68, 0x38, 0x18 ,
0x01, 0x1D, 0xBA, 0x68, 0x30, 0x1C, 0xA6, 0x46, 0xD9, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0xB8, 0x68, 0x41, 0x19, 0x97, 0x22, 0xFF, 0xFF, 0x0E, 0x75, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x09, 0x30, 0x50, 0x54, 0xB8, 0x68, 0x46, 0x19, 0x9E, 0x36, 0x30, 0x70, 0x01, 0x36, 0xB8, 0x68, 0x01, 0xE0, 0x14, 0x0D, 0x1B, 0x00, 0x30, 0x18, 0xCA, 0x49, 0x0A, 0x68, 0x9E, 0x3A, 0x31, 0x1C, 0xA6, 0x46, 0xC8, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x78, 0x68, 0x38, 0x18, 0x01, 0x1D, 0xBA, 0x68, 0x30, 0x1C, 0xA6, 0x46, 0xC9, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0xB8, 0x68, 0x40, 0x00, 0xC0, 0x49, 0x09, 0x68, 0x08, 0x18, 0x28, 0x18, 0xC0, 0x49, 0x0A, 0x79, 0x02, 0x70, 0x4A, 0x79, 0x42, 0x70, 0x8A, 0x79, 0x82, 0x70, 0xC9, 0x79, 0xC1, 0x70, 0x04, 0x30, 0x0F, 0x21, 0x41, 0x1A, 0x0A, 0x78, 0xBB, 0x68, 0x9A, 0x18, 0x0A, 0x70, 0x40, 0x1B, 0x00, 0x04, 0x00, 0x0C, 0xB5, 0x49, 0x08, 0x60, 0xB1, 0x48, 0x04, 0x60, 0x02, 0x20, 0x01, 0x1C ,
0x11, 0x22, 0xA6, 0x46, 0xB4, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x06, 0x1C, 0x63, 0xD4, 0x03, 0x20, 0xA6, 0x46, 0xB1, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x0A, 0x90, 0x00, 0x25, 0x01, 0x1C, 0xFF, 0xFF, 0xA4, 0x75, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x8D, 0x42, 0x50, 0xD0, 0x29, 0x1C, 0x2B, 0x22, 0xA6, 0x46, 0xAD, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x0C, 0x20, 0x0A, 0x99, 0x40, 0x18, 0xAC, 0x22, 0x72, 0x43, 0xAB, 0x49, 0x8F, 0x18, 0x78, 0x63, 0x29, 0x1C, 0x18, 0x22, 0xA6, 0x46, 0xA6, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x9F, 0x48, 0x02, 0x68, 0x79, 0x6B, 0x4A, 0x60, 0x0A, 0x98, 0xAC, 0x30, 0x08, 0x60, 0x08, 0x68, 0x9A, 0x49, 0xA6, 0x46, 0xA0, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x29, 0x1C, 0x03, 0xA8, 0x10, 0x22, 0xA6, 0x46, 0x9C, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0xE0, 0x21, 0x68, 0x46, 0x01, 0x74, 0x45, 0x74, 0x85, 0x74, 0xFB, 0x21, 0xC1, 0x74, 0xEE, 0x49, 0xC1, 0x81, 0x02, 0x21, 0x81, 0x81, 0x79, 0x6B, 0xCA, 0x68 ,
0x01, 0x20, 0xC0, 0x03, 0x10, 0x43, 0xC8, 0x60, 0x48, 0x68, 0x00, 0x90, 0x2A, 0x1C, 0x30, 0x1C, 0x0A, 0x9D, 0x29, 0x1C, 0x03, 0xAB, 0xA6, 0x46, 0xE6, 0x4F, 0xFE, 0x44, 0x38, 0x47, 0x07, 0x1C, 0x30, 0x06, 0x00, 0x16, 0xA6, 0x46, 0xEF, 0x49, 0xFF, 0xFF, 0x3A, 0x76, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0xFE, 0x44, 0x08, 0x47, 0x28, 0x1C, 0xA6, 0x46, 0xEE, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x11, 0xE0, 0x30, 0x06, 0x00, 0x16, 0xA6, 0x46, 0xE9, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x01, 0x20, 0xC7, 0x43, 0x08, 0xE0, 0x07, 0x1C, 0x06, 0xE0, 0x00, 0x20, 0x00, 0x21, 0xCF, 0x43, 0x01, 0xE0, 0x00, 0x20, 0x07, 0x1C, 0x28, 0x60, 0x00, 0x23, 0x68, 0x46, 0x03, 0x70, 0x3A, 0x06, 0x12, 0x0E, 0x08, 0x98, 0x6F, 0x49, 0x01, 0x24, 0xA6, 0x46, 0x09, 0x4C, 0xFE, 0x44, 0x20, 0x47, 0x07, 0x98, 0x09, 0x99, 0x01, 0x62, 0x0B, 0xB0, 0xF0, 0xBD, 0xC1, 0x18, 0x01, 0x00, 0xF1, 0x1B, 0x01, 0x00, 0xF3, 0x1C, 0x02, 0x00, 0x7B, 0xC0 ,
0x02, 0x00, 0x91, 0xF0, 0x00, 0x00, 0x03, 0x02, 0x00, 0x00, 0xA3, 0xC0, 0x02, 0x00, 0xA9, 0xE9, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0xE4, 0x62, 0x08, 0x00, 0xAC, 0x05, 0x00, 0x00, 0xFE, 0xB5, 0x07, 0x1C, 0x7D, 0x69, 0xBE, 0x69, 0x0C, 0x20, 0x30, 0x1A, 0x01, 0x90, 0xDF, 0x4C, 0x0A, 0x2D, 0x13, 0xD1, 0xFF, 0xFF, 0xD0, 0x76, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x30, 0x68, 0xDB, 0x49, 0x08, 0x60, 0x01, 0x20, 0x86, 0x46, 0xDA, 0x48, 0xFE, 0x44, 0x00, 0x47, 0x0A, 0x20, 0x00, 0x21, 0x01, 0x9A, 0x01, 0x23, 0x9E, 0x46, 0xE6, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0xF5, 0x20, 0x80, 0x00, 0x00, 0x19, 0x38, 0x62, 0x03, 0x2D, 0x79, 0xD1, 0xF5, 0x20, 0x80, 0x00, 0x00, 0x19, 0x02, 0x90, 0x70, 0x68, 0x00, 0x28, 0x0C, 0xD1, 0x00, 0x21, 0xCF, 0x48, 0x01, 0x60, 0xCF, 0x48, 0x00, 0x68, 0x00, 0x28, 0x61, 0xD0, 0x01, 0x21, 0x8E, 0x46, 0xCD, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x5B, 0xE0, 0xCC, 0x48, 0xB1, 0x68, 0x01, 0x60 ,
0xF1, 0x68, 0x41, 0x60, 0x31, 0x69, 0x81, 0x60, 0x71, 0x69, 0xC1, 0x60, 0xB1, 0x69, 0xC1, 0x63, 0xF1, 0x69, 0x01, 0x64, 0x31, 0x6A, 0xC1, 0x64, 0x01, 0x24, 0xA6, 0x46, 0xC5, 0x48, 0xFE, 0x44, 0x00, 0x47, 0xA6, 0x46, 0xC4, 0x48, 0xFE, 0x44, 0x00, 0x47, 0x70, 0x68, 0x7D, 0x25, 0xED, 0x00, 0xA8, 0x42, 0x21, 0xD8, 0x01, 0x28, 0x18, 0xD0, 0x02, 0x28, 0x05, 0xD0, 0xFF, 0xFF, 0x66, 0x77, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x28, 0x1C, 0xA6, 0x46, 0xBE, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x1C, 0xE0, 0xB9, 0x48, 0x00, 0x23, 0x19, 0x1C, 0x59, 0x43, 0x3E, 0x22, 0x4A, 0x43, 0x82, 0x83, 0x02, 0x30, 0x01, 0x33, 0x10, 0x2B, 0xF6, 0xDB, 0xA6, 0x46, 0xB4, 0x48, 0xFE, 0x44, 0x00, 0x47, 0xB5, 0x48, 0x0D, 0xE0, 0xB5, 0x4D, 0x28, 0x1C, 0xA6, 0x46, 0xB2, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x04, 0xE0, 0xA6, 0x46, 0xAF, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x75, 0x68, 0xAE, 0x48, 0x05, 0x60, 0x05, 0x1C, 0xA7, 0x4E, 0x30, 0x68 ,
0x00, 0x28, 0x06, 0xD1, 0xAD, 0x48, 0x00, 0x68, 0xA6, 0x46, 0xAC, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x30, 0x60, 0x00, 0x94, 0x2B, 0x68, 0xAA, 0x49, 0xAB, 0x4A, 0xA6, 0x46, 0xAB, 0x4D, 0xFE, 0x44, 0x28, 0x47, 0x9C, 0x48, 0x04, 0x60, 0x03, 0x20, 0x00, 0x21, 0x01, 0x9A, 0x01, 0x23, 0x9E, 0x46, 0xA7, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x02, 0x98, 0x38, 0x62, 0xFE, 0xBD, 0xC0, 0x46, 0x13, 0x7F, 0x03, 0x00, 0x12, 0x10, 0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x77, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x30, 0xB5, 0x05, 0x1C, 0x00, 0x20, 0x01, 0x24, 0xA6, 0x46, 0xA0, 0x49, 0xFE, 0x44, 0x08, 0x47, 0xA6, 0x46, 0x9F, 0x49, 0xFE, 0x44, 0x08, 0x47, 0xA6, 0x46, 0x9E, 0x48, 0xFE, 0x44, 0x00, 0x47, 0x7D, 0x21, 0xC9, 0x00, 0xA6, 0x46, 0x9E, 0x4A, 0xFE, 0x44, 0x10, 0x47, 0x9B, 0x49, 0x08, 0x18, 0x99, 0x49, 0x08, 0x80, 0x9B, 0x48, 0x0A, 0x30, 0x28, 0x62, 0x30, 0xBD, 0x11, 0x10, 0x00, 0x00, 0xDD, 0x7E, 0x03, 0x00, 0xB9, 0x90 ,
0x00, 0x00, 0x6C, 0x64, 0x08, 0x00, 0xE7, 0x7E, 0x03, 0x00, 0x74, 0x64, 0x08, 0x00, 0x70, 0x64, 0x08, 0x00, 0x6D, 0xC6, 0x03, 0x00, 0x08, 0x19, 0x1B, 0x00, 0x11, 0x18, 0x02, 0x00, 0xD1, 0x78, 0x02, 0x00, 0xC9, 0xBA, 0x03, 0x00, 0x09, 0xB4, 0x03, 0x00, 0x14, 0x0D, 0x1B, 0x00, 0xFE, 0xB5, 0x02, 0x90, 0x45, 0x69, 0x68, 0x46, 0x01, 0x21, 0x8E, 0x46, 0x89, 0x49, 0xFE, 0x44, 0x08, 0x47, 0x89, 0x48, 0x04, 0x1C, 0x68, 0x68, 0x01, 0x69, 0x4A, 0x78, 0x00, 0x27, 0x3E, 0x1C, 0x20, 0x88, 0xFF, 0xFF, 0x92, 0x78, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x40, 0x08, 0x22, 0xD3, 0x20, 0x1D, 0x89, 0x1C, 0x01, 0x23, 0x9E, 0x46, 0x83, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x00, 0x28, 0x07, 0xD1, 0x68, 0x68, 0x00, 0x69, 0x40, 0x78, 0x21, 0x88, 0x09, 0x04, 0x89, 0x16, 0x81, 0x42, 0x3D, 0xD0, 0x02, 0x20, 0x00, 0x5F, 0x00, 0x99, 0x08, 0x1A, 0x00, 0x04, 0x00, 0x14, 0x3C, 0x28, 0x03, 0xDD, 0x20, 0x88, 0x40, 0x10, 0x40, 0x00 ,
0x20, 0x80, 0x78, 0x1C, 0x07, 0x06, 0x3F, 0x0E, 0x68, 0x68, 0x01, 0x69, 0x4A, 0x78, 0x2A, 0x34, 0x01, 0x36, 0x14, 0x2E, 0xD5, 0xDB, 0x00, 0x2A, 0x02, 0xD1, 0xAB, 0x20, 0x40, 0x00, 0x50, 0xE0, 0x00, 0x9B, 0x6D, 0x48, 0x14, 0x21, 0x00, 0x22, 0x04, 0x88, 0x64, 0x08, 0x03, 0xD3, 0x2A, 0x30, 0x01, 0x32, 0x01, 0x39, 0xF8, 0xD1, 0x12, 0x06, 0x12, 0x0E, 0x14, 0x2F, 0x16, 0xD1, 0x66, 0x48, 0x00, 0x88, 0x00, 0x06, 0x44, 0x16, 0x64, 0x49, 0x00, 0x22, 0x01, 0x20, 0x4E, 0x8D, 0x36, 0x06, 0x76, 0x16, 0xA6, 0x42, 0x02, 0xDD, 0x34, 0x1C, 0x02, 0x06, 0xFF, 0xFF, 0x28, 0x79, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0x12, 0x0E, 0x2A, 0x31, 0x01, 0x30, 0x14, 0x28, 0xF3, 0xDB, 0x02, 0xE0, 0x32, 0x06, 0x12, 0x0E, 0x00, 0x9B, 0x2A, 0x20, 0x42, 0x43, 0x5A, 0x48, 0x11, 0x18, 0x0C, 0x88, 0x01, 0x20, 0x20, 0x43, 0x00, 0x04, 0x00, 0x0C, 0x08, 0x80, 0xFE, 0x24, 0xA0, 0x43, 0x14, 0x24, 0x64, 0x57, 0x64, 0x06, 0x24, 0x0E ,
0x04, 0x43, 0x52, 0x48, 0x14, 0x52, 0x14, 0x18, 0x63, 0x80, 0x08, 0x88, 0x80, 0x05, 0x82, 0x0D, 0x68, 0x68, 0x00, 0x69, 0x40, 0x78, 0x80, 0x02, 0x10, 0x43, 0x08, 0x80, 0x68, 0x68, 0x02, 0x69, 0x20, 0x1D, 0x91, 0x1C, 0x52, 0x78, 0x01, 0x23, 0x9E, 0x46, 0x4B, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x02, 0x98, 0x04, 0x61, 0xFE, 0x20, 0x47, 0x49, 0x09, 0x18, 0x02, 0x98, 0x01, 0x62, 0xFE, 0xBD, 0x82, 0x69, 0x41, 0x69, 0x03, 0x69, 0x02, 0x2B, 0x0A, 0xD1, 0x01, 0x2A, 0x01, 0xD1, 0x00, 0x29, 0x05, 0xD0, 0x02, 0x2A, 0x04, 0xD1, 0x00, 0x29, 0x02, 0xD1, 0x11, 0x21, 0x00, 0xE0, 0x06, 0x21, 0x41, 0x61, 0xF7, 0x46, 0xFF, 0xFF, 0xBE, 0x79, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0xC0, 0x46, 0x14, 0xE9, 0x00, 0x00, 0xC9, 0x18, 0x02, 0x00, 0x30, 0xB5, 0x05, 0x1C, 0x3A, 0x48, 0x00, 0x78, 0x00, 0x28, 0x04, 0xD0, 0x01, 0x20, 0x86, 0x46, 0x38, 0x48, 0xFE, 0x44, 0x00, 0x47, 0x01, 0x24, 0xA6, 0x46, 0x37, 0x48, 0xFE, 0x44 ,
0x00, 0x47, 0xA6, 0x46, 0x36, 0x48, 0xFE, 0x44, 0x00, 0x47, 0x35, 0x48, 0x0E, 0x30, 0x28, 0x62, 0x30, 0xBD, 0x49, 0x19, 0x01, 0x00, 0x2F, 0x7A, 0x02, 0x00, 0x18, 0xB5, 0x43, 0x69, 0x81, 0x69, 0x31, 0x48, 0x81, 0x29, 0x00, 0xD1, 0x0B, 0x38, 0x00, 0x21, 0x00, 0x91, 0x1A, 0x68, 0x9B, 0x68, 0x01, 0x24, 0xA6, 0x46, 0x2D, 0x4C, 0xFE, 0x44, 0x20, 0x47, 0x18, 0xBD, 0x18, 0xB5, 0x40, 0x69, 0x00, 0x21, 0x00, 0x91, 0x02, 0x68, 0x83, 0x68, 0x27, 0x48, 0x01, 0x30, 0x01, 0x24, 0xA6, 0x46, 0x26, 0x4C, 0xFE, 0x44, 0x20, 0x47, 0x18, 0xBD, 0xC0, 0x46, 0x30, 0x63, 0x08, 0x00, 0x19, 0x9E, 0x00, 0x00, 0xB9, 0xEC, 0x00, 0x00, 0x74, 0x3F, 0x08, 0x00, 0x80, 0x3F, 0x08, 0x00, 0xFF, 0xFF, 0x54, 0x7A, 0x08, 0x00, 0x96, 0x00, 0x00, 0x00, 0xB7, 0x5D, 0x03, 0x00, 0x00, 0x00, 0x1B, 0x00, 0xD3, 0x8E, 0x00, 0x00, 0xF7, 0xC6, 0x00, 0x00, 0xE5, 0x90, 0x00, 0x00, 0x68, 0x64, 0x08, 0x00, 0xC0, 0x27, 0x09, 0x00, 0xA0, 0x3B ,
0x08, 0x00, 0x3D, 0x5D, 0x03, 0x00, 0x19, 0xC6, 0x00, 0x00, 0xE8, 0x3A, 0x08, 0x00, 0x81, 0x5D, 0x03, 0x00, 0xCF, 0xF6, 0x00, 0x00, 0x4B, 0x4F, 0x03, 0x00, 0x6B, 0xC0, 0x03, 0x00, 0x95, 0x1E, 0x01, 0x00, 0xDA, 0x40, 0x08, 0x00, 0xDC, 0x05, 0x00, 0x00, 0x55, 0xAA, 0x03, 0x00, 0x0D, 0x91, 0x00, 0x00, 0xD7, 0x56, 0x03, 0x00, 0x08, 0x51, 0x08, 0x00, 0x8F, 0xC6, 0x03, 0x00, 0x65, 0xB8, 0x00, 0x00, 0x09, 0xB4, 0x03, 0x00, 0x84, 0x17, 0x1B, 0x00, 0xB5, 0x86, 0x01, 0x00, 0x3D, 0x47, 0x02, 0x00, 0x73, 0x49, 0x02, 0x00, 0x5F, 0x90, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x00, 0xF7, 0xF6, 0x00, 0x00, 0xFF, 0xB5, 0x68, 0x46, 0xFF, 0xF7, 0x76, 0xFF, 0xFF, 0xBD, 0xFF, 0xB5, 0x68, 0x46, 0xFF, 0xF7, 0x5A, 0xFF, 0xFF, 0xBD, 0xFF, 0xB5, 0xFF, 0xFF, 0xEA, 0x7A, 0x08, 0x00, 0x58, 0x00, 0x00, 0x00, 0x68, 0x46, 0xFF, 0xF7, 0x99, 0xFF, 0xFF, 0xBD, 0xFF, 0xB5, 0x68, 0x46, 0xFF, 0xF7, 0x83, 0xFF, 0xFF, 0xBD, 0xFF, 0xB5 ,
0x68, 0x46, 0xFF, 0xF7, 0xB6, 0xFE, 0xFF, 0xBD, 0xFF, 0xB5, 0x68, 0x46, 0xFF, 0xF7, 0x55, 0xFC, 0xFF, 0xBD, 0xFF, 0xB5, 0x68, 0x46, 0xFF, 0xF7, 0x27, 0xFB, 0xFF, 0xBD, 0xFF, 0xB5, 0x68, 0x46, 0xFF, 0xF7, 0xDD, 0xFA, 0xFF, 0xBD, 0xFF, 0xB5, 0x68, 0x46, 0xFF, 0xF7, 0x68, 0xFE, 0xFF, 0xBD, 0xFF, 0xB5, 0x68, 0x46, 0xFF, 0xF7, 0x3D, 0xFB, 0xFF, 0xBD, 0xFF, 0xB5, 0x68, 0x46, 0xFF, 0xF7, 0xBE, 0xFD, 0xFF, 0xBD, 0x78, 0x7B, 0x08, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0xB5, 0xF8, 0xF0, 0x43, 0xFA, 0x00, 0xBD, 0x35, 0x66, 0x08, 0x00, 0x67, 0x66, 0x08, 0x00, 0x71, 0x65, 0x08, 0x00, 0x4D, 0x66, 0x08, 0x00, 0x25, 0x64, 0x08, 0x00, 0x81, 0x66, 0x08, 0x00, 0x8D, 0x66, 0x08, 0x00, 0x99, 0x66, 0x08, 0x00, 0x87, 0x67, 0x08, 0x00, 0xA7, 0x67, 0x08, 0x00, 0xD1, 0x67, 0x08, 0x00, 0x1B, 0x68, 0x08, 0x00, 0x57, 0x68, 0x08, 0x00, 0x2D, 0x69, 0x08, 0x00, 0xB1, 0x6B, 0x08, 0x00, 0xD5, 0x6B, 0x08, 0x00, 0xF9, 0x6B ,
0x08, 0x00, 0x15, 0x6C, 0x08, 0x00, 0xA1, 0x68, 0x08, 0x00, 0x59, 0x6C, 0x08, 0x00, 0xA7, 0x6D, 0x08, 0x00, 0xFF, 0x6D, 0x08, 0x00, 0x29, 0x6E, 0x08, 0x00, 0xF9, 0x6E, 0x08, 0x00, 0xD9, 0x6C, 0x08, 0x00, 0xA5, 0x6E, 0x08, 0x00, 0xCD, 0x6D, 0x08, 0x00, 0x81, 0x6F, 0x08, 0x00, 0x1D, 0x70, 0x08, 0x00, 0x31, 0x64, 0x08, 0x00, 0x39, 0x70, 0x08, 0x00, 0x3F, 0x70, 0x08, 0x00, 0x04, 0xF3, 0x1A, 0x00, 0x80, 0x00, 0x00, 0x00, 0xB2, 0x4E, 0x01, 0x00, 0x5A, 0xC1, 0x00, 0x00, 0x96, 0x1A, 0x01, 0x00, 0x22, 0x0B, 0x02, 0x00, 0x60, 0xD0, 0x01, 0x00, 0x06, 0x1A, 0x00, 0x00, 0xB8, 0xC6, 0x01, 0x00, 0xD8, 0x42, 0x03, 0x00, 0x16, 0x42, 0x03, 0x00, 0xEE, 0xDB, 0x00, 0x00, 0x62, 0xDC, 0x00, 0x00, 0xC8, 0xE1, 0x00, 0x00, 0x8A, 0x17, 0x02, 0x00, 0x38, 0xBE, 0x00, 0x00, 0x26, 0xC6, 0x00, 0x00, 0x56, 0xC2, 0x00, 0x00, 0x62, 0x12, 0x03, 0x00, 0xE4, 0xF4, 0x01, 0x00, 0x3A, 0xEC, 0x00, 0x00, 0x5E, 0x92, 0x00, 0x00 ,
0xFE, 0xE8, 0x02, 0x00, 0x18, 0x7F, 0x00, 0x00, 0x64, 0xEC, 0x01, 0x00, 0xFE, 0x44, 0x03, 0x00, 0x1C, 0x94, 0x00, 0x00, 0xA8, 0x66, 0x03, 0x00, 0x74, 0xE9, 0x02, 0x00, 0x68, 0x1E, 0x01, 0x00, 0xBC, 0xDA, 0x00, 0x00, 0xEA, 0xE1, 0x00, 0x00, 0x24, 0xE9, 0x01, 0x00, 0x70, 0x79, 0x02, 0x00, 0x00, 0x00, 0x18, 0x00, 0x96, 0x00, 0x00, 0x00, 0x00, 0x06, 0x01, 0x1C, 0xF0, 0xB5, 0x88, 0xB0, 0xCA, 0x4C, 0x03, 0x20, 0x22, 0x78, 0x63, 0x78, 0xCA, 0x4E, 0x31, 0x1C, 0x01, 0x39, 0x01, 0x25, 0xAE, 0x46, 0xC7, 0x4F, 0xFE, 0x44, 0x38, 0x47, 0xA2, 0x78, 0xE3, 0x78, 0x03, 0x20, 0x31, 0x1C, 0xAE, 0x46, 0xC3, 0x4F, 0xFE, 0x44, 0x38, 0x47, 0x03, 0x20, 0x31, 0x1C, 0x01, 0x31, 0xAE, 0x46, 0xC1, 0x4A, 0xFE, 0x44, 0x10, 0x47, 0xC1, 0x48, 0x21, 0x78, 0x01, 0x70, 0x61, 0x78, 0x41, 0x70, 0xE1, 0x78, 0xC1, 0x70, 0xA1, 0x78, 0x81, 0x70, 0xBF, 0x48, 0x04, 0x1C, 0x33, 0x3C, 0x20, 0x1C, 0x00, 0x21, 0xDC, 0x22, 0xAE, 0x46 ,
0xBA, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x84, 0x20, 0xA0, 0x70, 0x05, 0x27, 0xE7, 0x71, 0x0C, 0x26, 0x26, 0x73, 0x0D, 0x20, 0x00, 0x19, 0x98, 0xA1, 0x32, 0x1C, 0xAE, 0x46, 0xB4, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x04, 0x20, 0x60, 0x76, 0x1A, 0x20, 0x00, 0x19, 0x97, 0xA1, 0x06, 0x91, 0x04, 0x22, 0xAE, 0x46, 0xAE, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0xFF, 0xFF, 0x96, 0x00, 0x18, 0x00, 0x96, 0x00, 0x00, 0x00, 0xA7, 0x77, 0x1F, 0x34, 0x95, 0xA1, 0x07, 0x91, 0x20, 0x1C, 0x3A, 0x1C, 0xAE, 0x46, 0xA9, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0xE6, 0x71, 0x28, 0x1C, 0x60, 0x72, 0x11, 0x20, 0x20, 0x73, 0x94, 0x20, 0x60, 0x73, 0xC0, 0x25, 0x65, 0x74, 0xA6, 0x74, 0x09, 0x22, 0xE2, 0x74, 0xA3, 0x4C, 0x20, 0x1C, 0x8C, 0xA1, 0x01, 0x23, 0x9E, 0x46, 0x9F, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x07, 0x22, 0x62, 0x72, 0x9E, 0x4C, 0x0A, 0x34, 0x20, 0x1C, 0x89, 0xA1, 0x01, 0x23, 0x9E, 0x46, 0x9A, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x04, 0x20 ,
0xE0, 0x71, 0x98, 0x4C, 0x12, 0x34, 0x20, 0x1C, 0x06, 0x99, 0x04, 0x22, 0x01, 0x23, 0x9E, 0x46, 0x94, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x27, 0x71, 0x93, 0x4C, 0x17, 0x34, 0x20, 0x1C, 0x07, 0x99, 0x3A, 0x1C, 0x01, 0x23, 0x9E, 0x46, 0x8E, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0xE6, 0x71, 0x01, 0x20, 0x60, 0x72, 0x11, 0x20, 0x20, 0x73, 0x94, 0x20, 0x60, 0x73, 0x02, 0x20, 0xE0, 0x73, 0x25, 0x74, 0x66, 0x74, 0xFF, 0xFF, 0x2C, 0x01, 0x18, 0x00, 0x96, 0x00, 0x00, 0x00, 0xA5, 0x74, 0x2F, 0x27, 0xE7, 0x74, 0x10, 0x20, 0x60, 0x75, 0x80, 0x26, 0xA6, 0x75, 0x01, 0x20, 0xE0, 0x75, 0x11, 0x20, 0xA0, 0x76, 0x94, 0x20, 0xE0, 0x76, 0x24, 0x20, 0x60, 0x77, 0x0A, 0x22, 0xA2, 0x77, 0x80, 0x4C, 0x36, 0x34, 0x20, 0x1C, 0x6D, 0xA1, 0x01, 0x23, 0x9E, 0x46, 0x7C, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x18, 0x22, 0xA2, 0x72, 0x7A, 0x4C, 0x41, 0x34, 0x20, 0x1C, 0x6B, 0xA1, 0x01, 0x23, 0x9E, 0x46, 0x76, 0x4B, 0xFE, 0x44, 0x18, 0x47 ,
0x25, 0x76, 0x67, 0x76, 0x21, 0x20, 0xE0, 0x76, 0x26, 0x77, 0x01, 0x20, 0x60, 0x77, 0x72, 0x48, 0x61, 0x30, 0x11, 0x21, 0x01, 0x70, 0x94, 0x21, 0x41, 0x70, 0x04, 0x21, 0x01, 0x72, 0xD2, 0x21, 0x41, 0x72, 0xC5, 0x72, 0x1E, 0x21, 0x01, 0x73, 0x45, 0x73, 0x9E, 0x21, 0x81, 0x73, 0x01, 0x21, 0x01, 0x74, 0x46, 0x74, 0x81, 0x74, 0x11, 0x21, 0x41, 0x75, 0x94, 0x21, 0x81, 0x75, 0x04, 0x21, 0x01, 0x76, 0xAD, 0x20, 0x66, 0x49, 0x08, 0x60, 0x00, 0x24, 0x0F, 0x25, 0xFF, 0xFF, 0xC2, 0x01, 0x18, 0x00, 0x96, 0x00, 0x00, 0x00, 0x29, 0x06, 0x09, 0x0E, 0x00, 0x20, 0x6A, 0x46, 0x01, 0x23, 0x9E, 0x46, 0x62, 0x4B, 0xFE, 0x44, 0x18, 0x47, 0x6B, 0x46, 0x18, 0x88, 0x40, 0x08, 0x0E, 0xD3, 0xA0, 0x00, 0x0F, 0x21, 0xCA, 0x43, 0x69, 0x46, 0x0E, 0x88, 0x16, 0x40, 0x01, 0xAF, 0x3E, 0x52, 0x49, 0x88, 0x11, 0x40, 0x68, 0x44, 0xC1, 0x80, 0x60, 0x1C, 0x04, 0x04, 0x24, 0x0C, 0x01, 0x3D, 0x0B, 0x2D, 0xE0, 0xDA, 0x60, 0x1E ,
0x00, 0x04, 0x00, 0x0C, 0x1D, 0xD0, 0x86, 0x46, 0x01, 0x1C, 0x01, 0xAD, 0x01, 0x22, 0xAE, 0x88, 0x90, 0x00, 0xC7, 0x5A, 0xB7, 0x42, 0x0A, 0xDA, 0xBC, 0x46, 0x07, 0x1C, 0x6F, 0x44, 0x7F, 0x88, 0x68, 0x44, 0x06, 0x80, 0xEE, 0x88, 0x46, 0x80, 0x60, 0x46, 0xA8, 0x80, 0xEF, 0x80, 0x04, 0x35, 0x50, 0x1C, 0x02, 0x04, 0x12, 0x0C, 0x01, 0x39, 0xE9, 0xD1, 0x70, 0x46, 0x01, 0x38, 0x86, 0x46, 0xE2, 0xD1, 0x99, 0x88, 0x68, 0x46, 0xC0, 0x88, 0x40, 0x18, 0x00, 0x04, 0x00, 0x0C, 0x42, 0x4B, 0x18, 0x80, 0x42, 0x49, 0x08, 0x1A, 0xFF, 0xFF, 0x58, 0x02, 0x18, 0x00, 0x96, 0x00, 0x00, 0x00, 0x58, 0x80, 0x02, 0x2C, 0x1E, 0xDB, 0x65, 0x1E, 0x01, 0xAA, 0x01, 0x20, 0x01, 0x1C, 0x8C, 0x00, 0x6B, 0x46, 0xE6, 0x5A, 0x93, 0x88, 0xD4, 0x88, 0xE7, 0x18, 0xB7, 0x42, 0x0C, 0xDA, 0x06, 0x24, 0x44, 0x43, 0x38, 0x4B, 0x1B, 0x19, 0x1F, 0x80, 0x1C, 0x88, 0x34, 0x1B, 0x5C, 0x80, 0x01, 0x24, 0x1C, 0x71, 0x40, 0x1C, 0x00, 0x04 ,
0x00, 0x0C, 0x04, 0x32, 0x49, 0x1C, 0x09, 0x06, 0x09, 0x0E, 0x01, 0x3D, 0xE4, 0xD1, 0x00, 0x24, 0x31, 0x48, 0x04, 0x70, 0x31, 0x48, 0x04, 0x70, 0x31, 0x48, 0x04, 0x70, 0x31, 0x48, 0x04, 0x70, 0x01, 0x20, 0x86, 0x46, 0x30, 0x48, 0xFE, 0x44, 0x00, 0x47, 0x2F, 0x49, 0x22, 0x1C, 0x08, 0x68, 0x00, 0x28, 0x02, 0xD0, 0x01, 0x20, 0x90, 0x40, 0x04, 0x43, 0x04, 0x31, 0x01, 0x32, 0x20, 0x2A, 0xF5, 0xD3, 0x2A, 0x48, 0x04, 0x60, 0x08, 0xB0, 0xF0, 0xBD, 0x5F, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x2D, 0x69, 0x6E, 0x66, 0x6F, 0x00, 0xC0, 0x46, 0xC0, 0x5F, 0x75, 0x64, 0x70, 0x00, 0xC0, 0xFF, 0xFF, 0xEE, 0x02, 0x18, 0x00, 0x96, 0x00, 0x00, 0x00, 0x46, 0xC0, 0x6C, 0x6F, 0x63, 0x61, 0x6C, 0x00, 0xC0, 0x46, 0x5F, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x00, 0xC0, 0x46, 0x5F, 0x64, 0x6E, 0x73, 0x2D, 0x73, 0x64, 0x00, 0x64, 0x65, 0x76, 0x3D, 0x43, 0x43, 0x33, 0x30, 0x30, 0x30, 0x00, 0xC0, 0x76, 0x65 ,
0x6E, 0x64, 0x6F, 0x72, 0x3D, 0x54, 0x65, 0x78, 0x61, 0x73, 0x2D, 0x49, 0x6E, 0x73, 0x74, 0x72, 0x75, 0x6D, 0x65, 0x6E, 0x74, 0x73, 0x00, 0xC0, 0x46, 0xC0, 0x00, 0x00, 0x18, 0x00, 0xF3, 0x7E, 0x03, 0x00, 0xC6, 0x05, 0x00, 0x00, 0xDD, 0x7E, 0x03, 0x00, 0xE4, 0x62, 0x08, 0x00, 0xC9, 0xBA, 0x03, 0x00, 0x09, 0xB4, 0x03, 0x00, 0xA7, 0x64, 0x08, 0x00, 0x70, 0x64, 0x08, 0x00, 0xDD, 0x0A, 0x02, 0x00, 0x48, 0x32, 0x08, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xE8, 0x62, 0x08, 0x00, 0xE9, 0x62, 0x08, 0x00, 0xEA, 0x62, 0x08, 0x00, 0xEB, 0x62, 0x08, 0x00, 0x81, 0x03, 0x18, 0x00, 0x80, 0x7B, 0x08, 0x00, 0x84, 0xF3, 0x1A, 0x00, 0x0D, 0x49, 0x0E, 0x48, 0xFF, 0xFF, 0x84, 0x03, 0x18, 0x00, 0x6C, 0x00, 0x00, 0x00, 0x88, 0x67, 0x0E, 0x48, 0x88, 0x64, 0x0E, 0x48, 0x48, 0x64, 0x0E, 0x48, 0xC8, 0x64, 0x0E, 0x48, 0x08, 0x65, 0x11, 0x48, 0x02, 0x1C, 0x04, 0x32, 0x0C, 0x4B, 0x13, 0x60, 0x0C, 0x4B, 0x93, 0x62, 0x0C, 0x4A ,
0x8A, 0x66, 0x0D, 0x49, 0x01, 0x60, 0x0D, 0x48, 0x0E, 0x49, 0x01, 0x60, 0x0E, 0x49, 0x41, 0x60, 0xF7, 0x46, 0x1C, 0x21, 0x08, 0x00, 0x1B, 0x7B, 0x08, 0x00, 0x11, 0x7B, 0x08, 0x00, 0x07, 0x7B, 0x08, 0x00, 0x39, 0x7B, 0x08, 0x00, 0x2F, 0x7B, 0x08, 0x00, 0x25, 0x7B, 0x08, 0x00, 0xFD, 0x7A, 0x08, 0x00, 0xDF, 0x7A, 0x08, 0x00, 0x50, 0x23, 0x08, 0x00, 0xD5, 0x7A, 0x08, 0x00, 0x58, 0x26, 0x08, 0x00, 0xF3, 0x7A, 0x08, 0x00, 0xE9, 0x7A, 0x08, 0x00 };
uint16_t drv_length = 8024;
//Service Pack version P1.12.7.15.15 - FW patches
unsigned char PROGMEM fw_patch[5700] = { 0x00, 0x01, 0x00, 0x00, 0x3C, 0x16, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x14, 0x03, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x68, 0x46, 0x25, 0xF0, 0x95, 0xFB, 0xE0, 0x6B, 0xD0, 0x03, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x38, 0xFB, 0x2C, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x0A, 0xFB, 0x04, 0x15, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xB8, 0xF1, 0x90, 0x0F, 0xA4, 0x16, 0x00, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x66, 0xE0, 0x04, 0xA8, 0x35, 0x1D, 0x21, 0xF0, 0x99, 0xFC, 0x68, 0x46, 0x23, 0xF0, 0x28, 0xFB, 0x9A, 0xF8, 0x00, 0x00, 0x01, 0x28, 0x07, 0xD1, 0x28, 0x46, 0x05, 0xF0, 0xC3, 0xFE, 0x01, 0x46, 0x01, 0xAA, 0x00, 0x20, 0x21, 0xF0, 0x50, 0xF9, 0x28, 0x46, 0x05, 0xF0, 0xBB, 0xFE, 0x01, 0xA9, 0x21, 0xF0, 0x2A, 0xFA, 0xE9, 0x79, 0x4F, 0xEA, 0xE0, 0x00, 0x40, 0xB2, 0x11, 0xB1, 0x00, 0xF1, 0x06, 0x00, 0x40, 0xB2, 0xA8, 0x71, 0x1F, 0x38, 0x40, 0x00, 0xE8, 0x71, 0x30, 0x46 ,
0x01, 0xF0, 0x0D, 0xFF, 0x10, 0xF1, 0x00, 0x09, 0x4F, 0xF0, 0x00, 0x01, 0x09, 0xD0, 0x28, 0x68, 0x40, 0x0C, 0x09, 0xD3, 0xE8, 0x68, 0xC0, 0x0B, 0x03, 0xD2, 0x48, 0x46, 0xFF, 0xF7, 0xDD, 0xFE, 0x01, 0x21, 0x28, 0x68, 0x40, 0x0C, 0x0A, 0xD2, 0x38, 0x68, 0x40, 0x1C, 0x38, 0x60, 0x20, 0x68, 0x6F, 0xF3, 0x0F, 0x00, 0x20, 0x60, 0x22, 0x68, 0x38, 0x68, 0x10, 0x43, 0x20, 0x60, 0xE8, 0x68, 0xC0, 0x0B, 0x0F, 0xD3, 0xD8, 0xF8, 0x00, 0x00, 0x00, 0xF1, 0x01, 0x00, 0xC8, 0xF8, 0x00, 0x00, 0x20, 0x68, 0x6F, 0xF3, 0x1F, 0x40, 0x20, 0x60, 0xD8, 0xF8, 0x00, 0x20, 0x20, 0x68, 0x40, 0xEA, 0x02, 0x40, 0x20, 0x60, 0x49, 0xB9, 0xB9, 0xF1, 0x00, 0x0F, 0x03, 0xD1, 0x30, 0x46, 0x07, 0xF0, 0xBE, 0xF9, 0x02, 0xE0, 0x48, 0x46, 0x07, 0xF0, 0x06, 0xFA, 0x6C, 0x17, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x68, 0x46, 0x0E, 0xF0, 0x85, 0xFB, 0x00, 0x9E, 0x00, 0x2E, 0x96, 0xD1, 0x05, 0xB0, 0xBD, 0xE8, 0xF0, 0x87, 0xC0, 0x46 ,
0x9C, 0x20, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0xF0, 0x2A, 0xFE, 0x74, 0x47, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0B, 0x21, 0x21, 0xF0, 0x41, 0xFA, 0x20, 0x68, 0x18, 0x4B, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x21, 0xF0, 0x1C, 0xF9, 0x0A, 0xE0, 0x20, 0x68, 0x00, 0x68, 0x0C, 0x21, 0x40, 0xF0, 0x20, 0x00, 0x21, 0xF0, 0x14, 0xF9, 0x10, 0x57, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0xA8, 0x20, 0xF0, 0x97, 0xF9, 0x01, 0x98, 0x5C, 0x57, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0xA8, 0x20, 0xF0, 0x71, 0xF9, 0x03, 0x98, 0x00, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0xF0, 0x20, 0xF9, 0x1C, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0xF0, 0x12, 0xF9, 0x54, 0x58, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x09, 0xA8, 0x20, 0xF0, 0xF5, 0xF8, 0x04, 0xAB, 0x04, 0x62, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x79, 0x1F, 0xF0, 0x1B, 0xFD, 0x69, 0xE0, 0x60, 0x93, 0x00, 0x00, 0x40, 0x00 ,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0xA6, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x78, 0x1B, 0xF0, 0x39, 0xFB, 0x28, 0x46, 0x90, 0xA8, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x78, 0x1B, 0xF0, 0x69, 0xF9, 0x1E, 0x48, 0x34, 0xAD, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x09, 0x68, 0xFF, 0x29, 0x98, 0xAD, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x10, 0xD4, 0x21, 0xD4, 0xB2, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x09, 0xD0, 0x1A, 0xF0, 0x47, 0xFC, 0x20, 0x98, 0xAC, 0xC5, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x78, 0x19, 0xF0 ,
0xDB, 0xFA, 0x09, 0x49, 0x28, 0xC6, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x19, 0xF0, 0x9E, 0xFA, 0xDC, 0xD3, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0xB5, 0x18, 0xF0, 0xAB, 0xFC, 0x00, 0xF0, 0x03, 0xF8, 0x00, 0xBD, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xDF, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x17, 0xF0, 0xA8, 0xFD, 0xCC, 0xEB, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x38, 0x78, 0x17, 0xF0, 0x77, 0xF8, 0x38, 0x78, 0x16, 0xF0, 0xF0, 0xFF, 0xA8, 0xF7, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0E, 0x49, 0x09, 0x68, 0x23, 0x22, 0x41, 0x61, 0xC8, 0xF7, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x31, 0x2E, 0x31, 0x39, 0x2E, 0x33, 0x31, 0x34, 0x5F, 0x4E, 0x65, 0x77, 0x5F, 0x43, 0x43, 0x41, 0x5F, 0x61, 0x6C, 0x67, 0x6F, 0x72, 0x69, 0x74, 0x68, 0x6D, 0x00, 0xC0, 0x74, 0x56, 0x30, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xF9, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0xA8, 0x16, 0xF0, 0x79, 0xF8 ,
0x12, 0xE0, 0x38, 0xFA, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0xA8, 0x16, 0xF0, 0x03, 0xF8, 0x32, 0x20, 0x94, 0xFB, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x0C, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x05, 0xA8, 0x14, 0xF0, 0x05, 0xFF, 0x01, 0xF0, 0x10, 0x1B, 0x01, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x1E, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x13, 0xF0, 0x46, 0xBF, 0x18, 0x30, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x30, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x12, 0xF0, 0xD8, 0xFC, 0x9C, 0x31, 0x01, 0x00, 0x08, 0x00 ,
0x00, 0x00, 0x68, 0x46, 0x12, 0xF0, 0x51, 0xFC, 0xFE, 0xF7, 0xF0, 0x35, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x68, 0x46, 0x12, 0xF0, 0x27, 0xFA, 0xFE, 0xF7, 0xF0, 0x3D, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x05, 0xA9, 0x11, 0xF0, 0x27, 0xFE, 0x20, 0x6F, 0xD0, 0x62, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0F, 0xF0, 0xB8, 0xFB, 0x80, 0x7E, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0xDF, 0xF8, 0x58, 0x82, 0xE0, 0x7E, 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0D, 0xF0, 0x6A, 0xFE, 0x0B, 0xF0, 0x9A, 0xF9, 0x03, 0x20, 0xA8, 0xF5, 0x88, 0x71, 0x08, 0x60, 0xF2, 0xF7, 0x16, 0xF9, 0x7A, 0x48, 0x6B, 0x49, 0x9C, 0x7F, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x70, 0x51, 0x4D, 0xC4, 0x7F, 0x01, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x40, 0x49, 0x00, 0xF1, 0x52, 0x00, 0x3A, 0x4A, 0xA8, 0x81, 0x28, 0x83, 0xE8, 0x83, 0xE8, 0x84, 0xA8, 0x85, 0x2A, 0x60, 0x39, 0x48, 0x41, 0xF2, 0x11, 0x12, 0x2A, 0x85, 0x18, 0x90, 0x19, 0x91 ,
0x39, 0x49, 0x1A, 0x91, 0x39, 0x49, 0x1B, 0x91, 0x39, 0x49, 0x20, 0x46, 0xDF, 0xF8, 0xC4, 0x90, 0x1C, 0x91, 0x38, 0x49, 0xDF, 0xF8, 0xC0, 0xB0, 0x31, 0x4E, 0x1D, 0x91, 0x48, 0x80, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0xF0, 0x7C, 0xFA, 0xB4, 0x80, 0x01, 0x00, 0x34, 0x00, 0x00, 0x00, 0x34, 0x12, 0x66, 0x09, 0x84, 0x6B, 0x00, 0x20, 0x94, 0x70, 0x00, 0x20, 0xB4, 0x70, 0x00, 0x20, 0xC4, 0x78, 0x00, 0x20, 0x50, 0x7A, 0x00, 0x20, 0xFE, 0xFF, 0x03, 0x00, 0xA4, 0x70, 0x00, 0x20, 0xB0, 0x70, 0x00, 0x20, 0xB8, 0x70, 0x00, 0x20, 0x60, 0x55, 0x30, 0x80, 0x3C, 0x5C, 0x00, 0x20, 0x04, 0x74, 0x00, 0x20, 0xB8, 0xE4, 0x01, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x20, 0x78, 0x07, 0xF0, 0x01, 0xFC, 0x20, 0x78, 0x07, 0xF0, 0x7A, 0xFB, 0x04, 0x4D, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x2D, 0xE9, 0xF0, 0x4F, 0xAD, 0xF1, 0x8C, 0x0D, 0x04, 0x68, 0x0F, 0x30, 0x03, 0x94, 0xFE, 0xF7, 0xDB, 0xFA, 0x04, 0xF1, 0x14, 0x00 ,
0x04, 0x90, 0x21, 0x7D, 0x00, 0x20, 0x21, 0xF0, 0x73, 0x01, 0x88, 0x29, 0x08, 0xBF, 0x01, 0x20, 0x05, 0x90, 0x03, 0x98, 0x00, 0x1D, 0x06, 0x90, 0x5D, 0x48, 0x00, 0x68, 0x01, 0x28, 0x40, 0xF0, 0xFA, 0x83, 0x5B, 0x4D, 0x5C, 0x48, 0xDF, 0xF8, 0x70, 0x91, 0x29, 0x68, 0xDF, 0xF8, 0x70, 0x81, 0xDF, 0xF8, 0x74, 0xA1, 0x88, 0x42, 0x21, 0xD1, 0x10, 0x22, 0x00, 0x21, 0x48, 0x46, 0x4F, 0x46, 0xFB, 0xF7, 0xB7, 0xFE, 0x10, 0x22, 0x00, 0x21, 0x40, 0x46, 0xFB, 0xF7, 0xB2, 0xFE, 0x54, 0x49, 0x08, 0x68, 0x40, 0xF4, 0x80, 0x10, 0x08, 0x60, 0x01, 0x20, 0x51, 0x46, 0x08, 0x60, 0x00, 0x21, 0x29, 0x60, 0x39, 0x78, 0x46, 0x46, 0x00, 0x91, 0x31, 0x78, 0x41, 0xF2, 0x11, 0x13, 0x04, 0x22, 0x01, 0x91, 0x07, 0x21, 0x02, 0x90, 0x03, 0x20, 0xF3, 0xF7, 0x41, 0xFC, 0x51, 0x46, 0x07, 0x91, 0x08, 0x68, 0x56, 0x49, 0xDF, 0xF8, 0x5C, 0xB1, 0x01, 0x28, 0x08, 0x91, 0x56, 0x49, 0xDF, 0xF8, 0x48, 0xA1, 0x09, 0x91, 0x55, 0x49 ,
0x0A, 0x91, 0x44, 0x49, 0x0B, 0x91, 0x44, 0x49, 0x0C, 0x91, 0x44, 0x49, 0x0D, 0x91, 0x44, 0x49, 0x0E, 0x91, 0x44, 0x49, 0x0F, 0x91, 0x44, 0x49, 0x10, 0x91, 0x44, 0x49, 0xCC, 0x4D, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x11, 0x91, 0x44, 0x49, 0x12, 0x91, 0x44, 0x49, 0x13, 0x91, 0x44, 0x49, 0x14, 0x91, 0x44, 0x49, 0x15, 0x91, 0x44, 0x49, 0x16, 0x91, 0x9F, 0x49, 0x17, 0x91, 0x9F, 0x49, 0x18, 0x91, 0x9F, 0x49, 0x19, 0x91, 0x9F, 0x49, 0x1A, 0x91, 0x9F, 0x49, 0x1B, 0x91, 0x9F, 0x49, 0x1C, 0x91, 0x9F, 0x49, 0x1D, 0x91, 0x9F, 0x49, 0x1E, 0x91, 0x9F, 0x49, 0x1F, 0x91, 0x40, 0xF0, 0x00, 0x81, 0x04, 0x98, 0x40, 0x78, 0x00, 0xF0, 0x03, 0x01, 0x01, 0x29, 0x40, 0xF0, 0xF9, 0x80, 0x04, 0x99, 0x09, 0x78, 0x01, 0xF0, 0x0C, 0x01, 0x08, 0x29, 0x40, 0xF0, 0xF2, 0x80, 0x06, 0x99, 0x09, 0x88, 0xA1, 0xF1, 0x3C, 0x01, 0x0E, 0xB2, 0x05, 0x99, 0x11, 0xB1, 0xA6, 0xF1, 0x02, 0x06, 0x36, 0xB2, 0xC0, 0x09, 0x4F, 0xF0 ,
0x00, 0x07, 0x15, 0xD3, 0x08, 0x3E, 0x36, 0xB2, 0x03, 0x2E, 0x10, 0xD0, 0x17, 0x2E, 0x0E, 0xD0, 0x08, 0x3E, 0x36, 0xB2, 0x03, 0x2E, 0x08, 0xD0, 0x17, 0x2E, 0x06, 0xD0, 0x36, 0x1F, 0x36, 0xB2, 0x03, 0x2E, 0x14, 0xBF, 0x17, 0x2E, 0x02, 0x27, 0x02, 0xE0, 0x03, 0x27, 0x00, 0xE0, 0x01, 0x27, 0x03, 0x2E, 0x18, 0xBF, 0x17, 0x2E, 0x04, 0x9A, 0x40, 0xF0, 0xC8, 0x80, 0x0A, 0x32, 0x12, 0xF8, 0x01, 0x1B, 0x05, 0x24, 0x12, 0xF8, 0x01, 0x3B, 0x4B, 0x40, 0x64, 0x1E, 0xD9, 0xB2, 0xF9, 0xD1, 0x81, 0xEA, 0x21, 0x11, 0x03, 0x2E, 0x94, 0x4E, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x01, 0xF0, 0x0F, 0x01, 0x48, 0x46, 0x35, 0xD0, 0x43, 0x46, 0xCA, 0x5C, 0x52, 0x1C, 0xCA, 0x54, 0x0C, 0x18, 0x33, 0xE0, 0x50, 0x57, 0x02, 0x00, 0x04, 0x74, 0x00, 0x20, 0x34, 0x12, 0x66, 0x09, 0x60, 0x57, 0x02, 0x00, 0x70, 0x57, 0x02, 0x00, 0xC8, 0x48, 0x30, 0x80, 0x4C, 0x57, 0x02, 0x00, 0x88, 0x57, 0x02, 0x00, 0x80, 0x57, 0x02, 0x00 ,
0x18, 0x58, 0x02, 0x00, 0x20, 0x58, 0x02, 0x00, 0x28, 0x58, 0x02, 0x00, 0x30, 0x58, 0x02, 0x00, 0x38, 0x58, 0x02, 0x00, 0x40, 0x58, 0x02, 0x00, 0xE4, 0x58, 0x02, 0x00, 0xE2, 0x58, 0x02, 0x00, 0x14, 0x58, 0x02, 0x00, 0xEF, 0x58, 0x02, 0x00, 0xE0, 0x58, 0x02, 0x00, 0xEE, 0x58, 0x02, 0x00, 0x5C, 0x57, 0x02, 0x00, 0xE6, 0x58, 0x02, 0x00, 0xE8, 0x58, 0x02, 0x00, 0x0C, 0x18, 0x20, 0x78, 0x40, 0x1C, 0x20, 0x70, 0x20, 0x78, 0x43, 0x46, 0x03, 0xEB, 0x01, 0x08, 0x0A, 0x28, 0x76, 0xDB, 0x98, 0xF8, 0x00, 0x00, 0x0A, 0x28, 0x72, 0xDB, 0x94, 0x48, 0x00, 0x25, 0x01, 0x60, 0x04, 0x98, 0x00, 0xF1, 0x0A, 0x09, 0x40, 0x78, 0x41, 0x08, 0x24, 0xBF, 0x04, 0x99, 0x09, 0x1D, 0x04, 0xD2, 0x80, 0x08, 0x2E, 0xBF, 0x49, 0x46, 0x04, 0x99, 0x10, 0x31, 0x0B, 0x98, 0x06, 0x22, 0xFA, 0xF7, 0xB9, 0xFC, 0x0C, 0x98, 0x06, 0x22, 0x49, 0x46, 0xFA, 0xF7, 0xB4, 0xFC, 0x9B, 0x48, 0x9A, 0x49, 0x5C, 0x4F, 0x02, 0x00, 0xC8, 0x00 ,
0x00, 0x00, 0x00, 0x78, 0x08, 0x22, 0x08, 0x60, 0x58, 0x46, 0x07, 0x60, 0x0D, 0x98, 0x29, 0x46, 0xFB, 0xF7, 0xAF, 0xFD, 0x08, 0x22, 0x0E, 0x98, 0x29, 0x46, 0xFB, 0xF7, 0xAA, 0xFD, 0x08, 0x22, 0x0F, 0x98, 0x29, 0x46, 0xFB, 0xF7, 0xA5, 0xFD, 0x08, 0x22, 0x10, 0x98, 0x29, 0x46, 0xFB, 0xF7, 0xA0, 0xFD, 0x08, 0x22, 0x11, 0x98, 0x29, 0x46, 0xFB, 0xF7, 0x9B, 0xFD, 0x08, 0x22, 0x12, 0x98, 0x29, 0x46, 0xFB, 0xF7, 0x96, 0xFD, 0x07, 0x99, 0x02, 0x20, 0x08, 0x60, 0x13, 0x99, 0x28, 0x46, 0x08, 0x80, 0x08, 0x99, 0x08, 0x70, 0x14, 0x99, 0x08, 0x70, 0x15, 0x99, 0x08, 0x60, 0x16, 0x99, 0x08, 0x70, 0x17, 0x99, 0x08, 0x60, 0x18, 0x99, 0x08, 0x60, 0x19, 0x99, 0x08, 0x60, 0x09, 0x99, 0x08, 0x80, 0x0A, 0x99, 0x08, 0x80, 0x1A, 0x99, 0x08, 0x80, 0x7D, 0x49, 0x0D, 0x60, 0x1B, 0x99, 0x08, 0x70, 0x1C, 0x99, 0x08, 0x70, 0x1D, 0x99, 0x08, 0x70, 0x1E, 0x99, 0x08, 0x80, 0x1F, 0x99, 0x08, 0x80, 0x51, 0x46, 0x08, 0x80 ,
0x20, 0x78, 0x00, 0x96, 0x04, 0x22, 0x01, 0x90, 0x98, 0xF8, 0x00, 0x00, 0x41, 0xF2, 0x14, 0x13, 0x07, 0x21, 0x02, 0x90, 0x03, 0x20, 0xF3, 0xF7, 0x07, 0xFB, 0x07, 0x98, 0xA2, 0x49, 0x00, 0x68, 0x20, 0x91, 0xA2, 0x49, 0x05, 0x28, 0x21, 0x91, 0x9E, 0x49, 0x22, 0x91, 0x40, 0xF0, 0x37, 0x82, 0x04, 0x98, 0x40, 0x78, 0x24, 0x50, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x41, 0x08, 0x24, 0xBF, 0x04, 0x99, 0x09, 0x1D, 0x05, 0xD2, 0x80, 0x08, 0x27, 0xBF, 0x04, 0x99, 0x0A, 0x31, 0x04, 0x99, 0x10, 0x31, 0x0B, 0x98, 0xF8, 0xF7, 0x2D, 0xFC, 0x01, 0x28, 0x04, 0x98, 0x40, 0xF0, 0x23, 0x82, 0x40, 0x78, 0x00, 0xF0, 0x03, 0x00, 0x03, 0x28, 0x18, 0xD0, 0x02, 0x28, 0x07, 0xBF, 0x04, 0x99, 0x10, 0x31, 0x04, 0x99, 0x0A, 0x31, 0x13, 0xE0, 0x48, 0x58, 0x02, 0x00, 0x4C, 0x58, 0x02, 0x00, 0x50, 0x58, 0x02, 0x00, 0xF0, 0x58, 0x02, 0x00, 0xF2, 0x58, 0x02, 0x00, 0xF3, 0x58, 0x02, 0x00, 0xF4, 0x58, 0x02, 0x00, 0xEA, 0x58 ,
0x02, 0x00, 0xEC, 0x58, 0x02, 0x00, 0x04, 0x99, 0x18, 0x31, 0x0C, 0x98, 0xF8, 0xF7, 0x06, 0xFC, 0x04, 0x99, 0x01, 0x28, 0x40, 0xF0, 0xFC, 0x81, 0x49, 0x78, 0x01, 0xF0, 0x03, 0x01, 0x01, 0x29, 0x40, 0xF0, 0xF6, 0x81, 0x59, 0x46, 0x09, 0x68, 0x04, 0x9A, 0x8E, 0x46, 0x51, 0x46, 0xD2, 0x8A, 0x0B, 0x88, 0x12, 0x11, 0x93, 0x42, 0x00, 0xF0, 0x37, 0x82, 0x0A, 0x80, 0x06, 0x99, 0x09, 0x88, 0x3C, 0x39, 0x0B, 0xB2, 0x71, 0x46, 0x49, 0x1E, 0x09, 0xD0, 0x49, 0x1E, 0x04, 0xD0, 0x49, 0x1E, 0x08, 0xD1, 0xA3, 0xF1, 0x10, 0x03, 0x04, 0xE0, 0xA3, 0xF1, 0x14, 0x03, 0x01, 0xE0, 0xA3, 0xF1, 0x08, 0x03, 0x1B, 0xB2, 0x05, 0x98, 0x10, 0xB1, 0xA3, 0xF1, 0x02, 0x03, 0x1B, 0xB2, 0xEC, 0x50, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x00, 0xF1, 0xCE, 0x81, 0x16, 0x98, 0x40, 0xF2, 0x77, 0x51, 0x99, 0x42, 0x0B, 0x90, 0x14, 0x98, 0x05, 0x90, 0x00, 0xF0, 0xA3, 0x81, 0x08, 0x46, 0x00, 0xF1, 0x3C, 0x00, 0x98, 0x42 ,
0x05, 0x9A, 0x00, 0xF0, 0x9A, 0x81, 0xDF, 0xF8, 0x48, 0x82, 0x14, 0x78, 0x0B, 0x9A, 0xBB, 0x2C, 0x12, 0x78, 0x0C, 0x92, 0x63, 0xD1, 0xDD, 0xF8, 0x68, 0xC0, 0xBC, 0xF9, 0x00, 0x20, 0x91, 0x42, 0x18, 0xBF, 0x90, 0x42, 0x5B, 0xD1, 0x1C, 0x2B, 0x4F, 0xF0, 0x00, 0x00, 0xC0, 0xF2, 0x82, 0x81, 0x3D, 0x2B, 0x13, 0x9D, 0x80, 0xF2, 0x7E, 0x81, 0xA3, 0xF1, 0x1C, 0x01, 0x09, 0xB2, 0x29, 0x80, 0x1E, 0x9A, 0xDD, 0xF8, 0x30, 0x90, 0xB2, 0xF9, 0x00, 0x60, 0xB9, 0xF1, 0x01, 0x0F, 0x15, 0xD1, 0xDD, 0xF8, 0x24, 0x90, 0x03, 0x2E, 0x0D, 0xDA, 0xB9, 0xF9, 0x00, 0x70, 0xB9, 0x42, 0x07, 0xD0, 0x01, 0x26, 0x16, 0x80, 0x4A, 0x46, 0x0E, 0x46, 0x03, 0xE0, 0xC0, 0x46, 0x90, 0x57, 0x02, 0x00, 0x76, 0x1C, 0x16, 0x80, 0x1B, 0x9A, 0x16, 0x78, 0x1D, 0x9A, 0x16, 0x70, 0x0C, 0x9A, 0x1F, 0x9E, 0x02, 0x2A, 0x28, 0xD1, 0xB6, 0xF9, 0x00, 0x20, 0xBE, 0xF1, 0x00, 0x0F, 0x1A, 0xD0, 0x03, 0x2A, 0x35, 0x46, 0x0B, 0xDA, 0x0A, 0x9E ,
0xB6, 0xF9, 0x00, 0x70, 0xB9, 0x42, 0x04, 0xD0, 0x01, 0x22, 0x2A, 0x80, 0x0A, 0x46, 0x35, 0x46, 0x00, 0xE0, 0xB4, 0x51, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x52, 0x1C, 0x2A, 0x80, 0x1C, 0x99, 0x0A, 0x78, 0x1D, 0x99, 0x0A, 0x70, 0x0F, 0xE0, 0xC0, 0x46, 0x58, 0x57, 0x02, 0x00, 0xA6, 0x64, 0x00, 0x20, 0x54, 0x57, 0x02, 0x00, 0x28, 0x80, 0x05, 0x99, 0x08, 0x70, 0x08, 0x9A, 0x11, 0x78, 0x41, 0xF0, 0x04, 0x01, 0x11, 0x70, 0x04, 0x46, 0x45, 0x46, 0xAC, 0xF8, 0x00, 0x00, 0x28, 0x70, 0xCC, 0x2C, 0x09, 0x9A, 0x40, 0xF0, 0x00, 0x81, 0xDD, 0xF8, 0x7C, 0xC0, 0x0A, 0x99, 0x1E, 0x9F, 0x45, 0x46, 0xB1, 0xF9, 0x00, 0x60, 0xB2, 0xF9, 0x00, 0x90, 0x28, 0x78, 0xCD, 0xF8, 0x50, 0xC0, 0x16, 0x91, 0x0A, 0x97, 0x13, 0x92, 0x09, 0x95, 0x0C, 0x99, 0x01, 0x29, 0x05, 0xD1, 0x05, 0x9A, 0xB0, 0xEB, 0x49, 0x0F, 0x01, 0xD1, 0x00, 0x21, 0x11, 0x70, 0x0C, 0x99, 0x02, 0x29, 0x05, 0xD1, 0x05, 0x9A, 0xB0, 0xEB, 0x46, 0x0F ,
0x01, 0xD1, 0x00, 0x21, 0x11, 0x70, 0xB3, 0xF5, 0x14, 0x7F, 0x40, 0xF3, 0xBA, 0x80, 0x40, 0xF2, 0x51, 0x31, 0x99, 0x42, 0x08, 0x99, 0x40, 0xF3, 0xB4, 0x80, 0x09, 0x78, 0x06, 0x29, 0x00, 0xF0, 0xB0, 0x80, 0xA3, 0xF2, 0x51, 0x21, 0x0B, 0xB2, 0x4F, 0xEA, 0xE3, 0x01, 0x03, 0xEB, 0x11, 0x71, 0x4F, 0xEA, 0x21, 0x11, 0xCA, 0xB2, 0x4F, 0xEA, 0xE3, 0x01, 0x03, 0xEB, 0x11, 0x71, 0x15, 0x9D, 0x21, 0xF0, 0x0F, 0x01, 0xA3, 0xEB, 0x01, 0x03, 0x1D, 0x99, 0x2E, 0x68, 0x7C, 0x52, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x91, 0xF8, 0x00, 0xE0, 0x5F, 0xFA, 0x83, 0xF8, 0x60, 0xB1, 0x31, 0x18, 0x11, 0xF8, 0x01, 0x1C, 0x51, 0x40, 0xCB, 0xB2, 0x07, 0xE0, 0xC0, 0x46, 0x58, 0x58, 0x02, 0x00, 0x54, 0x58, 0x02, 0x00, 0xDC, 0x58, 0x02, 0x00, 0x13, 0x46, 0x19, 0x99, 0xDD, 0xF8, 0x6C, 0xA0, 0xDD, 0xF8, 0x70, 0xB0, 0xD1, 0xF8, 0x00, 0xC0, 0x00, 0xF0, 0x0F, 0x01, 0x99, 0x42, 0x22, 0xD0, 0x0A, 0x9B, 0x86, 0x45, 0x9A, 0xF8 ,
0x00, 0x10, 0xB3, 0xF9, 0x00, 0x30, 0x9B, 0xF8, 0x00, 0x50, 0x15, 0xDD, 0x37, 0x5C, 0x44, 0x1C, 0x82, 0xEA, 0x07, 0x0C, 0x04, 0xF0, 0x0F, 0x07, 0x67, 0x45, 0x0B, 0xD0, 0xA6, 0x45, 0x06, 0x44, 0x0A, 0xDD, 0x76, 0x78, 0x72, 0x40, 0x86, 0x1C, 0x06, 0xF0, 0x0F, 0x06, 0x96, 0x42, 0x03, 0xD1, 0xC0, 0x1C, 0x4D, 0xE0, 0x80, 0x1C, 0x4B, 0xE0, 0x05, 0x9E, 0x00, 0x22, 0x32, 0x70, 0x4A, 0xE0, 0x00, 0xF0, 0x1F, 0x01, 0x01, 0x22, 0x8A, 0x40, 0x17, 0x99, 0xC4, 0x10, 0x0B, 0x68, 0x24, 0xF0, 0x03, 0x01, 0x5C, 0xF8, 0x01, 0x70, 0x3A, 0x42, 0x32, 0xD1, 0x5F, 0x58, 0x3A, 0x42, 0x06, 0x44, 0x1F, 0xD0, 0x18, 0x9B, 0x37, 0x78, 0x1B, 0x68, 0xB8, 0x45, 0x04, 0xD1, 0x58, 0x58, 0x02, 0x42, 0x19, 0xD0, 0x63, 0x46, 0x15, 0xE0, 0xA1, 0x10, 0x8C, 0x00, 0x19, 0x59, 0x91, 0x43, 0x19, 0x51, 0x00, 0x90, 0x30, 0x78, 0x01, 0x90, 0x44, 0x53, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x03, 0x20, 0x06, 0x21, 0x02, 0x46, 0x4D, 0xF6 ,
0x80, 0x53, 0xF3, 0xF7, 0x63, 0xF9, 0x09, 0x99, 0x28, 0x68, 0x0E, 0x78, 0x36, 0x18, 0x06, 0xE0, 0xE3, 0x58, 0x02, 0x00, 0xA0, 0x10, 0x81, 0x00, 0x58, 0x58, 0x02, 0x43, 0x5A, 0x50, 0x86, 0xF8, 0x00, 0x80, 0x0B, 0x98, 0x00, 0x78, 0x0C, 0x90, 0x13, 0x98, 0xB0, 0xF9, 0x00, 0x90, 0x09, 0x98, 0x00, 0x78, 0x0A, 0x9A, 0x40, 0x1C, 0x9B, 0xF8, 0x00, 0x50, 0x9A, 0xF8, 0x00, 0x10, 0xB2, 0xF9, 0x00, 0x30, 0x09, 0x9A, 0xC0, 0xB2, 0x10, 0x70, 0x0C, 0x9A, 0x01, 0x2A, 0x03, 0xD1, 0x88, 0x42, 0xC8, 0xBF, 0x8A, 0xF8, 0x00, 0x00, 0x0C, 0x99, 0x02, 0x29, 0x07, 0xD1, 0xA8, 0x42, 0xC8, 0xBF, 0x8B, 0xF8, 0x00, 0x00, 0x02, 0xE0, 0x0A, 0x98, 0xB0, 0xF9, 0x00, 0x30, 0xB9, 0xF1, 0x00, 0x0F, 0x06, 0xDD, 0x03, 0x2B, 0x04, 0xD1, 0x11, 0x98, 0x01, 0x22, 0x49, 0x46, 0x00, 0xF0, 0x72, 0xFB, 0x16, 0x98, 0xB0, 0xF9, 0x00, 0x10, 0x14, 0x98, 0x00, 0x29, 0xB0, 0xF9, 0x00, 0x00, 0x05, 0xDD, 0x03, 0x28, 0x03, 0xD1, 0x12, 0x98 ,
0x02, 0x22, 0x00, 0xF0, 0x64, 0xFB, 0x05, 0x98, 0x04, 0x78, 0x0B, 0x98, 0x00, 0x78, 0x0C, 0x90, 0x08, 0x98, 0xBB, 0x2C, 0x01, 0x78, 0x02, 0xD0, 0xAA, 0x2C, 0x2F, 0xD0, 0x31, 0xE0, 0x0C, 0x98, 0x01, 0x28, 0x0B, 0xD1, 0x0D, 0x98, 0x17, 0x9A, 0x10, 0x60, 0x0C, 0x54, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x0F, 0x98, 0x18, 0x9A, 0x10, 0x60, 0x19, 0x9A, 0x11, 0x98, 0x10, 0x60, 0x47, 0x4A, 0x15, 0x98, 0x02, 0x60, 0x0C, 0x98, 0x02, 0x28, 0x0B, 0xD1, 0x0E, 0x98, 0x17, 0x9A, 0x10, 0x60, 0x10, 0x98, 0x18, 0x9A, 0x10, 0x60, 0x19, 0x9A, 0x12, 0x98, 0x10, 0x60, 0x41, 0x4A, 0x15, 0x98, 0x02, 0x60, 0xCC, 0x20, 0x0F, 0xE0, 0x08, 0x99, 0x09, 0x78, 0x0C, 0xE0, 0x02, 0x20, 0x00, 0xE0, 0x01, 0x20, 0x0B, 0x99, 0x08, 0x70, 0x1A, 0x99, 0x0B, 0x80, 0x13, 0x99, 0x00, 0x20, 0x08, 0x80, 0x08, 0x98, 0x01, 0x78, 0xBB, 0x20, 0x05, 0x9A, 0x10, 0x70, 0x06, 0x29, 0x07, 0x99, 0x11, 0xD1, 0x06, 0x20, 0x08, 0x60, 0x20, 0x98 ,
0x00, 0x25, 0x05, 0x70, 0x21, 0x98, 0x29, 0x46, 0x04, 0x22, 0xFB, 0xF7, 0x27, 0xFB, 0x01, 0x20, 0x00, 0xF0, 0x3A, 0xFA, 0x02, 0x20, 0x00, 0xF0, 0x37, 0xFA, 0x22, 0x98, 0x05, 0x60, 0x07, 0x98, 0x04, 0x99, 0x00, 0x68, 0x07, 0x28, 0x44, 0xD1, 0x09, 0x78, 0x03, 0x9C, 0x80, 0x29, 0x40, 0xD1, 0x38, 0x34, 0x21, 0x78, 0x64, 0x1C, 0x22, 0x46, 0x00, 0x29, 0x3A, 0xD1, 0x20, 0x98, 0x90, 0xF8, 0x00, 0xA0, 0x22, 0x98, 0x05, 0x90, 0xD0, 0xF8, 0x00, 0x90, 0x51, 0x46, 0x48, 0x46, 0xFD, 0xF7, 0x79, 0xF9, 0x5F, 0xFA, 0x80, 0xF8, 0x21, 0x9F, 0x15, 0x78, 0x51, 0x46, 0x48, 0x46, 0x17, 0xF8, 0x08, 0x30, 0xFD, 0xF7, 0xD4, 0x54, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x6F, 0xF9, 0x1E, 0x46, 0x1B, 0x1D, 0xC0, 0xB2, 0x38, 0x5C, 0x00, 0x1D, 0xA8, 0x42, 0x28, 0x46, 0x07, 0xDD, 0x80, 0x18, 0x82, 0x1C, 0x10, 0x78, 0x2D, 0x18, 0xAD, 0x1C, 0xAD, 0xB2, 0xAB, 0x42, 0xF7, 0xDC, 0x04, 0xF8, 0x01, 0x6B, 0x11, 0x49, 0x32, 0x46 ,
0x20, 0x46, 0x01, 0xEB, 0x48, 0x11, 0xFA, 0xF7, 0xDC, 0xF9, 0xAD, 0x1B, 0xFF, 0x20, 0x34, 0x19, 0xAD, 0x1E, 0x04, 0xF8, 0x01, 0x0B, 0x25, 0x70, 0x05, 0x98, 0x01, 0x68, 0x49, 0x1C, 0x01, 0x60, 0x07, 0x98, 0x00, 0x68, 0x07, 0x28, 0x04, 0xD0, 0x06, 0x99, 0x08, 0x68, 0x20, 0xF4, 0x80, 0x30, 0x08, 0x60, 0x23, 0xB0, 0xBD, 0xE8, 0xF0, 0x8F, 0xC0, 0x46, 0x94, 0x57, 0x02, 0x00, 0xD4, 0x57, 0x02, 0x00, 0x5C, 0x58, 0x02, 0x00, 0x6E, 0x48, 0x2D, 0xE9, 0xF0, 0x47, 0x6E, 0x4D, 0x82, 0x89, 0x4A, 0xF6, 0x55, 0x21, 0xAD, 0xF5, 0xFE, 0x7D, 0x91, 0x42, 0x4F, 0xF0, 0x00, 0x01, 0xAD, 0xF1, 0x38, 0x0D, 0x12, 0xD1, 0x29, 0x60, 0x68, 0x4A, 0x11, 0x70, 0x41, 0xF2, 0x10, 0x41, 0x81, 0x81, 0x4F, 0xF6, 0xFF, 0x70, 0x66, 0x49, 0x08, 0x60, 0x28, 0x68, 0x00, 0x90, 0x02, 0x22, 0x05, 0x21, 0x03, 0x20, 0x41, 0xF2, 0x34, 0x23, 0xF3, 0xF7, 0x48, 0xF8, 0x29, 0x68, 0x61, 0x4C, 0x01, 0x29, 0x20, 0x68, 0x40, 0xF0, 0xAF, 0x80 ,
0x5F, 0x4D, 0x02, 0x28, 0x29, 0x68, 0x23, 0xD1, 0x9C, 0x55, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x5E, 0x48, 0x00, 0x68, 0x5F, 0x4A, 0x12, 0x5C, 0x00, 0x92, 0x01, 0x91, 0x5E, 0x49, 0x09, 0x68, 0x02, 0x91, 0x5B, 0x49, 0x0B, 0x5C, 0x03, 0x20, 0x07, 0x21, 0x04, 0x22, 0xF3, 0xF7, 0x2E, 0xF8, 0x5B, 0x49, 0x4A, 0x79, 0x59, 0x48, 0x00, 0x92, 0x02, 0x79, 0x01, 0x92, 0x40, 0x79, 0x04, 0x22, 0x02, 0x90, 0x03, 0x20, 0x0B, 0x79, 0x07, 0x21, 0xF3, 0xF7, 0x20, 0xF8, 0x03, 0x20, 0x20, 0x60, 0xEC, 0xF7, 0x1A, 0xFF, 0x20, 0x68, 0x29, 0x68, 0x04, 0x28, 0x15, 0xD1, 0x0D, 0x20, 0x8D, 0xF8, 0x10, 0x00, 0x00, 0x25, 0x8D, 0xF8, 0x14, 0x50, 0x8D, 0xF8, 0x15, 0x10, 0x28, 0x46, 0x63, 0x21, 0x00, 0xF0, 0xAA, 0xFB, 0x63, 0x21, 0x28, 0x46, 0x00, 0xF0, 0xFA, 0xFA, 0x03, 0xA9, 0x04, 0xA8, 0xE0, 0xF7, 0xCA, 0xFC, 0x05, 0x20, 0x20, 0x60, 0x46, 0x4D, 0x05, 0x28, 0x29, 0x68, 0x01, 0xF1, 0x01, 0x01, 0x29, 0x60, 0x1D, 0xD1 ,
0x44, 0x4A, 0x8A, 0x42, 0x1A, 0xD1, 0x43, 0x48, 0x01, 0x68, 0x00, 0x91, 0x40, 0x68, 0x01, 0x90, 0x03, 0x20, 0x02, 0x46, 0x06, 0x21, 0x41, 0x4E, 0x33, 0x46, 0x22, 0x3B, 0xF2, 0xF7, 0xEB, 0xFF, 0x3E, 0x48, 0x01, 0x68, 0x00, 0x91, 0x40, 0x68, 0x33, 0x46, 0x06, 0x21, 0x01, 0x90, 0x03, 0x20, 0x02, 0x46, 0xF2, 0xF7, 0xE0, 0xFF, 0x00, 0x20, 0x28, 0x60, 0x20, 0x68, 0x06, 0x28, 0x47, 0xD1, 0x4F, 0xF0, 0x64, 0x56, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x07, 0x0A, 0xC4, 0xF8, 0x00, 0xA0, 0x03, 0x20, 0x48, 0xF2, 0x70, 0x53, 0x01, 0x22, 0x04, 0x21, 0xF2, 0xF7, 0xD0, 0xFF, 0xDF, 0xF8, 0xCC, 0x80, 0x31, 0x4F, 0x48, 0xF2, 0x70, 0x59, 0x01, 0x25, 0x49, 0xEA, 0x05, 0x03, 0x01, 0x22, 0x04, 0x21, 0x03, 0x20, 0xF2, 0xF7, 0xC3, 0xFF, 0x00, 0x24, 0x17, 0xF8, 0x02, 0x0F, 0x20, 0xE0, 0x69, 0x01, 0x04, 0xEB, 0x08, 0x02, 0x88, 0x18, 0xC6, 0x1C, 0x43, 0x78, 0x00, 0x93, 0x80, 0x78, 0x01, 0x90, 0x30, 0x78, 0x02, 0x90 ,
0x53, 0x5C, 0x51, 0x46, 0x04, 0x22, 0x03, 0x20, 0xF2, 0xF7, 0xAE, 0xFF, 0x38, 0x78, 0x01, 0x1B, 0xB1, 0xF1, 0xFF, 0x3F, 0x08, 0xD1, 0xF0, 0x78, 0x00, 0x90, 0xB3, 0x78, 0x03, 0x20, 0x02, 0x22, 0x05, 0x21, 0xF2, 0xF7, 0xA1, 0xFF, 0x38, 0x78, 0x24, 0x1D, 0xE4, 0xB2, 0xA0, 0x42, 0xDC, 0xDC, 0xAD, 0x1C, 0xED, 0xB2, 0x04, 0x2D, 0xCD, 0xDB, 0x63, 0x21, 0x4F, 0xF4, 0x05, 0x70, 0xF1, 0xF7, 0xA3, 0xFC, 0xE1, 0xF7, 0x85, 0xFD, 0x7F, 0xB0, 0x0E, 0xB0, 0xBD, 0xE8, 0xF0, 0x87, 0xC0, 0x46, 0x04, 0x74, 0x00, 0x20, 0x50, 0x57, 0x02, 0x00, 0x6C, 0x5D, 0x02, 0x00, 0x40, 0x00, 0x3D, 0x80, 0x4C, 0x57, 0x02, 0x00, 0x58, 0x57, 0x02, 0x00, 0x90, 0x57, 0x02, 0x00, 0x60, 0x57, 0x02, 0x00, 0x70, 0x57, 0x02, 0x00, 0x5C, 0x57, 0x02, 0x00, 0x80, 0x57, 0x02, 0x00, 0x2C, 0x57, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x88, 0x57, 0x02, 0x00, 0x54, 0x57, 0x02, 0x00, 0xFF, 0xFF, 0x03, 0x00, 0x38, 0x58, 0x02, 0x00, 0x40, 0x58 ,
0x02, 0x00, 0x66, 0x55, 0xDD, 0xEE, 0xDB, 0x58, 0x02, 0x00, 0x5C, 0x58, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF4, 0x57, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBC, 0x58, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2D, 0xE9, 0xFE, 0x4F, 0x4A, 0x4A, 0x49, 0x4D, 0x00, 0x90, 0xB2, 0xF9, 0x00, 0x20, 0x43, 0xA3, 0x29, 0x78, 0x01, 0x93, 0x43, 0xA3, 0x01, 0x28, 0x02, 0x93, 0x47, 0x4E, 0xDF, 0xF8, 0x1C, 0x81, 0xDF, 0xF8, 0x1C, 0x91, 0x1E, 0xD0, 0x43, 0x48, 0x04, 0x78, 0x48, 0x01, 0x87, 0x19, 0x30, 0x18, 0x01, 0x99, 0x06, 0x22, 0xF9, 0xF7, 0xC8, 0xFF, 0x40, 0x46, 0x01, 0x78, 0x00, 0x68, 0x07, 0xF1, 0x06, 0x07, 0x07, 0xF8, 0x01, 0x1B, 0x07, 0xF8, 0x01, 0x4B, 0x4F, 0xF0, 0x00, 0x01, 0x07, 0xF8, 0x01, 0x1B, 0x20, 0xB9, 0x39, 0x70, 0x28, 0x78, 0x4E, 0x46, 0x0A, 0x21, 0x58, 0xE0, 0xDF, 0xF8, 0xE4, 0xB0, 0x0F, 0xE0, 0xD4, 0xB2, 0x48, 0x01, 0x87, 0x19, 0x30, 0x18, 0x02, 0x99, 0x07, 0x22, 0xF9, 0xF7, 0xAA, 0xFF, 0xFF, 0x1D, 0x00, 0x20, 0xDF, 0xF8, 0xCC, 0xB0, 0x07, 0xF8, 0x01, 0x4B, 0x07, 0xF8, 0x01, 0x0B, 0x16, 0x2C, 0xB2, 0x46, 0xAE, 0xBF, 0x14, 0x20, 0x84, 0x59 ,
0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x60, 0x1E, 0xC0, 0xB2, 0x38, 0x70, 0x4E, 0x46, 0x7F, 0x1C, 0x40, 0x1C, 0xC2, 0xB2, 0x28, 0x78, 0x5B, 0x46, 0x00, 0x21, 0x32, 0x54, 0x38, 0x46, 0x00, 0xF0, 0xBC, 0xF9, 0x28, 0x78, 0x16, 0x2C, 0x31, 0x5C, 0x01, 0xF1, 0x0A, 0x01, 0x31, 0x54, 0x00, 0xF1, 0x01, 0x00, 0xC0, 0xB2, 0x28, 0x70, 0x2B, 0xDB, 0x00, 0x99, 0x0A, 0xEB, 0x40, 0x10, 0x07, 0x46, 0x01, 0x29, 0xA4, 0xF1, 0x01, 0x09, 0x09, 0xD0, 0x01, 0x99, 0x06, 0x22, 0xF9, 0xF7, 0x79, 0xFF, 0x40, 0x46, 0x00, 0x78, 0xBF, 0x1D, 0x07, 0xF8, 0x01, 0x0B, 0x04, 0xE0, 0x02, 0x99, 0x07, 0x22, 0xF9, 0xF7, 0x6F, 0xFF, 0xFF, 0x1D, 0x07, 0xF8, 0x01, 0x4B, 0x15, 0x3C, 0x15, 0x21, 0x28, 0x78, 0xE2, 0xB2, 0x5B, 0x46, 0x07, 0xF8, 0x01, 0x1B, 0x32, 0x54, 0x07, 0xF8, 0x01, 0x9B, 0x38, 0x46, 0x00, 0xF0, 0x8B, 0xF9, 0x28, 0x78, 0x31, 0x5C, 0x0A, 0x31, 0x31, 0x54, 0x40, 0x1C, 0x28, 0x70, 0xBD, 0xE8, 0xFE, 0x8F, 0xC0, 0x46 ,
0x54, 0x54, 0x54, 0x4B, 0x45, 0x59, 0x00, 0xC0, 0x54, 0x54, 0x54, 0x53, 0x53, 0x49, 0x44, 0x00, 0x54, 0x58, 0x02, 0x00, 0xE6, 0x58, 0x02, 0x00, 0xE8, 0x58, 0x02, 0x00, 0x5C, 0x58, 0x02, 0x00, 0x5C, 0x57, 0x02, 0x00, 0xDC, 0x58, 0x02, 0x00, 0xD4, 0x57, 0x02, 0x00, 0x94, 0x57, 0x02, 0x00, 0xFF, 0xB5, 0x0C, 0x46, 0x06, 0x46, 0xF7, 0xF7, 0x4C, 0x5A, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0xE3, 0xFE, 0x15, 0x49, 0x15, 0x4A, 0x0D, 0x68, 0x01, 0xA9, 0x92, 0xE8, 0x8C, 0x00, 0x81, 0xE8, 0x8C, 0x00, 0xF7, 0xF7, 0xFD, 0xFE, 0x01, 0x98, 0x11, 0x49, 0x28, 0x1A, 0x03, 0x9D, 0x25, 0x60, 0x02, 0x9A, 0x80, 0x18, 0x82, 0x42, 0x30, 0x60, 0x0E, 0xD8, 0x08, 0x46, 0x00, 0x68, 0x22, 0x68, 0x82, 0x42, 0x0E, 0xD2, 0x68, 0x46, 0xE8, 0xF7, 0xB9, 0xFF, 0x9D, 0xF8, 0x00, 0x00, 0x05, 0xF1, 0x01, 0x05, 0x30, 0xB9, 0x03, 0x95, 0x03, 0xE0, 0x25, 0x68, 0x6D, 0x1C, 0x25, 0x60, 0x0C, 0x46, 0x25, 0x60, 0x00, 0x20, 0x00, 0x90 ,
0xFF, 0xBD, 0x60, 0x55, 0x30, 0x80, 0x24, 0x5D, 0x00, 0x20, 0x6C, 0x5D, 0x02, 0x00, 0x70, 0xB5, 0x4D, 0x00, 0x20, 0x2D, 0x4F, 0xF0, 0x00, 0x01, 0x0C, 0x46, 0x4F, 0xEA, 0x55, 0x13, 0x09, 0xD3, 0x50, 0xF8, 0x21, 0x60, 0xB6, 0xF1, 0xFF, 0x3F, 0x04, 0xD1, 0x49, 0x1C, 0xC9, 0xB2, 0x20, 0x3D, 0x5B, 0x1E, 0xF5, 0xD1, 0x4D, 0xB1, 0x20, 0x2D, 0x09, 0xD2, 0x01, 0x23, 0xAB, 0x40, 0x5B, 0x1E, 0x50, 0xF8, 0x21, 0x00, 0x18, 0x40, 0x83, 0x42, 0x01, 0xD1, 0x4F, 0xF0, 0x01, 0x04, 0x07, 0x48, 0x03, 0x78, 0x2C, 0xB9, 0x01, 0x21, 0x91, 0x40, 0xC9, 0x43, 0xC9, 0xB2, 0x0B, 0x40, 0x03, 0xE0, 0x01, 0x21, 0x91, 0x40, 0xC9, 0xB2, 0x0B, 0x43, 0x03, 0x70, 0x70, 0xBD, 0xC0, 0x46, 0xEE, 0x58, 0x02, 0x00, 0x14, 0x5B, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x7E, 0xB5, 0x05, 0x46, 0x95, 0xF8, 0x36, 0x20, 0x0E, 0x46, 0x0F, 0x49, 0x07, 0x2A, 0x12, 0xBF, 0x08, 0x68, 0x01, 0x20, 0x08, 0x60, 0x0D, 0x4C, 0x00, 0x92, 0x21, 0x68 ,
0x41, 0xF2, 0x12, 0x13, 0x04, 0x22, 0x01, 0x91, 0x07, 0x21, 0x02, 0x90, 0x03, 0x20, 0xF2, 0xF7, 0x6B, 0xFD, 0x31, 0x46, 0x28, 0x46, 0xE7, 0xF7, 0x21, 0xFC, 0x21, 0x68, 0x00, 0x22, 0x05, 0x29, 0x02, 0xD1, 0x04, 0x49, 0x08, 0x31, 0x0A, 0x60, 0x7E, 0xBD, 0xC0, 0x46, 0x50, 0x57, 0x02, 0x00, 0x4C, 0x57, 0x02, 0x00, 0x00, 0x7C, 0x00, 0x20, 0x0E, 0x49, 0x09, 0x68, 0x49, 0x08, 0x15, 0xD2, 0x0D, 0x49, 0x09, 0x78, 0x91, 0xB1, 0x44, 0xF2, 0xE9, 0x21, 0x68, 0xB9, 0x0B, 0x48, 0x01, 0x78, 0x07, 0x48, 0x01, 0x29, 0x03, 0xD1, 0x0A, 0x49, 0x09, 0x78, 0x0E, 0x29, 0x02, 0xD0, 0x44, 0xF2, 0xDE, 0x21, 0x41, 0x60, 0x01, 0x21, 0x00, 0xE0, 0x06, 0x48, 0x01, 0x60, 0x70, 0x47, 0xC0, 0x46, 0x00, 0x97, 0x3C, 0x80, 0x10, 0x0C, 0x30, 0x80, 0xDD, 0x6A, 0x00, 0x20, 0xE0, 0x7C, 0x00, 0x20, 0xA6, 0x64, 0x00, 0x20, 0x04, 0x97, 0x3C, 0x80, 0x00, 0xB5, 0xAD, 0xF1, 0x18, 0x0D, 0x4F, 0xF0, 0x09, 0x00, 0x00, 0x90, 0x4F, 0xF4 ,
0x0C, 0x60, 0x03, 0x90, 0x4F, 0xF0, 0x00, 0x00, 0x01, 0x90, 0x02, 0x90, 0x08, 0x48, 0x08, 0x49, 0x05, 0x90, 0x08, 0x68, 0x20, 0xB9, 0xDC, 0x5B, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x68, 0x46, 0x03, 0x22, 0xED, 0xF7, 0x3A, 0xFA, 0x03, 0xE0, 0x68, 0x46, 0x03, 0x22, 0xED, 0xF7, 0xC1, 0xFC, 0x06, 0xB0, 0x00, 0xBD, 0xC0, 0x46, 0x81, 0x5C, 0x02, 0x00, 0xDC, 0x7C, 0x00, 0x20, 0x1C, 0xB5, 0x0F, 0x4C, 0x22, 0x68, 0x01, 0x2A, 0x15, 0xD1, 0x0C, 0x48, 0x00, 0x68, 0x07, 0x28, 0x14, 0xBF, 0x40, 0x20, 0x4F, 0xF4, 0x05, 0x70, 0x63, 0x21, 0xF1, 0xF7, 0x0F, 0xFA, 0x20, 0x68, 0x00, 0x90, 0x43, 0xF2, 0x33, 0x33, 0x06, 0x21, 0x40, 0x20, 0x01, 0x90, 0x03, 0x20, 0x02, 0x46, 0xF2, 0xF7, 0xF4, 0xFC, 0x1C, 0xBD, 0xF1, 0xF7, 0x01, 0xFA, 0x1C, 0xBD, 0x4C, 0x57, 0x02, 0x00, 0x50, 0x57, 0x02, 0x00, 0x1E, 0xB5, 0x04, 0x46, 0x0A, 0x49, 0x00, 0x20, 0x0A, 0x4A, 0x08, 0x60, 0x0A, 0x49, 0x00, 0x90, 0x01, 0x90, 0x11, 0x60 ,
0x09, 0x4A, 0x45, 0xF2, 0x55, 0x53, 0x02, 0x91, 0x10, 0x60, 0x07, 0x21, 0x04, 0x22, 0x03, 0x20, 0xF2, 0xF7, 0xD8, 0xFC, 0x20, 0x46, 0xE7, 0xF7, 0x59, 0xFD, 0x1E, 0xBD, 0x50, 0x57, 0x02, 0x00, 0x04, 0x74, 0x00, 0x20, 0x34, 0x12, 0x66, 0x09, 0x4C, 0x57, 0x02, 0x00, 0x00, 0xB5, 0x0B, 0x49, 0x00, 0x20, 0x08, 0x60, 0xE0, 0x20, 0xF7, 0xF7, 0xAA, 0xFD, 0x09, 0x49, 0x09, 0x78, 0x49, 0xB1, 0x08, 0x49, 0x0A, 0x78, 0x08, 0x49, 0x00, 0x2A, 0x06, 0xBF, 0x01, 0x22, 0x09, 0x1F, 0x44, 0xF2, 0xA4, 0x5C, 0x02, 0x00, 0xC8, 0x00, 0x00, 0x00, 0xE9, 0x22, 0x0A, 0x60, 0xF7, 0xF7, 0xA1, 0xFD, 0x00, 0xBD, 0xC0, 0x46, 0xDC, 0x7C, 0x00, 0x20, 0xDD, 0x6A, 0x00, 0x20, 0xA7, 0x64, 0x00, 0x20, 0x04, 0x97, 0x3C, 0x80, 0x50, 0xB9, 0x09, 0x48, 0x00, 0x78, 0x01, 0x28, 0x06, 0xD1, 0x08, 0x48, 0x00, 0x78, 0x0E, 0x28, 0x08, 0xBF, 0x44, 0xF2, 0xCB, 0x20, 0x01, 0xD0, 0x44, 0xF2, 0xDE, 0x20, 0x04, 0x49, 0x08, 0x60, 0x01, 0x20 ,
0x41, 0xF8, 0x04, 0x0C, 0x70, 0x47, 0xE0, 0x7C, 0x00, 0x20, 0xA6, 0x64, 0x00, 0x20, 0x04, 0x97, 0x3C, 0x80, 0x30, 0xB5, 0x0D, 0x46, 0x84, 0x69, 0xDC, 0xF7, 0x97, 0xFB, 0x24, 0x1D, 0x01, 0x28, 0x04, 0xEB, 0x45, 0x01, 0x06, 0xD1, 0x89, 0x8E, 0x04, 0xEB, 0x85, 0x04, 0x11, 0xB9, 0x21, 0x69, 0x01, 0xB9, 0x00, 0x20, 0x30, 0xBD, 0x30, 0xB5, 0x05, 0x46, 0x5A, 0xB1, 0x03, 0xEB, 0x41, 0x03, 0x1C, 0x78, 0x59, 0x78, 0x41, 0xEA, 0x04, 0x11, 0x52, 0x1E, 0x03, 0xF1, 0x02, 0x03, 0x05, 0xF8, 0x01, 0x1B, 0xF5, 0xD1, 0x30, 0xBD, 0x00, 0xB5, 0x00, 0x20, 0xE7, 0xF7, 0xD6, 0xFE, 0x03, 0x48, 0x01, 0x68, 0x03, 0x29, 0x04, 0xBF, 0x04, 0x21, 0x01, 0x60, 0x00, 0xBD, 0xC0, 0x46, 0x4C, 0x57, 0x02, 0x00, 0x03, 0x4A, 0x12, 0x68, 0x01, 0x2A, 0x04, 0xBF, 0x02, 0x48, 0x63, 0x21, 0xF1, 0xF7, 0x76, 0xB9, 0x50, 0x57, 0x02, 0x00, 0x02, 0x20, 0x01, 0x00, 0x6C, 0x5D, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
uint16_t fw_length = 5700;

View File

@ -1,217 +0,0 @@
/***************************************************
This is an example for the Adafruit CC3000 Wifi Breakout & Shield
Designed specifically to work with the Adafruit WiFi products:
----> https://www.adafruit.com/products/1469
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
Written by Kevin Townsend & Limor Fried & Rick Lesniak for Adafruit Industries.
BSD license, all text above must be included in any redistribution
****************************************************/
/*
This example does a test of the SNTP (Simple Network Time Protocol) client:
* Initialization
* SSID Scan
* AP connection
* DHCP printout
* SNTP time synchronization
* Extract and print current time and date information
*/
#include <Adafruit_CC3000.h>
#include <ccspi.h>
#include <SPI.h>
//#include "utility/NetTime.h"
#include <string.h>
#include "utility/debug.h"
#include "utility/sntp.h"
// These are the interrupt and control pins
#define ADAFRUIT_CC3000_IRQ 3 // MUST be an interrupt pin!
// These can be any two pins
#define ADAFRUIT_CC3000_VBAT 5
#define ADAFRUIT_CC3000_CS 10
// Use hardware SPI for the remaining pins
// On an UNO, SCK = 13, MISO = 12, and MOSI = 11
Adafruit_CC3000 cc3000 = Adafruit_CC3000(ADAFRUIT_CC3000_CS, ADAFRUIT_CC3000_IRQ, ADAFRUIT_CC3000_VBAT,
SPI_CLOCK_DIVIDER); // you can change this clock speed but DI
#define WLAN_SSID "myNetwork" // cannot be longer than 32 characters!
#define WLAN_PASS "myPassword"
// Security can be WLAN_SEC_UNSEC, WLAN_SEC_WEP, WLAN_SEC_WPA or WLAN_SEC_WPA2
#define WLAN_SECURITY WLAN_SEC_WPA2
//Arguments to SNTP client constructor:
// 1 - Primary Network Time Server URL (can be NULL)
// 2 - Secondary Network Time Server URL (also can be NULL)
// 3 - Local UTC offset in minutes (US Eastern Time is UTC - 5:00
// 4 - Local UTC offset in minutes for Daylight Savings Time (US Eastern DST is UTC - 4:00
// 5 - Enable Daylight Savings Time adjustment (not implemented yet)
//
sntp mysntp = sntp(NULL, "time.nist.gov", (short)(-5 * 60), (short)(-4 * 60), true);
// Type SNTP_Timestamp is 64-bit NTP time. High-order 32-bits is seconds since 1/1/1900
// Low order 32-bits is fractional seconds
SNTP_Timestamp_t now;
// Type NetTime_t contains NTP time broken out to human-oriented values:
// uint16_t millis; ///< Milliseconds after the second (0..999)
// uint8_t sec; ///< Seconds after the minute (0..59)
// uint8_t min; ///< Minutes after the hour (0..59)
// uint8_t hour; ///< Hours since midnight (0..23)
// uint8_t mday; ///< Day of the month (1..31)
// uint8_t mon; ///< Months since January (0..11)
// uint16_t year; ///< Year.
// uint8_t wday; ///< Days since Sunday (0..6)
// uint8_t yday; ///< Days since January 1 (0..365)
// bool isdst; ///< Daylight savings time flag, currently not supported
NetTime_t timeExtract;
#define pF(string_pointer) (reinterpret_cast<const __FlashStringHelper *>(pgm_read_word(string_pointer)))
const prog_char janStr[] PROGMEM = "January";
const prog_char febStr[] PROGMEM = "February";
const prog_char marStr[] PROGMEM = "March";
const prog_char aprStr[] PROGMEM = "April";
const prog_char mayStr[] PROGMEM = "May";
const prog_char junStr[] PROGMEM = "June";
const prog_char julStr[] PROGMEM = "July";
const prog_char augStr[] PROGMEM = "August";
const prog_char sepStr[] PROGMEM = "September";
const prog_char octStr[] PROGMEM = "October";
const prog_char novStr[] PROGMEM = "November";
const prog_char decStr[] PROGMEM = "December";
PROGMEM const char* const monthStrs[] = { janStr, febStr, marStr, aprStr, mayStr, junStr,
julStr, augStr, sepStr, octStr, novStr, decStr};
const prog_char sunStr[] PROGMEM = "Sunday";
const prog_char monStr[] PROGMEM = "Monday";
const prog_char tueStr[] PROGMEM = "Tuesday";
const prog_char wedStr[] PROGMEM = "Wednesday";
const prog_char thuStr[] PROGMEM = "Thursday";
const prog_char friStr[] PROGMEM = "Friday";
const prog_char satStr[] PROGMEM = "Saturday";
PROGMEM const char* const dayStrs[] = { sunStr, monStr, tueStr, wedStr,
thuStr, friStr, satStr};
/**************************************************************************/
/*!
@brief Sets up the HW and the CC3000 module (called automatically
on startup)
*/
/**************************************************************************/
void setup(void)
{
Serial.begin(115200);
Serial.println(F("Hello, CC3000!\n"));
Serial.print("Free RAM: "); Serial.println(getFreeRam(), DEC);
/* Initialise the module */
Serial.println(F("\nInitialising the CC3000 ..."));
if (!cc3000.begin())
{
Serial.println(F("Unable to initialise the CC3000! Check your wiring?"));
while(1);
}
/* Optional: Update the Mac Address to a known value */
/*
uint8_t macAddress[6] = { 0x08, 0x00, 0x28, 0x01, 0x79, 0xB7 };
if (!cc3000.setMacAddress(macAddress))
{
Serial.println(F("Failed trying to update the MAC address"));
while(1);
}
*/
uint16_t firmware = checkFirmwareVersion();
if (firmware < 0x113) {
Serial.println(F("Wrong firmware version!"));
for(;;);
}
/* Delete any old connection data on the module */
Serial.println(F("\nDeleting old connection profiles"));
if (!cc3000.deleteProfiles()) {
Serial.println(F("Failed!"));
while(1);
}
/* Attempt to connect to an access point */
char *ssid = WLAN_SSID; /* Max 32 chars */
Serial.print(F("\nAttempting to connect to ")); Serial.println(ssid);
/* NOTE: Secure connections are not available in 'Tiny' mode! */
if (!cc3000.connectToAP(WLAN_SSID, WLAN_PASS, WLAN_SECURITY)) {
Serial.println(F("Failed!"));
while(1);
}
Serial.println(F("Connected!"));
/* Wait for DHCP to complete */
Serial.println(F("Request DHCP"));
while (!cc3000.checkDHCP())
{
delay(100); // ToDo: Insert a DHCP timeout!
}
Serial.println(F("UpdateNTPTime"));
mysntp.UpdateNTPTime();
Serial.println(F("Current local time is:"));
mysntp.ExtractNTPTime(mysntp.NTPGetTime(&now, true), &timeExtract);
Serial.print(timeExtract.hour); Serial.print(F(":")); Serial.print(timeExtract.min); Serial.print(F(":"));Serial.print(timeExtract.sec); Serial.print(F("."));Serial.println(timeExtract.millis);
Serial.print(pF(&dayStrs[timeExtract.wday])); Serial.print(F(", ")); Serial.print(pF(&monthStrs[timeExtract.mon])); Serial.print(F(" ")); Serial.print(timeExtract.mday); Serial.print(F(", "));Serial.println(timeExtract.year);
Serial.print(F("Day of year: ")); Serial.println(timeExtract.yday + 1);
/* You need to make sure to clean up after yourself or the CC3000 can freak out */
/* the next time you try to connect ... */
Serial.println(F("\n\nClosing the connection"));
cc3000.disconnect();
}
void loop(void)
{
delay(1000);
}
/**************************************************************************/
/*!
@brief Tries to read the CC3000's internal firmware patch ID
*/
/**************************************************************************/
uint16_t checkFirmwareVersion(void)
{
uint8_t major, minor;
uint16_t version;
#ifndef CC3000_TINY_DRIVER
if(!cc3000.getFirmwareVersion(&major, &minor))
{
Serial.println(F("Unable to retrieve the firmware version!\r\n"));
version = 0;
}
else
{
Serial.print(F("Firmware V. : "));
Serial.print(major); Serial.print(F(".")); Serial.println(minor);
version = major; version <<= 8; version |= minor;
}
#endif
return version;
}

View File

@ -1,20 +0,0 @@
=====
Copyright (c) 2013-2014
Limor Fried, Kevin Townsend for Adafruit Industries & Tony DiCola (tony@tonydicola.com)
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
All rights reserved.
=====
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -1,199 +0,0 @@
/***************************************************
Client_fastrprint test
Designed specifically to work with the Adafruit WiFi products:
----> https://www.adafruit.com/products/1469
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
Written by Tony DiCola, based on code example code written by
Limor Fried & Kevin Townsend for Adafruit Industries.
BSD license, all text above must be included in any redistribution
****************************************************/
#include <Adafruit_CC3000.h>
#include <ccspi.h>
#include <SPI.h>
#include <string.h>
#include "utility/debug.h"
// These are the interrupt and control pins
#define ADAFRUIT_CC3000_IRQ 3 // MUST be an interrupt pin!
// These can be any two pins
#define ADAFRUIT_CC3000_VBAT 5
#define ADAFRUIT_CC3000_CS 10
// Use hardware SPI for the remaining pins
// On an UNO, SCK = 13, MISO = 12, and MOSI = 11
Adafruit_CC3000 cc3000 = Adafruit_CC3000(ADAFRUIT_CC3000_CS, ADAFRUIT_CC3000_IRQ, ADAFRUIT_CC3000_VBAT,
SPI_CLOCK_DIV2); // you can change this clock speed
#define WLAN_SSID "myNetwork" // cannot be longer than 32 characters!
#define WLAN_PASS "myPassword"
// Security can be WLAN_SEC_UNSEC, WLAN_SEC_WEP, WLAN_SEC_WPA or WLAN_SEC_WPA2
#define WLAN_SECURITY WLAN_SEC_WPA2
// Test server configuration
const uint8_t SERVER_IP[4] = { 192, 168, 1, 101 };
const uint16_t SERVER_PORT = 9000;
#define ASSERT_EQ(expected, actual) { \
if (actual != expected) { \
Serial.print("FAILURE: Expected "); \
Serial.print(actual); \
Serial.print(" to equal "); \
Serial.println(expected); \
} \
}
#define TEST_FASTRPRINT(message, client) { \
Serial.print("Testing fastrprint with char* input: "); \
Serial.println(message); \
unsigned long n = client.fastrprint(message); \
ASSERT_EQ(sizeof(message)-1, n); \
}
#define TEST_FASTRPRINTLN(message, client) { \
Serial.print("Testing fastrprintln with char* input: "); \
Serial.println(message); \
unsigned long n = client.fastrprintln(message); \
ASSERT_EQ(sizeof(message)+1, n); \
}
#define TEST_FASTRPRINT_F(message, client) { \
Serial.print("Testing fastrprint with flash string input: "); \
Serial.println(F(message)); \
unsigned long n = client.fastrprint(F(message)); \
ASSERT_EQ(sizeof(message)-1, n); \
}
#define TEST_FASTRPRINTLN_F(message, client) { \
Serial.print("Testing fastrprintln with flash string input: "); \
Serial.println(F(message)); \
unsigned long n = client.fastrprintln(F(message)); \
ASSERT_EQ(sizeof(message)+1, n); \
}
// Run the test
void runTest(void) {
// Make two connections to the server running listener.py
Serial.println(F("Connecting to server..."));
Adafruit_CC3000_Client client1 = cc3000.connectTCP(cc3000.IP2U32(SERVER_IP[0], SERVER_IP[1], SERVER_IP[2], SERVER_IP[3]),
SERVER_PORT);
if (!client1.connected()) {
Serial.println(F("Couldn't connect to server! Make sure listener.py is running on the server."));
while(1);
}
Adafruit_CC3000_Client client2 = cc3000.connectTCP(cc3000.IP2U32(SERVER_IP[0], SERVER_IP[1], SERVER_IP[2], SERVER_IP[3]),
SERVER_PORT);
if (!client2.connected()) {
Serial.println(F("Couldn't connect to server! Make sure listener.py is running on the server."));
while(1);
}
Serial.println(F("Connected!"));
// Start the test
Serial.print(F("Free RAM: ")); Serial.println(getFreeRam(), DEC);
Serial.println(F("Starting tests..."));
unsigned long start = millis();
// Test character strings
TEST_FASTRPRINT("Fastrprint string.", client1);
TEST_FASTRPRINT("Fastrprint with a large (>32 character) character string!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", client1);
TEST_FASTRPRINTLN("Fastrprintln string.", client1);
TEST_FASTRPRINTLN("Fastrprintln with a large (>32 character) character string!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", client1);
// Test flash strings
TEST_FASTRPRINT_F("Fastrprint flash.", client1);
TEST_FASTRPRINT_F("Fastrprint with a large (>32 character) flash string!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", client1);
TEST_FASTRPRINTLN_F("Fastrprintln flash.", client1);
TEST_FASTRPRINTLN_F("Fastrprintln with a large (>32 character) flash string!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", client1);
// Test empty strings
TEST_FASTRPRINT("", client1);
TEST_FASTRPRINTLN("", client1);
TEST_FASTRPRINT_F("", client1);
TEST_FASTRPRINTLN_F("", client1);
// Test printing to multiple clients
TEST_FASTRPRINT("This is a message for client 1.", client1);
TEST_FASTRPRINT("This is a message for client 2.", client2);
TEST_FASTRPRINT_F("This is a flash message for client 1.", client1);
TEST_FASTRPRINT_F("This is a flash message for client 2.", client2);
TEST_FASTRPRINT_F("This is a large (>32 character) flash message for client 1!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", client1);
TEST_FASTRPRINT_F("This is a large (>32 character) flash message for client 2!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", client2);
unsigned long finish = millis();
Serial.println(F("Tests finished!"));
Serial.print(F("Free RAM: ")); Serial.println(getFreeRam(), DEC);
Serial.print(F("Time taken to run test (MS): ")); Serial.println(finish - start, DEC);
client1.close();
client2.close();
cc3000.disconnect();
}
// Set up the HW and the CC3000 module (called automatically on startup)
void setup(void)
{
Serial.begin(115200);
Serial.println(F("Hello, CC3000!\n"));
/* Initialise the module */
Serial.println(F("\nInitializing..."));
if (!cc3000.begin())
{
Serial.println(F("Couldn't begin()! Check your wiring?"));
while(1);
}
if (!cc3000.connectToAP(WLAN_SSID, WLAN_PASS, WLAN_SECURITY)) {
Serial.println(F("Failed!"));
while(1);
}
Serial.println(F("Connected!"));
/* Wait for DHCP to complete */
Serial.println(F("Request DHCP"));
while (!cc3000.checkDHCP())
{
delay(100); // ToDo: Insert a DHCP timeout!
}
/* Display the IP address DNS, Gateway, etc. */
while (! displayConnectionDetails()) {
delay(1000);
}
runTest();
}
void loop(void)
{
delay(1000);
}
// Tries to read the IP address and other connection details
bool displayConnectionDetails(void)
{
uint32_t ipAddress, netmask, gateway, dhcpserv, dnsserv;
if(!cc3000.getIPAddress(&ipAddress, &netmask, &gateway, &dhcpserv, &dnsserv))
{
Serial.println(F("Unable to retrieve the IP Address!\r\n"));
return false;
}
else
{
Serial.print(F("\nIP Addr: ")); cc3000.printIPdotsRev(ipAddress);
Serial.print(F("\nNetmask: ")); cc3000.printIPdotsRev(netmask);
Serial.print(F("\nGateway: ")); cc3000.printIPdotsRev(gateway);
Serial.print(F("\nDHCPsrv: ")); cc3000.printIPdotsRev(dhcpserv);
Serial.print(F("\nDNSserv: ")); cc3000.printIPdotsRev(dnsserv);
Serial.println();
return true;
}
}

View File

@ -1,27 +0,0 @@
Adafruit CC3000 Library Tests
=============================
This folder is meant to contain tests that are written to verify the CC3000 library. Consumers
of the library probably want to ignore the contents of this folder.
Files:
------
- listener.py
Python script to run a TCP socket server which listens by default on port 9000 (but can be
changed by specifying a different port in the first command line parameter), accepts any
connections and echos all received data to standard output. This is required for running some
of the tests. In general you'll want to run listener.py with stdout directed to a file and then
run the test sketch on the CC3000 to capture what is output. Compare the output of test runs
before and after making a change/bugfix to the library and diff the results to ensure no
unexpected changes in functionality.
Tests:
------
- Client\_fastrprint
Manual test to verify the fastrprint and fastrprintln functions of the client library. Must
update the sketch to connect to your wireless network and set the SERVER_IP value to the IP
of a server running listener.py.

View File

@ -1,45 +0,0 @@
# Adafruit CC3000 Library Test Listener
# Created by Tony DiCola (tony@tonydicola.com)
# Released with the same license as the Adafruit CC3000 library (BSD)
# Create a simple server to listen by default on port 9000 (or on the port specified in
# the first command line parameter), accept any connections and print all data received
# to standard output. Must be terminated by hitting ctrl-c to kill the process!
from socket import *
import sys
import threading
SERVER_PORT = 9000
if len(sys.argv) > 1:
SERVER_PORT = sys.argv[1]
# Create listening socket
server = socket(AF_INET, SOCK_STREAM)
# Ignore waiting for the socket to close if it's already open. See the python socket
# doc for more info (very bottom of http://docs.python.org/2/library/socket.html).
server.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1)
# Listen on any network interface for the specified port
server.bind(('', SERVER_PORT))
server.listen(5)
# Worker process to print all data received to standard output.
def process_connection(client):
while True:
data = client.recv(1024)
sys.stdout.write(data) # Don't use print because it appends spaces and newlines
sys.stdout.flush()
if not data:
break
client.close()
try:
# Wait for connections and spawn worker threads to process them.
while True:
client, address = server.accept()
thread = threading.Thread(target=process_connection, args=(client,))
thread.start()
except:
server.close()

View File

@ -1,195 +0,0 @@
/*****************************************************************************
*
* cc3000_common.c.c - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
*
* Adapted for use with the Arduino/AVR by KTOWN (Kevin Townsend)
* & Limor Fried for Adafruit Industries
* This library works with the Adafruit CC3000 breakout
* ----> https://www.adafruit.com/products/1469
* Adafruit invests time and resources providing this open source code,
* please support Adafruit and open-source hardware by purchasing
* products from Adafruit!
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the
* distribution.
*
* Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*****************************************************************************/
//*****************************************************************************
//
//! \addtogroup common_api
//! @{
//
//*****************************************************************************
/******************************************************************************
*
* Include files
*
*****************************************************************************/
#include "cc3000_common.h"
#include "socket.h"
#include "wlan.h"
#include "evnt_handler.h"
#include "debug.h"
#include <Arduino.h>
//*****************************************************************************
//
//! __error__
//!
//! @param pcFilename - file name, where error occurred
//! @param ulLine - line number, where error occurred
//!
//! @return none
//!
//! @brief stub function for ASSERT macro
//
//*****************************************************************************
void
__error__(char *pcFilename, unsigned long ulLine)
{
//TODO full up function
}
//*****************************************************************************
//
//! UINT32_TO_STREAM_f
//!
//! @param p pointer to the new stream
//! @param u32 pointer to the 32 bit
//!
//! @return pointer to the new stream
//!
//! @brief This function is used for copying 32 bit to stream
//! while converting to little endian format.
//
//*****************************************************************************
uint8_t* UINT32_TO_STREAM_f (uint8_t *p, uint32_t u32)
{
*(p)++ = (uint8_t)(u32);
*(p)++ = (uint8_t)((u32) >> 8);
*(p)++ = (uint8_t)((u32) >> 16);
*(p)++ = (uint8_t)((u32) >> 24);
return p;
}
//*****************************************************************************
//
//! UINT16_TO_STREAM_f
//!
//! @param p pointer to the new stream
//! @param u32 pointer to the 16 bit
//!
//! @return pointer to the new stream
//!
//! @brief This function is used for copying 16 bit to stream
//! while converting to little endian format.
//
//*****************************************************************************
uint8_t* UINT16_TO_STREAM_f (uint8_t *p, uint16_t u16)
{
*(p)++ = (uint8_t)(u16);
*(p)++ = (uint8_t)((u16) >> 8);
return p;
}
//*****************************************************************************
//
//! STREAM_TO_UINT16_f
//!
//! @param p pointer to the stream
//! @param offset offset in the stream
//!
//! @return pointer to the new 16 bit
//!
//! @brief This function is used for copying received stream to
//! 16 bit in little endian format.
//
//*****************************************************************************
uint16_t STREAM_TO_UINT16_f(char* cp, uint16_t offset)
{
uint8_t *p = (uint8_t *)cp;
/*
DEBUGPRINT_F("Stream2u16: ");
DEBUGPRINT_HEX(cp[offset+1]);
DEBUGPRINT_F(" + ");
DEBUGPRINT_HEX(cp[offset]);
DEBUGPRINT_F("\n\r");
*/
return (uint16_t)((uint16_t)
((uint16_t)(*(p + offset + 1)) << 8) +
(uint16_t)(*(p + offset)));
}
//*****************************************************************************
//
//! STREAM_TO_UINT32_f
//!
//! @param p pointer to the stream
//! @param offset offset in the stream
//!
//! @return pointer to the new 32 bit
//!
//! @brief This function is used for copying received stream to
//! 32 bit in little endian format.
//
//*****************************************************************************
uint32_t STREAM_TO_UINT32_f(char * cp, uint16_t offset)
{
uint8_t *p = (uint8_t *)cp;
/*
DEBUGPRINT_F("\tStream2u32: ");
DEBUGPRINT_HEX(cp[offset+3]); DEBUGPRINT_F(" + ");
DEBUGPRINT_HEX(cp[offset+2]); DEBUGPRINT_F(" + ");
DEBUGPRINT_HEX(cp[offset+1]); DEBUGPRINT_F(" + ");
DEBUGPRINT_HEX(cp[offset]);
DEBUGPRINT_F("\n\r");
*/
return (uint32_t)((uint32_t)((uint32_t)
(*(p + offset + 3)) << 24) + (uint32_t)((uint32_t)
(*(p + offset + 2)) << 16) + (uint32_t)((uint32_t)
(*(p + offset + 1)) << 8) + (uint32_t)(*(p + offset)));
}
//*****************************************************************************
//
// Close the Doxygen group.
//! @}
//
//*****************************************************************************

View File

@ -1,385 +0,0 @@
/*****************************************************************************
*
* cc3000_common.h - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
*
* Adapted for use with the Arduino/AVR by KTOWN (Kevin Townsend)
* & Limor Fried for Adafruit Industries
* This library works with the Adafruit CC3000 breakout
* ----> https://www.adafruit.com/products/1469
* Adafruit invests time and resources providing this open source code,
* please support Adafruit and open-source hardware by purchasing
* products from Adafruit!
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the
* distribution.
*
* Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*****************************************************************************/
#ifndef __COMMON_H__
#define __COMMON_H__
//******************************************************************************
// Include files
//******************************************************************************
#include <stdlib.h>
#include <errno.h>
#include <stdint.h>
//*****************************************************************************
//
// If building with a C++ compiler, make all of the definitions in this header
// have a C binding.
//
//*****************************************************************************
#ifdef __cplusplus
extern "C" {
#endif
//*****************************************************************************
// ERROR CODES
//*****************************************************************************
#define ESUCCESS 0
#define EFAIL -1
#define EERROR EFAIL
//*****************************************************************************
// COMMON DEFINES
//*****************************************************************************
#define ERROR_SOCKET_INACTIVE -57
#define WLAN_ENABLE (1)
#define WLAN_DISABLE (0)
#define MAC_ADDR_LEN (6)
#define SP_PORTION_SIZE (32)
// #define CC3000_TINY_DRIVER
/*Defines for minimal and maximal RX buffer size. This size includes the spi
header and hci header.
The maximal buffer size derives from:
MTU + HCI header + SPI header + sendto() agrs size
The minimum buffer size derives from:
HCI header + SPI header + max args size
This buffer is used for receiving events and data.
The packet can not be longer than MTU size and CC3000 does not support
fragmentation. Note that the same buffer is used for reception of the data
and events from CC3000. That is why the minimum is defined.
The calculation for the actual size of buffer for reception is:
Given the maximal data size MAX_DATA that is expected to be received by
application, the required buffer is:
Using recv() or recvfrom():
max(CC3000_MINIMAL_RX_SIZE, MAX_DATA + HEADERS_SIZE_DATA + fromlen
+ ucArgsize + 1)
Using gethostbyname() with minimal buffer size will limit the host name
returned to 99 bytes only.
The 1 is used for the overrun detection
Buffer size increased to 130 following the add_profile() with WEP security
which requires TX buffer size of 130 bytes:
HEADERS_SIZE_EVNT + WLAN_ADD_PROFILE_WEP_PARAM_LEN + MAX SSID LEN + 4 * MAX KEY LEN = 130
MAX SSID LEN = 32
MAX SSID LEN = 13 (with add_profile only ascii key setting is supported,
therfore maximum key size is 13)
*/
#define CC3000_MINIMAL_RX_SIZE (130 + 1)
#define CC3000_MAXIMAL_RX_SIZE (1519 + 1)
/*Defines for minimal and maximal TX buffer size.
This buffer is used for sending events and data.
The packet can not be longer than MTU size and CC3000 does not support
fragmentation. Note that the same buffer is used for transmission of the data
and commands. That is why the minimum is defined.
The calculation for the actual size of buffer for transmission is:
Given the maximal data size MAX_DATA, the required buffer is:
Using Sendto():
max(CC3000_MINIMAL_TX_SIZE, MAX_DATA + SPI_HEADER_SIZE
+ SOCKET_SENDTO_PARAMS_LEN + SIMPLE_LINK_HCI_DATA_HEADER_SIZE + 1)
Using Send():
max(CC3000_MINIMAL_TX_SIZE, MAX_DATA + SPI_HEADER_SIZE
+ HCI_CMND_SEND_ARG_LENGTH + SIMPLE_LINK_HCI_DATA_HEADER_SIZE + 1)
The 1 is used for the overrun detection */
#define CC3000_MINIMAL_TX_SIZE (130 + 1)
#define CC3000_MAXIMAL_TX_SIZE (1519 + 1)
//TX and RX buffer sizes, allow to receive and transmit maximum data at length 8.
#ifdef CC3000_TINY_DRIVER
#define TINY_CC3000_MAXIMAL_RX_SIZE 44
#define TINY_CC3000_MAXIMAL_TX_SIZE 59
#endif
/*In order to determine your preferred buffer size,
change CC3000_MAXIMAL_RX_SIZE and CC3000_MAXIMAL_TX_SIZE to a value between
the minimal and maximal specified above.
Note that the buffers are allocated by SPI.
In case you change the size of those buffers, you might need also to change
the linker file, since for example on MSP430 FRAM devices the buffers are
allocated in the FRAM section that is allocated manually and not by IDE.
*/
#ifndef CC3000_TINY_DRIVER
#define CC3000_RX_BUFFER_SIZE (CC3000_MINIMAL_RX_SIZE)
#define CC3000_TX_BUFFER_SIZE (CC3000_MINIMAL_TX_SIZE)
//if defined TINY DRIVER we use smaller RX and TX buffer in order to minimize RAM consumption
#else
#define CC3000_RX_BUFFER_SIZE (TINY_CC3000_MAXIMAL_RX_SIZE)
#define CC3000_TX_BUFFER_SIZE (TINY_CC3000_MAXIMAL_TX_SIZE)
#endif
//*****************************************************************************
// Compound Types
//*****************************************************************************
#ifdef __AVR__
typedef unsigned long time_t; /* KTown: Updated to be compatible with Arduino Time.h */
#else
typedef long time_t;
#endif
typedef unsigned long clock_t;
typedef long suseconds_t;
typedef struct timeval timeval;
struct timeval
{
time_t tv_sec; /* seconds */
suseconds_t tv_usec; /* microseconds */
};
typedef char *(*tFWPatches)(unsigned long *usLength);
typedef char *(*tDriverPatches)(unsigned long *usLength);
typedef char *(*tBootLoaderPatches)(unsigned long *usLength);
typedef void (*tWlanCB)(long event_type, char * data, unsigned char length );
typedef long (*tWlanReadInteruptPin)(void);
typedef void (*tWlanInterruptEnable)(void);
typedef void (*tWlanInterruptDisable)(void);
typedef void (*tWriteWlanPin)(unsigned char val);
typedef struct
{
unsigned short usRxEventOpcode;
unsigned short usEventOrDataReceived;
unsigned char *pucReceivedData;
unsigned char *pucTxCommandBuffer;
tFWPatches sFWPatches;
tDriverPatches sDriverPatches;
tBootLoaderPatches sBootLoaderPatches;
tWlanCB sWlanCB;
tWlanReadInteruptPin ReadWlanInterruptPin;
tWlanInterruptEnable WlanInterruptEnable;
tWlanInterruptDisable WlanInterruptDisable;
tWriteWlanPin WriteWlanPin;
signed long slTransmitDataError;
unsigned short usNumberOfFreeBuffers;
unsigned short usSlBufferLength;
unsigned short usBufferSize;
unsigned short usRxDataPending;
unsigned long NumberOfSentPackets;
unsigned long NumberOfReleasedPackets;
unsigned char InformHostOnTxComplete;
}sSimplLinkInformation;
extern volatile sSimplLinkInformation tSLInformation;
//*****************************************************************************
// Prototypes for the APIs.
//*****************************************************************************
//*****************************************************************************
//
//! SimpleLinkWaitEvent
//!
//! @param usOpcode command operation code
//! @param pRetParams command return parameters
//!
//! @return none
//!
//! @brief Wait for event, pass it to the hci_event_handler and
//! update the event opcode in a global variable.
//
//*****************************************************************************
extern void SimpleLinkWaitEvent(unsigned short usOpcode, void *pRetParams);
//*****************************************************************************
//
//! SimpleLinkWaitData
//!
//! @param pBuf data buffer
//! @param from from information
//! @param fromlen from information length
//!
//! @return none
//!
//! @brief Wait for data, pass it to the hci_event_handler
//! and update in a global variable that there is
//! data to read.
//
//*****************************************************************************
extern void SimpleLinkWaitData(uint8_t *pBuf, uint8_t *from, uint8_t *fromlen);
//*****************************************************************************
//
//! UINT32_TO_STREAM_f
//!
//! \param p pointer to the new stream
//! \param u32 pointer to the 32 bit
//!
//! \return pointer to the new stream
//!
//! \brief This function is used for copying 32 bit to stream
//! while converting to little endian format.
//
//*****************************************************************************
extern uint8_t* UINT32_TO_STREAM_f (uint8_t *p, uint32_t u32);
//*****************************************************************************
//
//! UINT16_TO_STREAM_f
//!
//! \param p pointer to the new stream
//! \param u32 pointer to the 16 bit
//!
//! \return pointer to the new stream
//!
//! \brief This function is used for copying 16 bit to stream
//! while converting to little endian format.
//
//*****************************************************************************
extern uint8_t* UINT16_TO_STREAM_f (uint8_t *p, uint16_t u16);
//*****************************************************************************
//
//! STREAM_TO_UINT16_f
//!
//! \param p pointer to the stream
//! \param offset offset in the stream
//!
//! \return pointer to the new 16 bit
//!
//! \brief This function is used for copying received stream to
//! 16 bit in little endian format.
//
//*****************************************************************************
extern uint16_t STREAM_TO_UINT16_f(char* p, uint16_t offset);
//*****************************************************************************
//
//! STREAM_TO_UINT32_f
//!
//! \param p pointer to the stream
//! \param offset offset in the stream
//!
//! \return pointer to the new 32 bit
//!
//! \brief This function is used for copying received stream to
//! 32 bit in little endian format.
//
//*****************************************************************************
extern uint32_t STREAM_TO_UINT32_f(char* p, uint16_t offset);
//*****************************************************************************
//
//! cc3k_int_poll
//!
//! \brief checks if the interrupt pin is low
//! just in case the hardware missed a falling edge
//! function is in ccspi.cpp
//
//*****************************************************************************
extern void cc3k_int_poll();
//*****************************************************************************
// COMMON MACROs
//*****************************************************************************
//This macro is used for copying 8 bit to stream while converting to little endian format.
#define UINT8_TO_STREAM(_p, _val) {*(_p)++ = (_val);}
//This macro is used for copying 16 bit to stream while converting to little endian format.
#define UINT16_TO_STREAM(_p, _u16) (UINT16_TO_STREAM_f(_p, _u16))
//This macro is used for copying 32 bit to stream while converting to little endian format.
#define UINT32_TO_STREAM(_p, _u32) (UINT32_TO_STREAM_f(_p, _u32))
//This macro is used for copying a specified value length bits (l) to stream while converting to little endian format.
#define ARRAY_TO_STREAM(p, a, l) {register short _i; for (_i = 0; _i < l; _i++) *(p)++ = ((uint8_t *) a)[_i];}
//This macro is used for copying received stream to 8 bit in little endian format.
#define STREAM_TO_UINT8(_p, _offset, _u8) {_u8 = (uint8_t)(*(_p + _offset));}
//This macro is used for copying received stream to 16 bit in little endian format.
#define STREAM_TO_UINT16(_p, _offset, _u16) {_u16 = STREAM_TO_UINT16_f(_p, _offset);}
//This macro is used for copying received stream to 32 bit in little endian format.
#define STREAM_TO_UINT32(_p, _offset, _u32) {_u32 = STREAM_TO_UINT32_f(_p, _offset);}
#define STREAM_TO_STREAM(p, a, l) {register short _i; for (_i = 0; _i < l; _i++) *(a)++= ((uint8_t *) p)[_i];}
//*****************************************************************************
//
// Mark the end of the C bindings section for C++ compilers.
//
//*****************************************************************************
#ifdef __cplusplus
}
#endif // __cplusplus
#endif // __COMMON_H__

View File

@ -1,124 +0,0 @@
/**************************************************************************/
/*!
@file Adafruit_CC3000.cpp
@author KTOWN (Kevin Townsend Adafruit Industries)
@license BSD (see license.txt)
This is a library for the Adafruit CC3000 WiFi breakout board
This library works with the Adafruit CC3000 breakout
----> https://www.adafruit.com/products/1469
Check out the links above for our tutorials and wiring diagrams
These chips use SPI to communicate.
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
@section HISTORY
v1.0 - Initial release
*/
/**************************************************************************/
#include "debug.h"
/**************************************************************************/
/*!
@brief This function will display the number of bytes currently free
in RAM ... useful for debugging!
*/
/**************************************************************************/
#if defined (__arm__) && defined (__SAM3X8E__) // Arduino Due
// should use uinstd.h to define sbrk but on Arduino Due this causes a conflict
extern "C" char* sbrk(int incr);
int getFreeRam(void) {
char top;
return &top - reinterpret_cast<char*>(sbrk(0));
}
#else // AVR
int getFreeRam(void)
{
extern int __bss_end;
extern int *__brkval;
int free_memory;
if((int)__brkval == 0) {
free_memory = ((int)&free_memory) - ((int)&__bss_end);
}
else {
free_memory = ((int)&free_memory) - ((int)__brkval);
}
return free_memory;
}
#endif
void displayFreeRam(void)
{
if (CC3KPrinter == 0) {
return;
}
CC3KPrinter->print(F("Free RAM: "));
CC3KPrinter->print(getFreeRam());
CC3KPrinter->println(F(" bytes"));
}
void uart_putchar(char c) {
if (CC3KPrinter != 0) {
CC3KPrinter->write(c);
}
}
void printDec(uint8_t h) {
uart_putchar((h / 100) + '0');
h %= 100;
uart_putchar((h / 10) + '0');
h %= 10;
uart_putchar(h + '0');
}
void printHex(uint8_t h) {
uint8_t d = h >> 4;
if (d >= 10) {
uart_putchar(d - 10 + 'A');
} else {
uart_putchar(d + '0');
}
h &= 0xF;
if (h >= 10) {
uart_putchar(h - 10 + 'A');
} else {
uart_putchar(h + '0');
}
}
void printHex16(uint16_t h) {
uart_putchar('0');
uart_putchar('x');
DEBUGPRINT_HEX(h >> 8);
DEBUGPRINT_HEX(h);
}
void printDec16(uint16_t h) {
uart_putchar((h / 10000) + '0');
h %= 10000;
uart_putchar((h / 1000) + '0');
h %= 1000;
uart_putchar((h / 100) + '0');
h %= 100;
uart_putchar((h / 10) + '0');
h %= 10;
uart_putchar(h + '0');
}
void DEBUGPRINT(const prog_char *fstr)
{
char c;
if(!fstr) return;
while((c = pgm_read_byte(fstr++)))
uart_putchar(c);
}

View File

@ -1,67 +0,0 @@
/**************************************************************************/
/*!
@file Adafruit_CC3000.cpp
@author KTOWN (Kevin Townsend for Adafruit Industries)
@license BSD (see license.txt)
This is a library for the Adafruit CC3000 WiFi breakout board
This library works with the Adafruit CC3000 breakout
----> https://www.adafruit.com/products/1469
Check out the links above for our tutorials and wiring diagrams
These chips use SPI to communicate.
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
@section HISTORY
v1.0 - Initial release
*/
/**************************************************************************/
#include <Arduino.h>
#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
#if (GCC_VERSION >= 40702) || !defined(prog_char)
typedef char PROGMEM prog_char;
#endif
#ifndef _CC3000_DEBUG
#define _CC3000_DEBUG
#define DEBUG_MODE (0)
int getFreeRam(void);
void displayFreeRam(void);
void uart_putchar(char c);
void printHex(uint8_t h);
void printHex16(uint16_t h);
void DEBUGPRINT(const prog_char *fstr);
void printDec(uint8_t h);
void printDec16(uint16_t h);
#ifndef FLASHIFY
#define FLASHIFY(s) ({static const char c[] __attribute__ ((progmem)) = s;c;})
#endif
#define PRINT_F(__s) DEBUGPRINT(FLASHIFY(__s))
#if (DEBUG_MODE != 0)
#define DEBUGPRINT_F(__s) DEBUGPRINT(FLASHIFY(__s))
#define DEBUGPRINT_DEC(x) printDec(x)
#define DEBUGPRINT_DEC16(x) printDec16(x)
#define DEBUGPRINT_HEX(x) printHex(x)
#define DEBUGPRINT_HEX16(x) printHex16(x)
#else
#define DEBUGPRINT_F(__s) /* do nothing! */
#define DEBUGPRINT_DEC(x)
#define DEBUGPRINT_DEC16(x)
#define DEBUGPRINT_HEX(x)
#define DEBUGPRINT_HEX16(x)
#endif
extern Print* CC3KPrinter;
#endif

View File

@ -1,871 +0,0 @@
/*****************************************************************************
*
* evnt_handler.c - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
*
* Adapted for use with the Arduino/AVR by KTOWN (Kevin Townsend)
* & Limor Fried for Adafruit Industries
* This library works with the Adafruit CC3000 breakout
* ----> https://www.adafruit.com/products/1469
* Adafruit invests time and resources providing this open source code,
* please support Adafruit and open-source hardware by purchasing
* products from Adafruit!
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the
* distribution.
*
* Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*****************************************************************************/
//*****************************************************************************
//
//! \addtogroup evnt_handler_api
//! @{
//
//******************************************************************************
//******************************************************************************
// INCLUDE FILES
//******************************************************************************
#include "cc3000_common.h"
#include "string.h"
#include "hci.h"
#include "evnt_handler.h"
#include "wlan.h"
#include "socket.h"
#include "netapp.h"
#include "../ccspi.h"
#include "debug.h"
//*****************************************************************************
// COMMON DEFINES
//*****************************************************************************
#define FLOW_CONTROL_EVENT_HANDLE_OFFSET (0)
#define FLOW_CONTROL_EVENT_BLOCK_MODE_OFFSET (1)
#define FLOW_CONTROL_EVENT_FREE_BUFFS_OFFSET (2)
#define FLOW_CONTROL_EVENT_SIZE (4)
#define BSD_RSP_PARAMS_SOCKET_OFFSET (0)
#define BSD_RSP_PARAMS_STATUS_OFFSET (4)
#define GET_HOST_BY_NAME_RETVAL_OFFSET (0)
#define GET_HOST_BY_NAME_ADDR_OFFSET (4)
#define ACCEPT_SD_OFFSET (0)
#define ACCEPT_RETURN_STATUS_OFFSET (4)
#define ACCEPT_ADDRESS__OFFSET (8)
#define SL_RECEIVE_SD_OFFSET (0)
#define SL_RECEIVE_NUM_BYTES_OFFSET (4)
#define SL_RECEIVE__FLAGS__OFFSET (8)
#define SELECT_STATUS_OFFSET (0)
#define SELECT_READFD_OFFSET (4)
#define SELECT_WRITEFD_OFFSET (8)
#define SELECT_EXFD_OFFSET (12)
#define NETAPP_IPCONFIG_IP_OFFSET (0)
#define NETAPP_IPCONFIG_SUBNET_OFFSET (4)
#define NETAPP_IPCONFIG_GW_OFFSET (8)
#define NETAPP_IPCONFIG_DHCP_OFFSET (12)
#define NETAPP_IPCONFIG_DNS_OFFSET (16)
#define NETAPP_IPCONFIG_MAC_OFFSET (20)
#define NETAPP_IPCONFIG_SSID_OFFSET (26)
#define NETAPP_IPCONFIG_IP_LENGTH (4)
#define NETAPP_IPCONFIG_MAC_LENGTH (6)
#define NETAPP_IPCONFIG_SSID_LENGTH (32)
#define NETAPP_PING_PACKETS_SENT_OFFSET (0)
#define NETAPP_PING_PACKETS_RCVD_OFFSET (4)
#define NETAPP_PING_MIN_RTT_OFFSET (8)
#define NETAPP_PING_MAX_RTT_OFFSET (12)
#define NETAPP_PING_AVG_RTT_OFFSET (16)
#define GET_SCAN_RESULTS_TABlE_COUNT_OFFSET (0)
#define GET_SCAN_RESULTS_SCANRESULT_STATUS_OFFSET (4)
#define GET_SCAN_RESULTS_ISVALID_TO_SSIDLEN_OFFSET (8)
#define GET_SCAN_RESULTS_FRAME_TIME_OFFSET (10)
#define GET_SCAN_RESULTS_SSID_MAC_LENGTH (38)
//*****************************************************************************
// GLOBAL VARAIABLES
//*****************************************************************************
unsigned long socket_active_status = SOCKET_STATUS_INIT_VAL;
//*****************************************************************************
// Prototypes for the static functions
//*****************************************************************************
static long hci_event_unsol_flowcontrol_handler(char *pEvent);
static void update_socket_active_status(char *resp_params);
//*****************************************************************************
//
//! hci_unsol_handle_patch_request
//!
//! @param event_hdr event header
//!
//! @return none
//!
//! @brief Handle unsolicited event from type patch request
//
//*****************************************************************************
void hci_unsol_handle_patch_request(char *event_hdr)
{
char *params = (char *)(event_hdr) + HCI_EVENT_HEADER_SIZE;
unsigned long ucLength = 0;
char *patch;
switch (*params)
{
case HCI_EVENT_PATCHES_DRV_REQ:
if (tSLInformation.sDriverPatches)
{
patch = tSLInformation.sDriverPatches(&ucLength);
if (patch)
{
hci_patch_send(HCI_EVENT_PATCHES_DRV_REQ,
tSLInformation.pucTxCommandBuffer, patch, ucLength);
return;
}
}
// Send 0 length Patches response event
hci_patch_send(HCI_EVENT_PATCHES_DRV_REQ,
tSLInformation.pucTxCommandBuffer, 0, 0);
break;
case HCI_EVENT_PATCHES_FW_REQ:
if (tSLInformation.sFWPatches)
{
patch = tSLInformation.sFWPatches(&ucLength);
// Build and send a patch
if (patch)
{
hci_patch_send(HCI_EVENT_PATCHES_FW_REQ,
tSLInformation.pucTxCommandBuffer, patch, ucLength);
return;
}
}
// Send 0 length Patches response event
hci_patch_send(HCI_EVENT_PATCHES_FW_REQ,
tSLInformation.pucTxCommandBuffer, 0, 0);
break;
case HCI_EVENT_PATCHES_BOOTLOAD_REQ:
if (tSLInformation.sBootLoaderPatches)
{
patch = tSLInformation.sBootLoaderPatches(&ucLength);
if (patch)
{
hci_patch_send(HCI_EVENT_PATCHES_BOOTLOAD_REQ,
tSLInformation.pucTxCommandBuffer, patch, ucLength);
return;
}
}
// Send 0 length Patches response event
hci_patch_send(HCI_EVENT_PATCHES_BOOTLOAD_REQ,
tSLInformation.pucTxCommandBuffer, 0, 0);
break;
}
}
//*****************************************************************************
//
//! hci_event_handler
//!
//! @param pRetParams incoming data buffer
//! @param from from information (in case of data received)
//! @param fromlen from information length (in case of data received)
//!
//! @return none
//!
//! @brief Parse the incoming events packets and issues corresponding
//! event handler from global array of handlers pointers
//
//*****************************************************************************
unsigned char *
hci_event_handler(void *pRetParams, unsigned char *from, unsigned char *fromlen)
{
unsigned char *pucReceivedData, ucArgsize;
unsigned short usLength;
unsigned char *pucReceivedParams;
unsigned short usReceivedEventOpcode = 0;
unsigned long retValue32;
unsigned char * RecvParams;
unsigned char *RetParams;
while (1)
{
cc3k_int_poll();
if (tSLInformation.usEventOrDataReceived != 0)
{
pucReceivedData = (tSLInformation.pucReceivedData);
if (*pucReceivedData == HCI_TYPE_EVNT)
{
// Event Received
STREAM_TO_UINT16((char *)pucReceivedData,
HCI_EVENT_OPCODE_OFFSET,
usReceivedEventOpcode);
pucReceivedParams = pucReceivedData + HCI_EVENT_HEADER_SIZE;
RecvParams = pucReceivedParams;
RetParams = (unsigned char *)pRetParams;
// In case unsolicited event received - here the handling finished
if (hci_unsol_event_handler((char *)pucReceivedData) == 0)
{
STREAM_TO_UINT8(pucReceivedData, HCI_DATA_LENGTH_OFFSET, usLength);
switch(usReceivedEventOpcode)
{
case HCI_CMND_READ_BUFFER_SIZE:
{
STREAM_TO_UINT8((char *)pucReceivedParams, 0,
tSLInformation.usNumberOfFreeBuffers);
STREAM_TO_UINT16((char *)pucReceivedParams, 1,
tSLInformation.usSlBufferLength);
}
break;
case HCI_CMND_WLAN_CONFIGURE_PATCH:
case HCI_NETAPP_DHCP:
case HCI_NETAPP_PING_SEND:
case HCI_NETAPP_PING_STOP:
case HCI_NETAPP_ARP_FLUSH:
case HCI_NETAPP_SET_DEBUG_LEVEL:
case HCI_NETAPP_SET_TIMERS:
case HCI_EVNT_NVMEM_READ:
case HCI_EVNT_NVMEM_CREATE_ENTRY:
case HCI_CMND_NVMEM_WRITE_PATCH:
case HCI_NETAPP_PING_REPORT:
case HCI_EVNT_MDNS_ADVERTISE:
STREAM_TO_UINT8(pucReceivedData, HCI_EVENT_STATUS_OFFSET
,*(unsigned char *)pRetParams);
break;
case HCI_CMND_SETSOCKOPT:
case HCI_CMND_WLAN_CONNECT:
case HCI_CMND_WLAN_IOCTL_STATUSGET:
case HCI_EVNT_WLAN_IOCTL_ADD_PROFILE:
case HCI_CMND_WLAN_IOCTL_DEL_PROFILE:
case HCI_CMND_WLAN_IOCTL_SET_CONNECTION_POLICY:
case HCI_CMND_WLAN_IOCTL_SET_SCANPARAM:
case HCI_CMND_WLAN_IOCTL_SIMPLE_CONFIG_START:
case HCI_CMND_WLAN_IOCTL_SIMPLE_CONFIG_STOP:
case HCI_CMND_WLAN_IOCTL_SIMPLE_CONFIG_SET_PREFIX:
case HCI_CMND_EVENT_MASK:
case HCI_EVNT_WLAN_DISCONNECT:
case HCI_EVNT_SOCKET:
case HCI_EVNT_BIND:
case HCI_CMND_LISTEN:
case HCI_EVNT_CLOSE_SOCKET:
case HCI_EVNT_CONNECT:
case HCI_EVNT_NVMEM_WRITE:
STREAM_TO_UINT32((char *)pucReceivedParams,0
,*(unsigned long *)pRetParams);
break;
case HCI_EVNT_READ_SP_VERSION:
STREAM_TO_UINT8(pucReceivedData, HCI_EVENT_STATUS_OFFSET
,*(unsigned char *)pRetParams);
pRetParams = ((char *)pRetParams) + 1;
STREAM_TO_UINT32((char *)pucReceivedParams, 0, retValue32);
UINT32_TO_STREAM((unsigned char *)pRetParams, retValue32);
break;
case HCI_EVNT_BSD_GETHOSTBYNAME:
STREAM_TO_UINT32((char *)pucReceivedParams
,GET_HOST_BY_NAME_RETVAL_OFFSET,*(unsigned long *)pRetParams);
pRetParams = ((char *)pRetParams) + 4;
STREAM_TO_UINT32((char *)pucReceivedParams
,GET_HOST_BY_NAME_ADDR_OFFSET,*(unsigned long *)pRetParams);
break;
case HCI_EVNT_ACCEPT:
{
STREAM_TO_UINT32((char *)pucReceivedParams,ACCEPT_SD_OFFSET
,*(unsigned long *)pRetParams);
pRetParams = ((char *)pRetParams) + 4;
STREAM_TO_UINT32((char *)pucReceivedParams
,ACCEPT_RETURN_STATUS_OFFSET,*(unsigned long *)pRetParams);
pRetParams = ((char *)pRetParams) + 4;
//This argument returns in network order
memcpy((unsigned char *)pRetParams,
pucReceivedParams + ACCEPT_ADDRESS__OFFSET, sizeof(sockaddr));
break;
}
case HCI_EVNT_RECV:
case HCI_EVNT_RECVFROM:
{
STREAM_TO_UINT32((char *)pucReceivedParams,SL_RECEIVE_SD_OFFSET ,*(unsigned long *)pRetParams);
pRetParams = ((char *)pRetParams) + 4;
STREAM_TO_UINT32((char *)pucReceivedParams,SL_RECEIVE_NUM_BYTES_OFFSET,*(unsigned long *)pRetParams);
pRetParams = ((char *)pRetParams) + 4;
STREAM_TO_UINT32((char *)pucReceivedParams,SL_RECEIVE__FLAGS__OFFSET,*(unsigned long *)pRetParams);
tBsdReadReturnParams *tread = (tBsdReadReturnParams *)pRetParams;
if(((tBsdReadReturnParams *)pRetParams)->iNumberOfBytes == ERROR_SOCKET_INACTIVE)
{
set_socket_active_status(((tBsdReadReturnParams *)pRetParams)->iSocketDescriptor,SOCKET_STATUS_INACTIVE);
}
break;
}
case HCI_EVNT_SEND:
case HCI_EVNT_SENDTO:
{
STREAM_TO_UINT32((char *)pucReceivedParams,SL_RECEIVE_SD_OFFSET ,*(unsigned long *)pRetParams);
pRetParams = ((char *)pRetParams) + 4;
STREAM_TO_UINT32((char *)pucReceivedParams,SL_RECEIVE_NUM_BYTES_OFFSET,*(unsigned long *)pRetParams);
pRetParams = ((char *)pRetParams) + 4;
break;
}
case HCI_EVNT_SELECT:
{
STREAM_TO_UINT32((char *)pucReceivedParams,SELECT_STATUS_OFFSET,*(unsigned long *)pRetParams);
pRetParams = ((char *)pRetParams) + 4;
STREAM_TO_UINT32((char *)pucReceivedParams,SELECT_READFD_OFFSET,*(unsigned long *)pRetParams);
pRetParams = ((char *)pRetParams) + 4;
STREAM_TO_UINT32((char *)pucReceivedParams,SELECT_WRITEFD_OFFSET,*(unsigned long *)pRetParams);
pRetParams = ((char *)pRetParams) + 4;
STREAM_TO_UINT32((char *)pucReceivedParams,SELECT_EXFD_OFFSET,*(unsigned long *)pRetParams);
break;
}
case HCI_CMND_GETSOCKOPT:
STREAM_TO_UINT8(pucReceivedData, HCI_EVENT_STATUS_OFFSET,((tBsdGetSockOptReturnParams *)pRetParams)->iStatus);
//This argument returns in network order
memcpy((unsigned char *)pRetParams, pucReceivedParams, 4);
break;
case HCI_CMND_WLAN_IOCTL_GET_SCAN_RESULTS:
STREAM_TO_UINT32((char *)pucReceivedParams,GET_SCAN_RESULTS_TABlE_COUNT_OFFSET,*(unsigned long *)pRetParams);
pRetParams = ((char *)pRetParams) + 4;
STREAM_TO_UINT32((char *)pucReceivedParams,GET_SCAN_RESULTS_SCANRESULT_STATUS_OFFSET,*(unsigned long *)pRetParams);
pRetParams = ((char *)pRetParams) + 4;
STREAM_TO_UINT16((char *)pucReceivedParams,GET_SCAN_RESULTS_ISVALID_TO_SSIDLEN_OFFSET,*(unsigned long *)pRetParams);
pRetParams = ((char *)pRetParams) + 2;
STREAM_TO_UINT16((char *)pucReceivedParams,GET_SCAN_RESULTS_FRAME_TIME_OFFSET,*(unsigned long *)pRetParams);
pRetParams = ((char *)pRetParams) + 2;
memcpy((unsigned char *)pRetParams, (char *)(pucReceivedParams + GET_SCAN_RESULTS_FRAME_TIME_OFFSET + 2), GET_SCAN_RESULTS_SSID_MAC_LENGTH);
break;
case HCI_CMND_SIMPLE_LINK_START:
break;
case HCI_NETAPP_IPCONFIG:
//Read IP address
STREAM_TO_STREAM(RecvParams,RetParams,NETAPP_IPCONFIG_IP_LENGTH);
RecvParams += 4;
//Read subnet
STREAM_TO_STREAM(RecvParams,RetParams,NETAPP_IPCONFIG_IP_LENGTH);
RecvParams += 4;
//Read default GW
STREAM_TO_STREAM(RecvParams,RetParams,NETAPP_IPCONFIG_IP_LENGTH);
RecvParams += 4;
//Read DHCP server
STREAM_TO_STREAM(RecvParams,RetParams,NETAPP_IPCONFIG_IP_LENGTH);
RecvParams += 4;
//Read DNS server
STREAM_TO_STREAM(RecvParams,RetParams,NETAPP_IPCONFIG_IP_LENGTH);
RecvParams += 4;
//Read Mac address
STREAM_TO_STREAM(RecvParams,RetParams,NETAPP_IPCONFIG_MAC_LENGTH);
RecvParams += 6;
//Read SSID
STREAM_TO_STREAM(RecvParams,RetParams,NETAPP_IPCONFIG_SSID_LENGTH);
}
}
if (usReceivedEventOpcode == tSLInformation.usRxEventOpcode)
{
tSLInformation.usRxEventOpcode = 0;
}
}
else
{
pucReceivedParams = pucReceivedData;
STREAM_TO_UINT8((char *)pucReceivedData, HCI_PACKET_ARGSIZE_OFFSET, ucArgsize);
STREAM_TO_UINT16((char *)pucReceivedData, HCI_PACKET_LENGTH_OFFSET, usLength);
// Data received: note that the only case where from and from length
// are not null is in recv from, so fill the args accordingly
if (from)
{
STREAM_TO_UINT32((char *)(pucReceivedData + HCI_DATA_HEADER_SIZE), BSD_RECV_FROM_FROMLEN_OFFSET, *(unsigned long *)fromlen);
memcpy(from, (pucReceivedData + HCI_DATA_HEADER_SIZE + BSD_RECV_FROM_FROM_OFFSET) ,*fromlen);
}
memcpy(pRetParams, pucReceivedParams + HCI_DATA_HEADER_SIZE + ucArgsize,
usLength - ucArgsize);
tSLInformation.usRxDataPending = 0;
}
tSLInformation.usEventOrDataReceived = 0;
SpiResumeSpi();
// Since we are going to TX - we need to handle this event after the
// ResumeSPi since we need interrupts
if ((*pucReceivedData == HCI_TYPE_EVNT) &&
(usReceivedEventOpcode == HCI_EVNT_PATCHES_REQ))
{
hci_unsol_handle_patch_request((char *)pucReceivedData);
}
if ((tSLInformation.usRxEventOpcode == 0) && (tSLInformation.usRxDataPending == 0))
{
return NULL;
}
}
}
}
//*****************************************************************************
//
//! hci_unsol_event_handler
//!
//! @param event_hdr event header
//!
//! @return 1 if event supported and handled
//! 0 if event is not supported
//!
//! @brief Handle unsolicited events
//
//*****************************************************************************
long
hci_unsol_event_handler(char *event_hdr)
{
char * data = NULL;
long event_type;
unsigned long NumberOfReleasedPackets;
unsigned long NumberOfSentPackets;
STREAM_TO_UINT16(event_hdr, HCI_EVENT_OPCODE_OFFSET,event_type);
DEBUGPRINT_F("\tHCI_UNSOL_EVT: ");
DEBUGPRINT_HEX16(event_type);
if (event_type & HCI_EVNT_UNSOL_BASE)
{
switch(event_type)
{
case HCI_EVNT_DATA_UNSOL_FREE_BUFF:
{
hci_event_unsol_flowcontrol_handler(event_hdr);
NumberOfReleasedPackets = tSLInformation.NumberOfReleasedPackets;
NumberOfSentPackets = tSLInformation.NumberOfSentPackets;
if (NumberOfReleasedPackets == NumberOfSentPackets)
{
if (tSLInformation.InformHostOnTxComplete)
{
tSLInformation.sWlanCB(HCI_EVENT_CC3000_CAN_SHUT_DOWN, NULL, 0);
}
}
return 1;
}
}
}
if(event_type & HCI_EVNT_WLAN_UNSOL_BASE)
{
switch(event_type)
{
case HCI_EVNT_WLAN_KEEPALIVE:
case HCI_EVNT_WLAN_UNSOL_CONNECT:
case HCI_EVNT_WLAN_UNSOL_DISCONNECT:
case HCI_EVNT_WLAN_UNSOL_INIT:
case HCI_EVNT_WLAN_ASYNC_SIMPLE_CONFIG_DONE:
if( tSLInformation.sWlanCB )
{
tSLInformation.sWlanCB(event_type, 0, 0);
}
break;
case HCI_EVNT_WLAN_UNSOL_DHCP:
{
unsigned char params[NETAPP_IPCONFIG_MAC_OFFSET + 1]; // extra byte is for the status
unsigned char *recParams = params;
data = (char*)(event_hdr) + HCI_EVENT_HEADER_SIZE;
//Read IP address
STREAM_TO_STREAM(data,recParams,NETAPP_IPCONFIG_IP_LENGTH);
data += 4;
//Read subnet
STREAM_TO_STREAM(data,recParams,NETAPP_IPCONFIG_IP_LENGTH);
data += 4;
//Read default GW
STREAM_TO_STREAM(data,recParams,NETAPP_IPCONFIG_IP_LENGTH);
data += 4;
//Read DHCP server
STREAM_TO_STREAM(data,recParams,NETAPP_IPCONFIG_IP_LENGTH);
data += 4;
//Read DNS server
STREAM_TO_STREAM(data,recParams,NETAPP_IPCONFIG_IP_LENGTH);
// read the status
STREAM_TO_UINT8(event_hdr, HCI_EVENT_STATUS_OFFSET, *recParams);
if( tSLInformation.sWlanCB )
{
tSLInformation.sWlanCB(event_type, (char *)params, sizeof(params));
}
}
break;
case HCI_EVNT_WLAN_ASYNC_PING_REPORT:
{
netapp_pingreport_args_t params;
data = (char*)(event_hdr) + HCI_EVENT_HEADER_SIZE;
STREAM_TO_UINT32(data, NETAPP_PING_PACKETS_SENT_OFFSET, params.packets_sent);
STREAM_TO_UINT32(data, NETAPP_PING_PACKETS_RCVD_OFFSET, params.packets_received);
STREAM_TO_UINT32(data, NETAPP_PING_MIN_RTT_OFFSET, params.min_round_time);
STREAM_TO_UINT32(data, NETAPP_PING_MAX_RTT_OFFSET, params.max_round_time);
STREAM_TO_UINT32(data, NETAPP_PING_AVG_RTT_OFFSET, params.avg_round_time);
if( tSLInformation.sWlanCB )
{
tSLInformation.sWlanCB(event_type, (char *)&params, sizeof(params));
}
}
break;
case HCI_EVNT_BSD_TCP_CLOSE_WAIT:
{
DEBUGPRINT_F("\tTCP Close Wait\n\r");
uint8_t socketnum;
data = (char*)(event_hdr) + HCI_EVENT_HEADER_SIZE;
/*
printHex(data[0]); PRINT_F("\t");
printHex(data[1]); PRINT_F("\t");
printHex(data[2]); PRINT_F("\t");
printHex(data[3]); PRINT_F("\t");
printHex(data[4]); PRINT_F("\t");
printHex(data[5]); PRINT_F("\t");
*/
socketnum = data[0];
//STREAM_TO_UINT16(data, 0, socketnum);
if( tSLInformation.sWlanCB )
{
tSLInformation.sWlanCB(event_type, (char *)&socketnum, 1);
}
}
break;
//'default' case which means "event not supported"
default:
return (0);
}
return(1);
}
if ((event_type == HCI_EVNT_SEND) || (event_type == HCI_EVNT_SENDTO)
|| (event_type == HCI_EVNT_WRITE))
{
char *pArg;
long status;
DEBUGPRINT_F("\tSEND event response\n\r");
pArg = M_BSD_RESP_PARAMS_OFFSET(event_hdr);
STREAM_TO_UINT32(pArg, BSD_RSP_PARAMS_STATUS_OFFSET,status);
if (ERROR_SOCKET_INACTIVE == status)
{
// The only synchronous event that can come from SL device in form of
// command complete is "Command Complete" on data sent, in case SL device
// was unable to transmit
STREAM_TO_UINT8(event_hdr, HCI_EVENT_STATUS_OFFSET, tSLInformation.slTransmitDataError);
update_socket_active_status(M_BSD_RESP_PARAMS_OFFSET(event_hdr));
return (1);
}
else
return (0);
}
return(0);
}
//*****************************************************************************
//
//! hci_unsolicited_event_handler
//!
//! @param None
//!
//! @return ESUCCESS if successful, EFAIL if an error occurred
//!
//! @brief Parse the incoming unsolicited event packets and issues
//! corresponding event handler.
//
//*****************************************************************************
long
hci_unsolicited_event_handler(void)
{
unsigned long res = 0;
unsigned char *pucReceivedData;
if (tSLInformation.usEventOrDataReceived != 0)
{
pucReceivedData = (tSLInformation.pucReceivedData);
if (*pucReceivedData == HCI_TYPE_EVNT)
{
// In case unsolicited event received - here the handling finished
if (hci_unsol_event_handler((char *)pucReceivedData) == 1)
{
// There was an unsolicited event received - we can release the buffer
// and clean the event received
tSLInformation.usEventOrDataReceived = 0;
res = 1;
SpiResumeSpi();
}
}
}
return res;
}
//*****************************************************************************
//
//! set_socket_active_status
//!
//! @param Sd
//! @param Status
//! @return none
//!
//! @brief Check if the socket ID and status are valid and set
//! accordingly the global socket status
//
//*****************************************************************************
void set_socket_active_status(long Sd, long Status)
{
if(M_IS_VALID_SD(Sd) && M_IS_VALID_STATUS(Status))
{
socket_active_status &= ~(1 << Sd); /* clean socket's mask */
socket_active_status |= (Status << Sd); /* set new socket's mask */
}
}
//*****************************************************************************
//
//! hci_event_unsol_flowcontrol_handler
//!
//! @param pEvent pointer to the string contains parameters for IPERF
//! @return ESUCCESS if successful, EFAIL if an error occurred
//!
//! @brief Called in case unsolicited event from type
//! HCI_EVNT_DATA_UNSOL_FREE_BUFF has received.
//! Keep track on the number of packets transmitted and update the
//! number of free buffer in the SL device.
//
//*****************************************************************************
long
hci_event_unsol_flowcontrol_handler(char *pEvent)
{
long temp, value;
unsigned short i;
unsigned short pusNumberOfHandles=0;
char *pReadPayload;
STREAM_TO_UINT16((char *)pEvent,HCI_EVENT_HEADER_SIZE,pusNumberOfHandles);
pReadPayload = ((char *)pEvent +
HCI_EVENT_HEADER_SIZE + sizeof(pusNumberOfHandles));
temp = 0;
for(i = 0; i < pusNumberOfHandles ; i++)
{
STREAM_TO_UINT16(pReadPayload, FLOW_CONTROL_EVENT_FREE_BUFFS_OFFSET, value);
temp += value;
pReadPayload += FLOW_CONTROL_EVENT_SIZE;
}
tSLInformation.usNumberOfFreeBuffers += temp;
tSLInformation.NumberOfReleasedPackets += temp;
return(ESUCCESS);
}
//*****************************************************************************
//
//! get_socket_active_status
//!
//! @param Sd Socket IS
//! @return Current status of the socket.
//!
//! @brief Retrieve socket status
//
//*****************************************************************************
long
get_socket_active_status(long Sd)
{
if(M_IS_VALID_SD(Sd))
{
return (socket_active_status & (1 << Sd)) ? SOCKET_STATUS_INACTIVE : SOCKET_STATUS_ACTIVE;
}
return SOCKET_STATUS_INACTIVE;
}
//*****************************************************************************
//
//! update_socket_active_status
//!
//! @param resp_params Socket IS
//! @return Current status of the socket.
//!
//! @brief Retrieve socket status
//
//*****************************************************************************
void
update_socket_active_status(char *resp_params)
{
long status, sd;
STREAM_TO_UINT32(resp_params, BSD_RSP_PARAMS_SOCKET_OFFSET,sd);
STREAM_TO_UINT32(resp_params, BSD_RSP_PARAMS_STATUS_OFFSET,status);
if(ERROR_SOCKET_INACTIVE == status)
{
set_socket_active_status(sd, SOCKET_STATUS_INACTIVE);
}
}
//*****************************************************************************
//
//! SimpleLinkWaitEvent
//!
//! @param usOpcode command operation code
//! @param pRetParams command return parameters
//!
//! @return none
//!
//! @brief Wait for event, pass it to the hci_event_handler and
//! update the event opcode in a global variable.
//
//*****************************************************************************
void
SimpleLinkWaitEvent(unsigned short usOpcode, void *pRetParams)
{
// In the blocking implementation the control to caller will be returned only
// after the end of current transaction
tSLInformation.usRxEventOpcode = usOpcode;
hci_event_handler(pRetParams, 0, 0);
}
//*****************************************************************************
//
//! SimpleLinkWaitData
//!
//! @param pBuf data buffer
//! @param from from information
//! @param fromlen from information length
//!
//! @return none
//!
//! @brief Wait for data, pass it to the hci_event_handler
//! and update in a global variable that there is
//! data to read.
//
//*****************************************************************************
void
SimpleLinkWaitData(unsigned char *pBuf, unsigned char *from,
unsigned char *fromlen)
{
// In the blocking implementation the control to caller will be returned only
// after the end of current transaction, i.e. only after data will be received
tSLInformation.usRxDataPending = 1;
hci_event_handler(pBuf, from, fromlen);
}
//*****************************************************************************
//
// Close the Doxygen group.
//! @}
//
//*****************************************************************************

View File

@ -1,175 +0,0 @@
/*****************************************************************************
*
* evnt_handler.h - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
*
* Adapted for use with the Arduino/AVR by KTOWN (Kevin Townsend)
* & Limor Fried for Adafruit Industries
* This library works with the Adafruit CC3000 breakout
* ----> https://www.adafruit.com/products/1469
* Adafruit invests time and resources providing this open source code,
* please support Adafruit and open-source hardware by purchasing
* products from Adafruit!
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the
* distribution.
*
* Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*****************************************************************************/
#ifndef __EVENT_HANDLER_H__
#define __EVENT_HANDLER_H__
#include "hci.h"
#include "socket.h"
//*****************************************************************************
//
// If building with a C++ compiler, make all of the definitions in this header
// have a C binding.
//
//*****************************************************************************
#ifdef __cplusplus
extern "C" {
#endif
//*****************************************************************************
//
// Prototypes for the APIs.
//
//*****************************************************************************
//*****************************************************************************
//
//! hci_event_handler
//!
//! @param pRetParams incoming data buffer
//! @param from from information (in case of data received)
//! @param fromlen from information length (in case of data received)
//!
//! @return none
//!
//! @brief Parse the incoming events packets and issues corresponding
//! event handler from global array of handlers pointers
//
//*****************************************************************************
extern unsigned char *hci_event_handler(void *pRetParams, unsigned char *from, unsigned char *fromlen);
//*****************************************************************************
//
//! hci_unsol_event_handler
//!
//! @param event_hdr event header
//!
//! @return 1 if event supported and handled
//! 0 if event is not supported
//!
//! @brief Handle unsolicited events
//
//*****************************************************************************
extern long hci_unsol_event_handler(char *event_hdr);
//*****************************************************************************
//
//! hci_unsolicited_event_handler
//!
//! @param None
//!
//! @return ESUCCESS if successful, EFAIL if an error occurred
//!
//! @brief Parse the incoming unsolicited event packets and issues
//! corresponding event handler.
//
//*****************************************************************************
extern long hci_unsolicited_event_handler(void);
#define M_BSD_RESP_PARAMS_OFFSET(hci_event_hdr)((char *)(hci_event_hdr) + HCI_EVENT_HEADER_SIZE)
#define SOCKET_STATUS_ACTIVE 0
#define SOCKET_STATUS_INACTIVE 1
/* Init socket_active_status = 'all ones': init all sockets with SOCKET_STATUS_INACTIVE.
Will be changed by 'set_socket_active_status' upon 'connect' and 'accept' calls */
#define SOCKET_STATUS_INIT_VAL 0xFFFF
#define M_IS_VALID_SD(sd) ((0 <= (sd)) && ((sd) <= 7))
#define M_IS_VALID_STATUS(status) (((status) == SOCKET_STATUS_ACTIVE)||((status) == SOCKET_STATUS_INACTIVE))
extern unsigned long socket_active_status;
extern void set_socket_active_status(long Sd, long Status);
extern long get_socket_active_status(long Sd);
typedef struct _bsd_accept_return_t
{
long iSocketDescriptor;
long iStatus;
sockaddr tSocketAddress;
} tBsdReturnParams;
typedef struct _bsd_read_return_t
{
long iSocketDescriptor;
long iNumberOfBytes;
unsigned long uiFlags;
} tBsdReadReturnParams;
#define BSD_RECV_FROM_FROMLEN_OFFSET (4)
#define BSD_RECV_FROM_FROM_OFFSET (16)
typedef struct _bsd_select_return_t
{
long iStatus;
unsigned long uiRdfd;
unsigned long uiWrfd;
unsigned long uiExfd;
} tBsdSelectRecvParams;
typedef struct _bsd_getsockopt_return_t
{
unsigned char ucOptValue[4];
char iStatus;
} tBsdGetSockOptReturnParams;
typedef struct _bsd_gethostbyname_return_t
{
long retVal;
long outputAddress;
} tBsdGethostbynameParams;
//*****************************************************************************
//
// Mark the end of the C bindings section for C++ compilers.
//
//*****************************************************************************
#ifdef __cplusplus
}
#endif // __cplusplus
#endif // __EVENT_HANDLER_H__

View File

@ -1,239 +0,0 @@
/*****************************************************************************
*
* hci.c - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
*
* Adapted for use with the Arduino/AVR by KTOWN (Kevin Townsend)
* & Limor Fried for Adafruit Industries
* This library works with the Adafruit CC3000 breakout
* ----> https://www.adafruit.com/products/1469
* Adafruit invests time and resources providing this open source code,
* please support Adafruit and open-source hardware by purchasing
* products from Adafruit!
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the
* distribution.
*
* Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*****************************************************************************/
//*****************************************************************************
//
//! \addtogroup hci_app
//! @{
//
//*****************************************************************************
#include "cc3000_common.h"
#include "hci.h"
#include "../ccspi.h"
#include "evnt_handler.h"
#include "wlan.h"
#define SL_PATCH_PORTION_SIZE (1000)
//*****************************************************************************
//
//! hci_command_send
//!
//! @param usOpcode command operation code
//! @param pucBuff pointer to the command's arguments buffer
//! @param ucArgsLength length of the arguments
//!
//! @return none
//!
//! @brief Initiate an HCI command.
//
//*****************************************************************************
unsigned short
hci_command_send(unsigned short usOpcode, unsigned char *pucBuff,
unsigned char ucArgsLength)
{
unsigned char *stream;
stream = (pucBuff + SPI_HEADER_SIZE);
UINT8_TO_STREAM(stream, HCI_TYPE_CMND);
stream = UINT16_TO_STREAM(stream, usOpcode);
UINT8_TO_STREAM(stream, ucArgsLength);
//Update the opcode of the event we will be waiting for
SpiWrite(pucBuff, ucArgsLength + SIMPLE_LINK_HCI_CMND_HEADER_SIZE);
return(0);
}
//*****************************************************************************
//
//! hci_data_send
//!
//! @param usOpcode command operation code
//! @param ucArgs pointer to the command's arguments buffer
//! @param usArgsLength length of the arguments
//! @param ucTail pointer to the data buffer
//! @param usTailLength buffer length
//!
//! @return none
//!
//! @brief Initiate an HCI data write operation
//
//*****************************************************************************
long
hci_data_send(unsigned char ucOpcode,
unsigned char *ucArgs,
unsigned short usArgsLength,
unsigned short usDataLength,
const unsigned char *ucTail,
unsigned short usTailLength)
{
unsigned char *stream;
stream = ((ucArgs) + SPI_HEADER_SIZE);
UINT8_TO_STREAM(stream, HCI_TYPE_DATA);
UINT8_TO_STREAM(stream, ucOpcode);
UINT8_TO_STREAM(stream, usArgsLength);
stream = UINT16_TO_STREAM(stream, usArgsLength + usDataLength + usTailLength);
// Send the packet over the SPI
SpiWrite(ucArgs, SIMPLE_LINK_HCI_DATA_HEADER_SIZE + usArgsLength + usDataLength + usTailLength);
return(ESUCCESS);
}
//*****************************************************************************
//
//! hci_data_command_send
//!
//! @param usOpcode command operation code
//! @param pucBuff pointer to the data buffer
//! @param ucArgsLength arguments length
//! @param ucDataLength data length
//!
//! @return none
//!
//! @brief Prepeare HCI header and initiate an HCI data write operation
//
//*****************************************************************************
void hci_data_command_send(unsigned short usOpcode, unsigned char *pucBuff,
unsigned char ucArgsLength,unsigned short ucDataLength)
{
unsigned char *stream = (pucBuff + SPI_HEADER_SIZE);
UINT8_TO_STREAM(stream, HCI_TYPE_DATA);
UINT8_TO_STREAM(stream, usOpcode);
UINT8_TO_STREAM(stream, ucArgsLength);
stream = UINT16_TO_STREAM(stream, ucArgsLength + ucDataLength);
// Send the command over SPI on data channel
SpiWrite(pucBuff, ucArgsLength + ucDataLength + SIMPLE_LINK_HCI_DATA_CMND_HEADER_SIZE);
return;
}
//*****************************************************************************
//
//! hci_patch_send
//!
//! @param usOpcode command operation code
//! @param pucBuff pointer to the command's arguments buffer
//! @param patch pointer to patch content buffer
//! @param usDataLength data length
//!
//! @return none
//!
//! @brief Prepeare HCI header and initiate an HCI patch write operation
//
//*****************************************************************************
void
hci_patch_send(unsigned char ucOpcode, unsigned char *pucBuff, char *patch, unsigned short usDataLength)
{
unsigned char *data_ptr = (pucBuff + SPI_HEADER_SIZE);
unsigned short usTransLength;
unsigned char *stream = (pucBuff + SPI_HEADER_SIZE);
UINT8_TO_STREAM(stream, HCI_TYPE_PATCH);
UINT8_TO_STREAM(stream, ucOpcode);
stream = UINT16_TO_STREAM(stream, usDataLength + SIMPLE_LINK_HCI_PATCH_HEADER_SIZE);
if (usDataLength <= SL_PATCH_PORTION_SIZE)
{
UINT16_TO_STREAM(stream, usDataLength);
stream = UINT16_TO_STREAM(stream, usDataLength);
memcpy((pucBuff + SPI_HEADER_SIZE) + HCI_PATCH_HEADER_SIZE, patch, usDataLength);
// Update the opcode of the event we will be waiting for
SpiWrite(pucBuff, usDataLength + HCI_PATCH_HEADER_SIZE);
}
else
{
usTransLength = (usDataLength/SL_PATCH_PORTION_SIZE);
UINT16_TO_STREAM(stream, usDataLength + SIMPLE_LINK_HCI_PATCH_HEADER_SIZE + usTransLength*SIMPLE_LINK_HCI_PATCH_HEADER_SIZE);
stream = UINT16_TO_STREAM(stream, SL_PATCH_PORTION_SIZE);
memcpy(pucBuff + SPI_HEADER_SIZE + HCI_PATCH_HEADER_SIZE, patch, SL_PATCH_PORTION_SIZE);
usDataLength -= SL_PATCH_PORTION_SIZE;
patch += SL_PATCH_PORTION_SIZE;
// Update the opcode of the event we will be waiting for
SpiWrite(pucBuff, SL_PATCH_PORTION_SIZE + HCI_PATCH_HEADER_SIZE);
while (usDataLength)
{
cc3k_int_poll();
if (usDataLength <= SL_PATCH_PORTION_SIZE)
{
usTransLength = usDataLength;
usDataLength = 0;
}
else
{
usTransLength = SL_PATCH_PORTION_SIZE;
usDataLength -= usTransLength;
}
*(unsigned short *)data_ptr = usTransLength;
memcpy(data_ptr + SIMPLE_LINK_HCI_PATCH_HEADER_SIZE, patch, usTransLength);
patch += usTransLength;
// Update the opcode of the event we will be waiting for
SpiWrite((unsigned char *)data_ptr, usTransLength + sizeof(usTransLength));
}
}
}
//*****************************************************************************
//
// Close the Doxygen group.
//! @}
//
//
//*****************************************************************************

View File

@ -1,336 +0,0 @@
/*****************************************************************************
*
* hci.h - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
*
* Adapted for use with the Arduino/AVR by KTOWN (Kevin Townsend)
* & Limor Fried for Adafruit Industries
* This library works with the Adafruit CC3000 breakout
* ----> https://www.adafruit.com/products/1469
* Adafruit invests time and resources providing this open source code,
* please support Adafruit and open-source hardware by purchasing
* products from Adafruit!
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the
* distribution.
*
* Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*****************************************************************************/
#ifndef __HCI_H__
#define __HCI_H__
#include "cc3000_common.h"
//*****************************************************************************
//
// If building with a C++ compiler, make all of the definitions in this header
// have a C binding.
//
//*****************************************************************************
#ifdef __cplusplus
extern "C" {
#endif
#define SPI_HEADER_SIZE (5)
#define SIMPLE_LINK_HCI_CMND_HEADER_SIZE (4)
#define HEADERS_SIZE_CMD (SPI_HEADER_SIZE + SIMPLE_LINK_HCI_CMND_HEADER_SIZE)
#define SIMPLE_LINK_HCI_DATA_CMND_HEADER_SIZE (5)
#define SIMPLE_LINK_HCI_DATA_HEADER_SIZE (5)
#define SIMPLE_LINK_HCI_PATCH_HEADER_SIZE (2)
//*****************************************************************************
//
// Values that can be used as HCI Commands and HCI Packet header defines
//
//*****************************************************************************
#define HCI_TYPE_CMND 0x1
#define HCI_TYPE_DATA 0x2
#define HCI_TYPE_PATCH 0x3
#define HCI_TYPE_EVNT 0x4
#define HCI_EVENT_PATCHES_DRV_REQ (1)
#define HCI_EVENT_PATCHES_FW_REQ (2)
#define HCI_EVENT_PATCHES_BOOTLOAD_REQ (3)
#define HCI_CMND_WLAN_BASE (0x0000)
#define HCI_CMND_WLAN_CONNECT 0x0001
#define HCI_CMND_WLAN_DISCONNECT 0x0002
#define HCI_CMND_WLAN_IOCTL_SET_SCANPARAM 0x0003
#define HCI_CMND_WLAN_IOCTL_SET_CONNECTION_POLICY 0x0004
#define HCI_CMND_WLAN_IOCTL_ADD_PROFILE 0x0005
#define HCI_CMND_WLAN_IOCTL_DEL_PROFILE 0x0006
#define HCI_CMND_WLAN_IOCTL_GET_SCAN_RESULTS 0x0007
#define HCI_CMND_EVENT_MASK 0x0008
#define HCI_CMND_WLAN_IOCTL_STATUSGET 0x0009
#define HCI_CMND_WLAN_IOCTL_SIMPLE_CONFIG_START 0x000A
#define HCI_CMND_WLAN_IOCTL_SIMPLE_CONFIG_STOP 0x000B
#define HCI_CMND_WLAN_IOCTL_SIMPLE_CONFIG_SET_PREFIX 0x000C
#define HCI_CMND_WLAN_CONFIGURE_PATCH 0x000D
#define HCI_CMND_SOCKET_BASE 0x1000
#define HCI_CMND_SOCKET 0x1001
#define HCI_CMND_BIND 0x1002
#define HCI_CMND_RECV 0x1004
#define HCI_CMND_ACCEPT 0x1005
#define HCI_CMND_LISTEN 0x1006
#define HCI_CMND_CONNECT 0x1007
#define HCI_CMND_BSD_SELECT 0x1008
#define HCI_CMND_SETSOCKOPT 0x1009
#define HCI_CMND_GETSOCKOPT 0x100A
#define HCI_CMND_CLOSE_SOCKET 0x100B
#define HCI_CMND_RECVFROM 0x100D
#define HCI_CMND_GETHOSTNAME 0x1010
#define HCI_CMND_MDNS_ADVERTISE 0x1011
#define HCI_DATA_BASE 0x80
#define HCI_CMND_SEND (0x01 + HCI_DATA_BASE)
#define HCI_CMND_SENDTO (0x03 + HCI_DATA_BASE)
#define HCI_DATA_BSD_RECVFROM (0x04 + HCI_DATA_BASE)
#define HCI_DATA_BSD_RECV (0x05 + HCI_DATA_BASE)
#define HCI_CMND_NVMEM_CBASE (0x0200)
#define HCI_CMND_NVMEM_CREATE_ENTRY (0x0203)
#define HCI_CMND_NVMEM_SWAP_ENTRY (0x0205)
#define HCI_CMND_NVMEM_READ (0x0201)
#define HCI_CMND_NVMEM_WRITE (0x0090)
#define HCI_CMND_NVMEM_WRITE_PATCH (0x0204)
#define HCI_CMND_READ_SP_VERSION (0x0207)
#define HCI_CMND_READ_BUFFER_SIZE 0x400B
#define HCI_CMND_SIMPLE_LINK_START 0x4000
#define HCI_CMND_NETAPP_BASE 0x2000
#define HCI_NETAPP_DHCP (0x0001 + HCI_CMND_NETAPP_BASE)
#define HCI_NETAPP_PING_SEND (0x0002 + HCI_CMND_NETAPP_BASE)
#define HCI_NETAPP_PING_REPORT (0x0003 + HCI_CMND_NETAPP_BASE)
#define HCI_NETAPP_PING_STOP (0x0004 + HCI_CMND_NETAPP_BASE)
#define HCI_NETAPP_IPCONFIG (0x0005 + HCI_CMND_NETAPP_BASE)
#define HCI_NETAPP_ARP_FLUSH (0x0006 + HCI_CMND_NETAPP_BASE)
#define HCI_NETAPP_SET_DEBUG_LEVEL (0x0008 + HCI_CMND_NETAPP_BASE)
#define HCI_NETAPP_SET_TIMERS (0x0009 + HCI_CMND_NETAPP_BASE)
//*****************************************************************************
//
// Values that can be used as HCI Events defines
//
//*****************************************************************************
#define HCI_EVNT_WLAN_BASE 0x0000
#define HCI_EVNT_WLAN_CONNECT 0x0001
#define HCI_EVNT_WLAN_DISCONNECT \
0x0002
#define HCI_EVNT_WLAN_IOCTL_ADD_PROFILE \
0x0005
#define HCI_EVNT_SOCKET HCI_CMND_SOCKET
#define HCI_EVNT_BIND HCI_CMND_BIND
#define HCI_EVNT_RECV HCI_CMND_RECV
#define HCI_EVNT_ACCEPT HCI_CMND_ACCEPT
#define HCI_EVNT_LISTEN HCI_CMND_LISTEN
#define HCI_EVNT_CONNECT HCI_CMND_CONNECT
#define HCI_EVNT_SELECT HCI_CMND_BSD_SELECT
#define HCI_EVNT_CLOSE_SOCKET HCI_CMND_CLOSE_SOCKET
#define HCI_EVNT_RECVFROM HCI_CMND_RECVFROM
#define HCI_EVNT_SETSOCKOPT HCI_CMND_SETSOCKOPT
#define HCI_EVNT_GETSOCKOPT HCI_CMND_GETSOCKOPT
#define HCI_EVNT_BSD_GETHOSTBYNAME HCI_CMND_GETHOSTNAME
#define HCI_EVNT_MDNS_ADVERTISE HCI_CMND_MDNS_ADVERTISE
#define HCI_EVNT_SEND 0x1003
#define HCI_EVNT_WRITE 0x100E
#define HCI_EVNT_SENDTO 0x100F
#define HCI_EVNT_PATCHES_REQ 0x1000
#define HCI_EVNT_UNSOL_BASE 0x4000
#define HCI_EVNT_WLAN_UNSOL_BASE (0x8000)
#define HCI_EVNT_WLAN_UNSOL_CONNECT (0x0001 + HCI_EVNT_WLAN_UNSOL_BASE)
#define HCI_EVNT_WLAN_UNSOL_DISCONNECT (0x0002 + HCI_EVNT_WLAN_UNSOL_BASE)
#define HCI_EVNT_WLAN_UNSOL_INIT (0x0004 + HCI_EVNT_WLAN_UNSOL_BASE)
#define HCI_EVNT_WLAN_TX_COMPLETE (0x0008 + HCI_EVNT_WLAN_UNSOL_BASE)
#define HCI_EVNT_WLAN_UNSOL_DHCP (0x0010 + HCI_EVNT_WLAN_UNSOL_BASE)
#define HCI_EVNT_WLAN_ASYNC_PING_REPORT (0x0040 + HCI_EVNT_WLAN_UNSOL_BASE)
#define HCI_EVNT_WLAN_ASYNC_SIMPLE_CONFIG_DONE (0x0080 + HCI_EVNT_WLAN_UNSOL_BASE)
#define HCI_EVNT_WLAN_KEEPALIVE (0x0200 + HCI_EVNT_WLAN_UNSOL_BASE)
#define HCI_EVNT_BSD_TCP_CLOSE_WAIT (0x0800 + HCI_EVNT_WLAN_UNSOL_BASE)
#define HCI_EVNT_DATA_UNSOL_FREE_BUFF \
0x4100
#define HCI_EVNT_NVMEM_CREATE_ENTRY \
HCI_CMND_NVMEM_CREATE_ENTRY
#define HCI_EVNT_NVMEM_SWAP_ENTRY HCI_CMND_NVMEM_SWAP_ENTRY
#define HCI_EVNT_NVMEM_READ HCI_CMND_NVMEM_READ
#define HCI_EVNT_NVMEM_WRITE (0x0202)
#define HCI_EVNT_READ_SP_VERSION \
HCI_CMND_READ_SP_VERSION
#define HCI_EVNT_INPROGRESS 0xFFFF
#define HCI_DATA_RECVFROM 0x84
#define HCI_DATA_RECV 0x85
#define HCI_DATA_NVMEM 0x91
#define HCI_EVENT_CC3000_CAN_SHUT_DOWN 0x99
//*****************************************************************************
//
// Prototypes for the structures for APIs.
//
//*****************************************************************************
#define HCI_DATA_HEADER_SIZE (5)
#define HCI_EVENT_HEADER_SIZE (5)
#define HCI_DATA_CMD_HEADER_SIZE (5)
#define HCI_PATCH_HEADER_SIZE (6)
#define HCI_PACKET_TYPE_OFFSET (0)
#define HCI_PACKET_ARGSIZE_OFFSET (2)
#define HCI_PACKET_LENGTH_OFFSET (3)
#define HCI_EVENT_OPCODE_OFFSET (1)
#define HCI_EVENT_LENGTH_OFFSET (3)
#define HCI_EVENT_STATUS_OFFSET (4)
#define HCI_DATA_LENGTH_OFFSET (3)
//*****************************************************************************
//
// Prototypes for the APIs.
//
//*****************************************************************************
//*****************************************************************************
//
//! hci_command_send
//!
//! @param usOpcode command operation code
//! @param pucBuff pointer to the command's arguments buffer
//! @param ucArgsLength length of the arguments
//!
//! @return none
//!
//! @brief Initiate an HCI command.
//
//*****************************************************************************
extern unsigned short hci_command_send(unsigned short usOpcode,
unsigned char *ucArgs,
unsigned char ucArgsLength);
//*****************************************************************************
//
//! hci_data_send
//!
//! @param usOpcode command operation code
//! @param ucArgs pointer to the command's arguments buffer
//! @param usArgsLength length of the arguments
//! @param ucTail pointer to the data buffer
//! @param usTailLength buffer length
//!
//! @return none
//!
//! @brief Initiate an HCI data write operation
//
//*****************************************************************************
extern long hci_data_send(unsigned char ucOpcode,
unsigned char *ucArgs,
unsigned short usArgsLength,
unsigned short usDataLength,
const unsigned char *ucTail,
unsigned short usTailLength);
//*****************************************************************************
//
//! hci_data_command_send
//!
//! @param usOpcode command operation code
//! @param pucBuff pointer to the data buffer
//! @param ucArgsLength arguments length
//! @param ucDataLength data length
//!
//! @return none
//!
//! @brief Prepare HCI header and initiate an HCI data write operation
//
//*****************************************************************************
extern void hci_data_command_send(unsigned short usOpcode, unsigned char *pucBuff,
unsigned char ucArgsLength, unsigned short ucDataLength);
//*****************************************************************************
//
//! hci_patch_send
//!
//! @param usOpcode command operation code
//! @param pucBuff pointer to the command's arguments buffer
//! @param patch pointer to patch content buffer
//! @param usDataLength data length
//!
//! @return none
//!
//! @brief Prepare HCI header and initiate an HCI patch write operation
//
//*****************************************************************************
extern void hci_patch_send(unsigned char ucOpcode, unsigned char *pucBuff, char *patch, unsigned short usDataLength);
//*****************************************************************************
//
// Mark the end of the C bindings section for C++ compilers.
//
//*****************************************************************************
#ifdef __cplusplus
}
#endif // __cplusplus
#endif // __HCI_H__

View File

@ -1,55 +0,0 @@
/*****************************************************************************
*
* host_driver_version.h - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the
* distribution.
*
* Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*****************************************************************************/
#ifndef __HOST_DRIVER_VERSION_H__
#define __HOST_DRIVER_VERSION_H__
#define DRIVER_VERSION_NUMBER 13
#endif // __VERSION_H__

View File

@ -1,476 +0,0 @@
/*****************************************************************************
*
* netapp.c - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
*
* Adapted for use with the Arduino/AVR by KTOWN (Kevin Townsend)
* & Limor Fried for Adafruit Industries
* This library works with the Adafruit CC3000 breakout
* ----> https://www.adafruit.com/products/1469
* Adafruit invests time and resources providing this open source code,
* please support Adafruit and open-source hardware by purchasing
* products from Adafruit!
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the
* distribution.
*
* Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*****************************************************************************/
#include <string.h>
#include "netapp.h"
#include "hci.h"
#include "socket.h"
#include "evnt_handler.h"
#include "nvmem.h"
#define MIN_TIMER_VAL_SECONDS 20
#define MIN_TIMER_SET(t) if ((0 != t) && (t < MIN_TIMER_VAL_SECONDS)) \
{ \
t = MIN_TIMER_VAL_SECONDS; \
}
#define NETAPP_DHCP_PARAMS_LEN (20)
#define NETAPP_SET_TIMER_PARAMS_LEN (20)
#define NETAPP_SET_DEBUG_LEVEL_PARAMS_LEN (4)
#define NETAPP_PING_SEND_PARAMS_LEN (16)
//*****************************************************************************
//
//! netapp_config_mac_adrress
//!
//! @param mac device mac address, 6 bytes. Saved: yes
//!
//! @return return on success 0, otherwise error.
//!
//! @brief Configure device MAC address and store it in NVMEM.
//! The value of the MAC address configured through the API will
//! be stored in CC3000 non volatile memory, thus preserved
//! over resets.
//
//*****************************************************************************
long netapp_config_mac_adrress(unsigned char * mac)
{
return nvmem_set_mac_address(mac);
}
//*****************************************************************************
//
//! netapp_dhcp
//!
//! @param aucIP device mac address, 6 bytes. Saved: yes
//! @param aucSubnetMask device mac address, 6 bytes. Saved: yes
//! @param aucDefaultGateway device mac address, 6 bytes. Saved: yes
//! @param aucDNSServer device mac address, 6 bytes. Saved: yes
//!
//! @return return on success 0, otherwise error.
//!
//! @brief netapp_dhcp is used to configure the network interface,
//! static or dynamic (DHCP).\n In order to activate DHCP mode,
//! aucIP, aucSubnetMask, aucDefaultGateway must be 0.
//! The default mode of CC3000 is DHCP mode.
//! Note that the configuration is saved in non volatile memory
//! and thus preserved over resets.
//!
//! @note If the mode is altered a reset of CC3000 device is required
//! in order to apply changes.\nAlso note that asynchronous event
//! of DHCP_EVENT, which is generated when an IP address is
//! allocated either by the DHCP server or due to static
//! allocation is generated only upon a connection to the
//! AP was established.
//!
//*****************************************************************************
long netapp_dhcp(unsigned long *aucIP, unsigned long *aucSubnetMask,unsigned long *aucDefaultGateway, unsigned long *aucDNSServer)
{
signed char scRet;
unsigned char *ptr;
unsigned char *args;
scRet = EFAIL;
ptr = tSLInformation.pucTxCommandBuffer;
args = (ptr + HEADERS_SIZE_CMD);
// Fill in temporary command buffer
ARRAY_TO_STREAM(args,aucIP,4);
ARRAY_TO_STREAM(args,aucSubnetMask,4);
ARRAY_TO_STREAM(args,aucDefaultGateway,4);
args = UINT32_TO_STREAM(args, 0);
ARRAY_TO_STREAM(args,aucDNSServer,4);
// Initiate a HCI command
hci_command_send(HCI_NETAPP_DHCP, ptr, NETAPP_DHCP_PARAMS_LEN);
// Wait for command complete event
SimpleLinkWaitEvent(HCI_NETAPP_DHCP, &scRet);
return(scRet);
}
//*****************************************************************************
//
//! netapp_timeout_values
//!
//! @param aucDHCP DHCP lease time request, also impact
//! the DHCP renew timeout. Range: [0-0xffffffff] seconds,
//! 0 or 0xffffffff == infinity lease timeout.
//! Resolution:10 seconds. Influence: only after
//! reconnecting to the AP.
//! Minimal bound value: MIN_TIMER_VAL_SECONDS - 20 seconds.
//! The parameter is saved into the CC3000 NVMEM.
//! The default value on CC3000 is 14400 seconds.
//!
//! @param aucARP ARP refresh timeout, if ARP entry is not updated by
//! incoming packet, the ARP entry will be deleted by
//! the end of the timeout.
//! Range: [0-0xffffffff] seconds, 0 == infinity ARP timeout
//! Resolution: 10 seconds. Influence: on runtime.
//! Minimal bound value: MIN_TIMER_VAL_SECONDS - 20 seconds
//! The parameter is saved into the CC3000 NVMEM.
//! The default value on CC3000 is 3600 seconds.
//!
//! @param aucKeepalive Keepalive event sent by the end of keepalive timeout
//! Range: [0-0xffffffff] seconds, 0 == infinity timeout
//! Resolution: 10 seconds.
//! Influence: on runtime.
//! Minimal bound value: MIN_TIMER_VAL_SECONDS - 20 sec
//! The parameter is saved into the CC3000 NVMEM.
//! The default value on CC3000 is 10 seconds.
//!
//! @param aucInactivity Socket inactivity timeout, socket timeout is
//! refreshed by incoming or outgoing packet, by the
//! end of the socket timeout the socket will be closed
//! Range: [0-0xffffffff] sec, 0 == infinity timeout.
//! Resolution: 10 seconds. Influence: on runtime.
//! Minimal bound value: MIN_TIMER_VAL_SECONDS - 20 sec
//! The parameter is saved into the CC3000 NVMEM.
//! The default value on CC3000 is 60 seconds.
//!
//! @return return on success 0, otherwise error.
//!
//! @brief Set new timeout values. Function set new timeout values for:
//! DHCP lease timeout, ARP refresh timeout, keepalive event
//! timeout and socket inactivity timeout
//!
//! @note If a parameter set to non zero value which is less than 20s,
//! it will be set automatically to 20s.
//!
//*****************************************************************************
#ifndef CC3000_TINY_DRIVER
long
netapp_timeout_values(unsigned long *aucDHCP, unsigned long *aucARP,unsigned long *aucKeepalive, unsigned long *aucInactivity)
{
signed char scRet;
unsigned char *ptr;
unsigned char *args;
scRet = EFAIL;
ptr = tSLInformation.pucTxCommandBuffer;
args = (ptr + HEADERS_SIZE_CMD);
// Set minimal values of timers
MIN_TIMER_SET(*aucDHCP)
MIN_TIMER_SET(*aucARP)
MIN_TIMER_SET(*aucKeepalive)
MIN_TIMER_SET(*aucInactivity)
// Fill in temporary command buffer
args = UINT32_TO_STREAM(args, *aucDHCP);
args = UINT32_TO_STREAM(args, *aucARP);
args = UINT32_TO_STREAM(args, *aucKeepalive);
args = UINT32_TO_STREAM(args, *aucInactivity);
// Initiate a HCI command
hci_command_send(HCI_NETAPP_SET_TIMERS, ptr, NETAPP_SET_TIMER_PARAMS_LEN);
// Wait for command complete event
SimpleLinkWaitEvent(HCI_NETAPP_SET_TIMERS, &scRet);
return(scRet);
}
#endif
//*****************************************************************************
//
//! netapp_ping_send
//!
//! @param ip destination IP address
//! @param pingAttempts number of echo requests to send
//! @param pingSize send buffer size which may be up to 1400 bytes
//! @param pingTimeout Time to wait for a response,in milliseconds.
//!
//! @return return on success 0, otherwise error.
//!
//! @brief send ICMP ECHO_REQUEST to network hosts
//!
//! @note If an operation finished successfully asynchronous ping report
//! event will be generated. The report structure is as defined
//! by structure netapp_pingreport_args_t.
//!
//! @warning Calling this function while a previous Ping Requests are in
//! progress will stop the previous ping request.
//*****************************************************************************
#ifndef CC3000_TINY_DRIVER
long
netapp_ping_send(uint32_t *ip, uint32_t ulPingAttempts, uint32_t ulPingSize, uint32_t ulPingTimeout)
{
signed char scRet;
unsigned char *ptr, *args;
scRet = EFAIL;
ptr = tSLInformation.pucTxCommandBuffer;
args = (ptr + HEADERS_SIZE_CMD);
// Fill in temporary command buffer
args = UINT32_TO_STREAM(args, *ip);
args = UINT32_TO_STREAM(args, ulPingAttempts);
args = UINT32_TO_STREAM(args, ulPingSize);
args = UINT32_TO_STREAM(args, ulPingTimeout);
/*
if (CC3KPrinter != 0)
{
for(uint8_t i=0; i<4+4+4+4; i++) {
CC3KPrinter->print(" 0x"); CC3KPrinter->( (ptr + HEADERS_SIZE_CMD)[i], HEX);
}
}
*/
// Initiate a HCI command
hci_command_send(HCI_NETAPP_PING_SEND, ptr, NETAPP_PING_SEND_PARAMS_LEN);
// Wait for command complete event
SimpleLinkWaitEvent(HCI_NETAPP_PING_SEND, &scRet);
return(scRet);
}
#endif
//*****************************************************************************
//
//! netapp_ping_report
//!
//! @param none
//!
//! @return none
//!
//! @brief Request for ping status. This API triggers the CC3000 to send
//! asynchronous events: HCI_EVNT_WLAN_ASYNC_PING_REPORT.
//! This event will carry the report structure:
//! netapp_pingreport_args_t. This structure is filled in with ping
//! results up till point of triggering API.
//! netapp_pingreport_args_t:\n packets_sent - echo sent,
//! packets_received - echo reply, min_round_time - minimum
//! round time, max_round_time - max round time,
//! avg_round_time - average round time
//!
//! @note When a ping operation is not active, the returned structure
//! fields are 0.
//!
//*****************************************************************************
#ifndef CC3000_TINY_DRIVER
void netapp_ping_report()
{
unsigned char *ptr;
ptr = tSLInformation.pucTxCommandBuffer;
signed char scRet;
scRet = EFAIL;
// Initiate a HCI command
hci_command_send(HCI_NETAPP_PING_REPORT, ptr, 0);
// Wait for command complete event
SimpleLinkWaitEvent(HCI_NETAPP_PING_REPORT, &scRet);
}
#endif
//*****************************************************************************
//
//! netapp_ping_stop
//!
//! @param none
//!
//! @return On success, zero is returned. On error, -1 is returned.
//!
//! @brief Stop any ping request.
//!
//!
//*****************************************************************************
#ifndef CC3000_TINY_DRIVER
long netapp_ping_stop()
{
signed char scRet;
unsigned char *ptr;
scRet = EFAIL;
ptr = tSLInformation.pucTxCommandBuffer;
// Initiate a HCI command
hci_command_send(HCI_NETAPP_PING_STOP, ptr, 0);
// Wait for command complete event
SimpleLinkWaitEvent(HCI_NETAPP_PING_STOP, &scRet);
return(scRet);
}
#endif
//*****************************************************************************
//
//! netapp_ipconfig
//!
//! @param[out] ipconfig This argument is a pointer to a
//! tNetappIpconfigRetArgs structure. This structure is
//! filled in with the network interface configuration.
//! tNetappIpconfigRetArgs:\n aucIP - ip address,
//! aucSubnetMask - mask, aucDefaultGateway - default
//! gateway address, aucDHCPServer - dhcp server address
//! aucDNSServer - dns server address, uaMacAddr - mac
//! address, uaSSID - connected AP ssid
//!
//! @return none
//!
//! @brief Obtain the CC3000 Network interface information.
//! Note that the information is available only after the WLAN
//! connection was established. Calling this function before
//! associated, will cause non-defined values to be returned.
//!
//! @note The function is useful for figuring out the IP Configuration of
//! the device when DHCP is used and for figuring out the SSID of
//! the Wireless network the device is associated with.
//!
//*****************************************************************************
#ifndef CC3000_TINY_DRIVER
void netapp_ipconfig( tNetappIpconfigRetArgs * ipconfig )
{
unsigned char *ptr;
ptr = tSLInformation.pucTxCommandBuffer;
// Initiate a HCI command
hci_command_send(HCI_NETAPP_IPCONFIG, ptr, 0);
// Wait for command complete event
SimpleLinkWaitEvent(HCI_NETAPP_IPCONFIG, ipconfig );
}
#else
void netapp_ipconfig( tNetappIpconfigRetArgs * ipconfig )
{
}
#endif
//*****************************************************************************
//
//! netapp_arp_flush
//!
//! @param none
//!
//! @return none
//!
//! @brief Flushes ARP table
//!
//*****************************************************************************
#ifndef CC3000_TINY_DRIVER
long netapp_arp_flush(void)
{
signed char scRet;
unsigned char *ptr;
scRet = EFAIL;
ptr = tSLInformation.pucTxCommandBuffer;
// Initiate a HCI command
hci_command_send(HCI_NETAPP_ARP_FLUSH, ptr, 0);
// Wait for command complete event
SimpleLinkWaitEvent(HCI_NETAPP_ARP_FLUSH, &scRet);
return(scRet);
}
#endif
//*****************************************************************************
//
//! netapp_set_debug_level
//!
//! @param[in] level debug level. Bitwise [0-8],
//! 0(disable)or 1(enable).\n Bitwise map: 0 - Critical
//! message, 1 information message, 2 - core messages, 3 -
//! HCI messages, 4 - Network stack messages, 5 - wlan
//! messages, 6 - wlan driver messages, 7 - epprom messages,
//! 8 - general messages. Default: 0x13f. Saved: no
//!
//! @return On success, zero is returned. On error, -1 is returned
//!
//! @brief Debug messages sent via the UART debug channel, this function
//! enable/disable the debug level
//!
//*****************************************************************************
#ifndef CC3000_TINY_DRIVER
long netapp_set_debug_level(unsigned long ulLevel)
{
signed char scRet;
unsigned char *ptr, *args;
scRet = EFAIL;
ptr = tSLInformation.pucTxCommandBuffer;
args = (ptr + HEADERS_SIZE_CMD);
//
// Fill in temporary command buffer
//
args = UINT32_TO_STREAM(args, ulLevel);
//
// Initiate a HCI command
//
hci_command_send(HCI_NETAPP_SET_DEBUG_LEVEL, ptr, NETAPP_SET_DEBUG_LEVEL_PARAMS_LEN);
//
// Wait for command complete event
//
SimpleLinkWaitEvent(HCI_NETAPP_SET_DEBUG_LEVEL, &scRet);
return(scRet);
}
#endif

View File

@ -1,353 +0,0 @@
/*****************************************************************************
*
* netapp.h - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
*
* Adapted for use with the Arduino/AVR by KTOWN (Kevin Townsend)
* & Limor Fried for Adafruit Industries
* This library works with the Adafruit CC3000 breakout
* ----> https://www.adafruit.com/products/1469
* Adafruit invests time and resources providing this open source code,
* please support Adafruit and open-source hardware by purchasing
* products from Adafruit!
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the
* distribution.
*
* Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*****************************************************************************/
#ifndef __NETAPP_H__
#define __NETAPP_H__
#include <Arduino.h>
//*****************************************************************************
//
// If building with a C++ compiler, make all of the definitions in this header
// have a C binding.
//
//*****************************************************************************
#ifdef __cplusplus
extern "C" {
#endif
//*****************************************************************************
//
//! \addtogroup netapp_api
//! @{
//
//*****************************************************************************
typedef struct _netapp_dhcp_ret_args_t
{
unsigned char aucIP[4];
unsigned char aucSubnetMask[4];
unsigned char aucDefaultGateway[4];
unsigned char aucDHCPServer[4];
unsigned char aucDNSServer[4];
}tNetappDhcpParams;
typedef struct _netapp_ipconfig_ret_args_t
{
unsigned char aucIP[4];
unsigned char aucSubnetMask[4];
unsigned char aucDefaultGateway[4];
unsigned char aucDHCPServer[4];
unsigned char aucDNSServer[4];
unsigned char uaMacAddr[6];
unsigned char uaSSID[32];
}tNetappIpconfigRetArgs;
/*Ping send report parameters*/
typedef struct _netapp_pingreport_args
{
unsigned long packets_sent;
unsigned long packets_received;
unsigned long min_round_time;
unsigned long max_round_time;
unsigned long avg_round_time;
} netapp_pingreport_args_t;
//*****************************************************************************
//
//! netapp_config_mac_adrress
//!
//! @param mac device mac address, 6 bytes. Saved: yes
//!
//! @return return on success 0, otherwise error.
//!
//! @brief Configure device MAC address and store it in NVMEM.
//! The value of the MAC address configured through the API will
//! be stored in CC3000 non volatile memory, thus preserved
//! over resets.
//
//*****************************************************************************
extern long netapp_config_mac_adrress( unsigned char *mac );
//*****************************************************************************
//
//! netapp_dhcp
//!
//! @param aucIP device mac address, 6 bytes. Saved: yes
//! @param aucSubnetMask device mac address, 6 bytes. Saved: yes
//! @param aucDefaultGateway device mac address, 6 bytes. Saved: yes
//! @param aucDNSServer device mac address, 6 bytes. Saved: yes
//!
//! @return return on success 0, otherwise error.
//!
//! @brief netapp_dhcp is used to configure the network interface,
//! static or dynamic (DHCP).\n In order to activate DHCP mode,
//! aucIP, aucSubnetMask, aucDefaultGateway must be 0.
//! The default mode of CC3000 is DHCP mode.
//! Note that the configuration is saved in non volatile memory
//! and thus preserved over resets.
//!
//! @note If the mode is altered a reset of CC3000 device is required
//! in order to apply changes.\nAlso note that asynchronous event
//! of DHCP_EVENT, which is generated when an IP address is
//! allocated either by the DHCP server or due to static
//! allocation is generated only upon a connection to the
//! AP was established.
//!
//*****************************************************************************
extern long netapp_dhcp(unsigned long *aucIP, unsigned long *aucSubnetMask,unsigned long *aucDefaultGateway, unsigned long *aucDNSServer);
//*****************************************************************************
//
//! netapp_timeout_values
//!
//! @param aucDHCP DHCP lease time request, also impact
//! the DHCP renew timeout. Range: [0-0xffffffff] seconds,
//! 0 or 0xffffffff == infinity lease timeout.
//! Resolution:10 seconds. Influence: only after
//! reconnecting to the AP.
//! Minimal bound value: MIN_TIMER_VAL_SECONDS - 20 seconds.
//! The parameter is saved into the CC3000 NVMEM.
//! The default value on CC3000 is 14400 seconds.
//!
//! @param aucARP ARP refresh timeout, if ARP entry is not updated by
//! incoming packet, the ARP entry will be deleted by
//! the end of the timeout.
//! Range: [0-0xffffffff] seconds, 0 == infinity ARP timeout
//! Resolution: 10 seconds. Influence: on runtime.
//! Minimal bound value: MIN_TIMER_VAL_SECONDS - 20 seconds
//! The parameter is saved into the CC3000 NVMEM.
//! The default value on CC3000 is 3600 seconds.
//!
//! @param aucKeepalive Keepalive event sent by the end of keepalive timeout
//! Range: [0-0xffffffff] seconds, 0 == infinity timeout
//! Resolution: 10 seconds.
//! Influence: on runtime.
//! Minimal bound value: MIN_TIMER_VAL_SECONDS - 20 sec
//! The parameter is saved into the CC3000 NVMEM.
//! The default value on CC3000 is 10 seconds.
//!
//! @param aucInactivity Socket inactivity timeout, socket timeout is
//! refreshed by incoming or outgoing packet, by the
//! end of the socket timeout the socket will be closed
//! Range: [0-0xffffffff] sec, 0 == infinity timeout.
//! Resolution: 10 seconds. Influence: on runtime.
//! Minimal bound value: MIN_TIMER_VAL_SECONDS - 20 sec
//! The parameter is saved into the CC3000 NVMEM.
//! The default value on CC3000 is 60 seconds.
//!
//! @return return on success 0, otherwise error.
//!
//! @brief Set new timeout values. Function set new timeout values for:
//! DHCP lease timeout, ARP refresh timeout, keepalive event
//! timeout and socket inactivity timeout
//!
//! @note If a parameter set to non zero value which is less than 20s,
//! it will be set automatically to 20s.
//!
//*****************************************************************************
#ifndef CC3000_TINY_DRIVER
extern long netapp_timeout_values(unsigned long *aucDHCP, unsigned long *aucARP,unsigned long *aucKeepalive, unsigned long *aucInactivity);
#endif
//*****************************************************************************
//
//! netapp_ping_send
//!
//! @param ip destination IP address
//! @param pingAttempts number of echo requests to send
//! @param pingSize send buffer size which may be up to 1400 bytes
//! @param pingTimeout Time to wait for a response,in milliseconds.
//!
//! @return return on success 0, otherwise error.
//!
//! @brief send ICMP ECHO_REQUEST to network hosts
//!
//! @note If an operation finished successfully asynchronous ping report
//! event will be generated. The report structure is as defined
//! by structure netapp_pingreport_args_t.
//!
//! @warning Calling this function while a previous Ping Requests are in
//! progress will stop the previous ping request.
//*****************************************************************************
#ifndef CC3000_TINY_DRIVER
extern long netapp_ping_send(uint32_t *ip, uint32_t ulPingAttempts, uint32_t ulPingSize, uint32_t ulPingTimeout);
#endif
//*****************************************************************************
//
//! netapp_ping_stop
//!
//! @param none
//!
//! @return On success, zero is returned. On error, -1 is returned.
//!
//! @brief Stop any ping request.
//!
//!
//*****************************************************************************
#ifndef CC3000_TINY_DRIVER
extern long netapp_ping_stop();
#endif
//*****************************************************************************
//
//! netapp_ping_report
//!
//! @param none
//!
//! @return none
//!
//! @brief Request for ping status. This API triggers the CC3000 to send
//! asynchronous events: HCI_EVNT_WLAN_ASYNC_PING_REPORT.
//! This event will carry the report structure:
//! netapp_pingreport_args_t. This structure is filled in with ping
//! results up till point of triggering API.
//! netapp_pingreport_args_t:\n packets_sent - echo sent,
//! packets_received - echo reply, min_round_time - minimum
//! round time, max_round_time - max round time,
//! avg_round_time - average round time
//!
//! @note When a ping operation is not active, the returned structure
//! fields are 0.
//!
//*****************************************************************************
#ifndef CC3000_TINY_DRIVER
extern void netapp_ping_report();
#endif
//*****************************************************************************
//
//! netapp_ipconfig
//!
//! @param[out] ipconfig This argument is a pointer to a
//! tNetappIpconfigRetArgs structure. This structure is
//! filled in with the network interface configuration.
//! tNetappIpconfigRetArgs:\n aucIP - ip address,
//! aucSubnetMask - mask, aucDefaultGateway - default
//! gateway address, aucDHCPServer - dhcp server address
//! aucDNSServer - dns server address, uaMacAddr - mac
//! address, uaSSID - connected AP ssid
//!
//! @return none
//!
//! @brief Obtain the CC3000 Network interface information.
//! Note that the information is available only after the WLAN
//! connection was established. Calling this function before
//! associated, will cause non-defined values to be returned.
//!
//! @note The function is useful for figuring out the IP Configuration of
//! the device when DHCP is used and for figuring out the SSID of
//! the Wireless network the device is associated with.
//!
//*****************************************************************************
extern void netapp_ipconfig( tNetappIpconfigRetArgs * ipconfig );
//*****************************************************************************
//
//! netapp_arp_flush
//!
//! @param none
//!
//! @return none
//!
//! @brief Flushes ARP table
//!
//*****************************************************************************
#ifndef CC3000_TINY_DRIVER
extern long netapp_arp_flush();
#endif
//*****************************************************************************
//
//! netapp_set_debug_level
//!
//! @param[in] level debug level. Bitwise [0-8],
//! 0(disable)or 1(enable).\n Bitwise map: 0 - Critical
//! message, 1 information message, 2 - core messages, 3 -
//! HCI messages, 4 - Network stack messages, 5 - wlan
//! messages, 6 - wlan driver messages, 7 - epprom messages,
//! 8 - general messages. Default: 0x13f. Saved: no
//!
//! @return On success, zero is returned. On error, -1 is returned
//!
//! @brief Debug messages sent via the UART debug channel, this function
//! enable/disable the debug level
//!
//*****************************************************************************
#ifndef CC3000_TINY_DRIVER
long netapp_set_debug_level(unsigned long ulLevel);
#endif
//*****************************************************************************
//
// Close the Doxygen group.
//! @}
//
//*****************************************************************************
//*****************************************************************************
//
// Mark the end of the C bindings section for C++ compilers.
//
//*****************************************************************************
#ifdef __cplusplus
}
#endif // __cplusplus
extern Print* CC3KPrinter;
#endif // __NETAPP_H__

View File

@ -1,376 +0,0 @@
/*****************************************************************************
*
* nvmem.c - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
*
* Adapted for use with the Arduino/AVR by KTOWN (Kevin Townsend)
* & Limor Fried for Adafruit Industries
* This library works with the Adafruit CC3000 breakout
* ----> https://www.adafruit.com/products/1469
* Adafruit invests time and resources providing this open source code,
* please support Adafruit and open-source hardware by purchasing
* products from Adafruit!
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the
* distribution.
*
* Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*****************************************************************************/
//*****************************************************************************
//
//! \addtogroup nvmem_api
//! @{
//
//*****************************************************************************
#include <stdio.h>
#include <string.h>
#include <avr/pgmspace.h>
#ifdef __AVR__
#include <avr/io.h>
#endif
#include "nvmem.h"
#include "hci.h"
#include "socket.h"
#include "evnt_handler.h"
#include "debug.h"
//*****************************************************************************
//
// Prototypes for the structures for APIs.
//
//*****************************************************************************
#define NVMEM_READ_PARAMS_LEN (12)
#define NVMEM_CREATE_PARAMS_LEN (8)
#define NVMEM_WRITE_PARAMS_LEN (16)
//*****************************************************************************
//
//! nvmem_read
//!
//! @param ulFileId nvmem file id:\n
//! NVMEM_NVS_FILEID, NVMEM_NVS_SHADOW_FILEID,
//! NVMEM_WLAN_CONFIG_FILEID, NVMEM_WLAN_CONFIG_SHADOW_FILEID,
//! NVMEM_WLAN_DRIVER_SP_FILEID, NVMEM_WLAN_FW_SP_FILEID,
//! NVMEM_MAC_FILEID, NVMEM_FRONTEND_VARS_FILEID,
//! NVMEM_IP_CONFIG_FILEID, NVMEM_IP_CONFIG_SHADOW_FILEID,
//! NVMEM_BOOTLOADER_SP_FILEID, NVMEM_RM_FILEID,
//! and user files 12-15.
//! @param ulLength number of bytes to read
//! @param ulOffset ulOffset in file from where to read
//! @param buff output buffer pointer
//!
//! @return number of bytes read, otherwise error.
//!
//! @brief Reads data from the file referred by the ulFileId parameter.
//! Reads data from file ulOffset till length. Err if the file can't
//! be used, is invalid, or if the read is out of bounds.
//!
//*****************************************************************************
signed long
nvmem_read(unsigned long ulFileId, unsigned long ulLength, unsigned long ulOffset, unsigned char *buff)
{
unsigned char ucStatus = 0xFF;
unsigned char *ptr;
unsigned char *args;
ptr = tSLInformation.pucTxCommandBuffer;
args = (ptr + HEADERS_SIZE_CMD);
// Fill in HCI packet structure
args = UINT32_TO_STREAM(args, ulFileId);
args = UINT32_TO_STREAM(args, ulLength);
args = UINT32_TO_STREAM(args, ulOffset);
// Initiate a HCI command
hci_command_send(HCI_CMND_NVMEM_READ, ptr, NVMEM_READ_PARAMS_LEN);
SimpleLinkWaitEvent(HCI_CMND_NVMEM_READ, &ucStatus);
// In case there is data - read it - even if an error code is returned
// Note: It is the user responsibility to ignore the data in case of an error code
// Wait for the data in a synchronous way. Here we assume that the buffer is
// big enough to store also parameters of nvmem
SimpleLinkWaitData(buff, 0, 0);
return(ucStatus);
}
//*****************************************************************************
//
//! nvmem_write
//!
//! @param ulFileId nvmem file id:\n
//! NVMEM_WLAN_DRIVER_SP_FILEID, NVMEM_WLAN_FW_SP_FILEID,
//! NVMEM_MAC_FILEID, NVMEM_BOOTLOADER_SP_FILEID,
//! and user files 12-15.
//! @param ulLength number of bytes to write
//! @param ulEntryOffset offset in file to start write operation from
//! @param buff data to write
//!
//! @return on success 0, error otherwise.
//!
//! @brief Write data to nvmem.
//! writes data to file referred by the ulFileId parameter.
//! Writes data to file ulOffset till ulLength.The file id will be
//! marked invalid till the write is done. The file entry doesn't
//! need to be valid - only allocated.
//!
//*****************************************************************************
signed long
nvmem_write(unsigned long ulFileId, unsigned long ulLength, unsigned long
ulEntryOffset, unsigned char *buff)
{
long iRes;
unsigned char *ptr;
unsigned char *args;
iRes = EFAIL;
ptr = tSLInformation.pucTxCommandBuffer;
args = (ptr + SPI_HEADER_SIZE + HCI_DATA_CMD_HEADER_SIZE);
// Fill in HCI packet structure
args = UINT32_TO_STREAM(args, ulFileId);
args = UINT32_TO_STREAM(args, 12);
args = UINT32_TO_STREAM(args, ulLength);
args = UINT32_TO_STREAM(args, ulEntryOffset);
memcpy((ptr + SPI_HEADER_SIZE + HCI_DATA_CMD_HEADER_SIZE +
NVMEM_WRITE_PARAMS_LEN),buff,ulLength);
#if (DEBUG_MODE == 1)
PRINT_F("Writing:\t");
for (uint8_t i=0; i<ulLength; i++) {
PRINT_F("0x");
printHex(buff[i]);
PRINT_F(", ");
}
PRINT_F("\n\r");
#endif
// Initiate a HCI command but it will come on data channel
hci_data_command_send(HCI_CMND_NVMEM_WRITE, ptr, NVMEM_WRITE_PARAMS_LEN,
ulLength);
SimpleLinkWaitEvent(HCI_EVNT_NVMEM_WRITE, &iRes);
return(iRes);
}
//*****************************************************************************
//
//! nvmem_set_mac_address
//!
//! @param mac mac address to be set
//!
//! @return on success 0, error otherwise.
//!
//! @brief Write MAC address to EEPROM.
//! mac address as appears over the air (OUI first)
//!
//*****************************************************************************
unsigned char nvmem_set_mac_address(unsigned char *mac)
{
return nvmem_write(NVMEM_MAC_FILEID, MAC_ADDR_LEN, 0, mac);
}
//*****************************************************************************
//
//! nvmem_get_mac_address
//!
//! @param[out] mac mac address
//!
//! @return on success 0, error otherwise.
//!
//! @brief Read MAC address from EEPROM.
//! mac address as appears over the air (OUI first)
//!
//*****************************************************************************
unsigned char nvmem_get_mac_address(unsigned char *mac)
{
return nvmem_read(NVMEM_MAC_FILEID, MAC_ADDR_LEN, 0, mac);
}
//*****************************************************************************
//
//! nvmem_write_patch
//!
//! @param ulFileId nvmem file id:\n
//! NVMEM_WLAN_DRIVER_SP_FILEID, NVMEM_WLAN_FW_SP_FILEID,
//! @param spLength number of bytes to write
//! @param spData SP data to write
//!
//! @return on success 0, error otherwise.
//!
//! @brief program a patch to a specific file ID.
//! The SP data is assumed to be organized in 2-dimensional.
//! Each line is SP_PORTION_SIZE bytes long. Actual programming is
//! applied in SP_PORTION_SIZE bytes portions.
//!
//*****************************************************************************
unsigned char nvmem_write_patch(unsigned long ulFileId, unsigned long spLength, const uint8_t *spData)
{
unsigned char status = 0;
unsigned short offset = 0;
unsigned char* spDataPtr = (unsigned char*)spData;
uint8_t rambuffer[SP_PORTION_SIZE];
while ((status == 0) && (spLength >= SP_PORTION_SIZE))
{
for (uint8_t i=0; i<SP_PORTION_SIZE; i++) {
rambuffer[i] = pgm_read_byte(spData + i + offset);
}
#if (DEBUG_MODE == 1)
PRINT_F("Writing: "); printDec16(offset); PRINT_F("\t");
for (uint8_t i=0; i<SP_PORTION_SIZE; i++) {
PRINT_F("0x");
printHex(rambuffer[i]);
PRINT_F(", ");
}
PRINT_F("\n\r");
#endif
status = nvmem_write(ulFileId, SP_PORTION_SIZE, offset, rambuffer);
offset += SP_PORTION_SIZE;
spLength -= SP_PORTION_SIZE;
spDataPtr += SP_PORTION_SIZE;
}
if (status !=0)
{
// NVMEM error occurred
return status;
}
if (spLength != 0)
{
memcpy_P(rambuffer, spDataPtr, SP_PORTION_SIZE);
// if reached here, a reminder is left
status = nvmem_write(ulFileId, spLength, offset, rambuffer);
}
return status;
}
//*****************************************************************************
//
//! nvmem_read_sp_version
//!
//! @param[out] patchVer first number indicates package ID and the second
//! number indicates package build number
//!
//! @return on success 0, error otherwise.
//!
//! @brief Read patch version. read package version (WiFi FW patch,
//! driver-supplicant-NS patch, bootloader patch)
//!
//*****************************************************************************
#ifndef CC3000_TINY_DRIVER
uint8_t nvmem_read_sp_version(uint8_t* patchVer)
{
uint8_t *ptr;
// 1st byte is the status and the rest is the SP version
uint8_t retBuf[5];
ptr = tSLInformation.pucTxCommandBuffer;
// Initiate a HCI command, no args are required
hci_command_send(HCI_CMND_READ_SP_VERSION, ptr, 0);
SimpleLinkWaitEvent(HCI_CMND_READ_SP_VERSION, retBuf);
// package ID
*patchVer = retBuf[3];
// package build number
*(patchVer+1) = retBuf[4];
return(retBuf[0]);
}
#endif
//*****************************************************************************
//
//! nvmem_create_entry
//!
//! @param ulFileId nvmem file Id:\n
//! * NVMEM_AES128_KEY_FILEID: 12
//! * NVMEM_SHARED_MEM_FILEID: 13
//! * and fileIDs 14 and 15
//! @param ulNewLen entry ulLength
//!
//! @return on success 0, error otherwise.
//!
//! @brief Create new file entry and allocate space on the NVMEM.
//! Applies only to user files.
//! Modify the size of file.
//! If the entry is unallocated - allocate it to size
//! ulNewLen (marked invalid).
//! If it is allocated then deallocate it first.
//! To just mark the file as invalid without resizing -
//! set ulNewLen=0.
//!
//*****************************************************************************
int8_t
nvmem_create_entry(unsigned long ulFileId, unsigned long ulNewLen)
{
unsigned char *ptr;
unsigned char *args;
int8_t retval;
ptr = tSLInformation.pucTxCommandBuffer;
args = (ptr + HEADERS_SIZE_CMD);
// Fill in HCI packet structure
args = UINT32_TO_STREAM(args, ulFileId);
args = UINT32_TO_STREAM(args, ulNewLen);
// Initiate a HCI command
hci_command_send(HCI_CMND_NVMEM_CREATE_ENTRY,ptr, NVMEM_CREATE_PARAMS_LEN);
SimpleLinkWaitEvent(HCI_CMND_NVMEM_CREATE_ENTRY, &retval);
return(retval);
}
//*****************************************************************************
//
// Close the Doxygen group.
//! @}
//
//*****************************************************************************

View File

@ -1,256 +0,0 @@
/*****************************************************************************
*
* nvmem.h - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
*
* Adapted for use with the Arduino/AVR by KTOWN (Kevin Townsend)
* & Limor Fried for Adafruit Industries
* This library works with the Adafruit CC3000 breakout
* ----> https://www.adafruit.com/products/1469
* Adafruit invests time and resources providing this open source code,
* please support Adafruit and open-source hardware by purchasing
* products from Adafruit!
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the
* distribution.
*
* Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*****************************************************************************/
#ifndef __NVRAM_H__
#define __NVRAM_H__
#include "cc3000_common.h"
//*****************************************************************************
//
// If building with a C++ compiler, make all of the definitions in this header
// have a C binding.
//
//*****************************************************************************
#ifdef __cplusplus
extern "C" {
#endif
//*****************************************************************************
//
//! \addtogroup nvmem_api
//! @{
//
//*****************************************************************************
/****************************************************************************
**
** Definitions for File IDs
**
****************************************************************************/
/* NVMEM file ID - system files*/
#define NVMEM_NVS_FILEID (0)
#define NVMEM_NVS_SHADOW_FILEID (1)
#define NVMEM_WLAN_CONFIG_FILEID (2)
#define NVMEM_WLAN_CONFIG_SHADOW_FILEID (3)
#define NVMEM_WLAN_DRIVER_SP_FILEID (4)
#define NVMEM_WLAN_FW_SP_FILEID (5)
#define NVMEM_MAC_FILEID (6)
#define NVMEM_FRONTEND_VARS_FILEID (7)
#define NVMEM_IP_CONFIG_FILEID (8)
#define NVMEM_IP_CONFIG_SHADOW_FILEID (9)
#define NVMEM_BOOTLOADER_SP_FILEID (10)
#define NVMEM_RM_FILEID (11)
/* NVMEM file ID - user files*/
#define NVMEM_AES128_KEY_FILEID (12)
#define NVMEM_SHARED_MEM_FILEID (13)
/* max entry in order to invalid nvmem */
#define NVMEM_MAX_ENTRY (16)
//*****************************************************************************
//
//! nvmem_read
//!
//! @param ulFileId nvmem file id:\n
//! NVMEM_NVS_FILEID, NVMEM_NVS_SHADOW_FILEID,
//! NVMEM_WLAN_CONFIG_FILEID, NVMEM_WLAN_CONFIG_SHADOW_FILEID,
//! NVMEM_WLAN_DRIVER_SP_FILEID, NVMEM_WLAN_FW_SP_FILEID,
//! NVMEM_MAC_FILEID, NVMEM_FRONTEND_VARS_FILEID,
//! NVMEM_IP_CONFIG_FILEID, NVMEM_IP_CONFIG_SHADOW_FILEID,
//! NVMEM_BOOTLOADER_SP_FILEID, NVMEM_RM_FILEID,
//! and user files 12-15.
//! @param ulLength number of bytes to read
//! @param ulOffset ulOffset in file from where to read
//! @param buff output buffer pointer
//!
//! @return number of bytes read, otherwise error.
//!
//! @brief Reads data from the file referred by the ulFileId parameter.
//! Reads data from file ulOffset till length. Err if the file can't
//! be used, is invalid, or if the read is out of bounds.
//!
//*****************************************************************************
extern signed long nvmem_read(unsigned long file_id, unsigned long length, unsigned long offset, unsigned char *buff);
//*****************************************************************************
//
//! nvmem_write
//!
//! @param ulFileId nvmem file id:\n
//! NVMEM_WLAN_DRIVER_SP_FILEID, NVMEM_WLAN_FW_SP_FILEID,
//! NVMEM_MAC_FILEID, NVMEM_BOOTLOADER_SP_FILEID,
//! and user files 12-15.
//! @param ulLength number of bytes to write
//! @param ulEntryOffset offset in file to start write operation from
//! @param buff data to write
//!
//! @return on success 0, error otherwise.
//!
//! @brief Write data to nvmem.
//! writes data to file referred by the ulFileId parameter.
//! Writes data to file ulOffset till ulLength.The file id will be
//! marked invalid till the write is done. The file entry doesn't
//! need to be valid - only allocated.
//!
//*****************************************************************************
extern signed long nvmem_write(unsigned long ulFileId, unsigned long ulLength, unsigned long ulEntryOffset, unsigned char *buff);
//*****************************************************************************
//
//! nvmem_set_mac_address
//!
//! @param mac mac address to be set
//!
//! @return on success 0, error otherwise.
//!
//! @brief Write MAC address to EEPROM.
//! mac address as appears over the air (OUI first)
//!
//*****************************************************************************
extern unsigned char nvmem_set_mac_address(unsigned char *mac);
//*****************************************************************************
//
//! nvmem_get_mac_address
//!
//! @param[out] mac mac address
//!
//! @return on success 0, error otherwise.
//!
//! @brief Read MAC address from EEPROM.
//! mac address as appears over the air (OUI first)
//!
//*****************************************************************************
extern unsigned char nvmem_get_mac_address(unsigned char *mac);
//*****************************************************************************
//
//! nvmem_write_patch
//!
//! @param ulFileId nvmem file id:\n
//! NVMEM_WLAN_DRIVER_SP_FILEID, NVMEM_WLAN_FW_SP_FILEID,
//! @param spLength number of bytes to write
//! @param spData SP data to write
//!
//! @return on success 0, error otherwise.
//!
//! @brief program a patch to a specific file ID.
//! The SP data is assumed to be organized in 2-dimensional.
//! Each line is SP_PORTION_SIZE bytes long. Actual programming is
//! applied in SP_PORTION_SIZE bytes portions.
//!
//*****************************************************************************
extern unsigned char nvmem_write_patch(unsigned long ulFileId, unsigned long spLength, const unsigned char *spData);
//*****************************************************************************
//
//! nvmem_read_sp_version
//!
//! @param[out] patchVer first number indicates package ID and the second
//! number indicates package build number
//!
//! @return on success 0, error otherwise.
//!
//! @brief Read patch version. read package version (WiFi FW patch,
//! driver-supplicant-NS patch, bootloader patch)
//!
//*****************************************************************************
#ifndef CC3000_TINY_DRIVER
extern unsigned char nvmem_read_sp_version(unsigned char* patchVer);
#endif
//*****************************************************************************
//
//! nvmem_create_entry
//!
//! @param ulFileId nvmem file Id:\n
//! * NVMEM_AES128_KEY_FILEID: 12
//! * NVMEM_SHARED_MEM_FILEID: 13
//! * and fileIDs 14 and 15
//! @param ulNewLen entry ulLength
//!
//! @return on success 0, error otherwise.
//!
//! @brief Create new file entry and allocate space on the NVMEM.
//! Applies only to user files.
//! Modify the size of file.
//! If the entry is unallocated - allocate it to size
//! ulNewLen (marked invalid).
//! If it is allocated then deallocate it first.
//! To just mark the file as invalid without resizing -
//! set ulNewLen=0.
//!
//*****************************************************************************
extern int8_t nvmem_create_entry(unsigned long file_id, unsigned long newlen);
//*****************************************************************************
//
// Mark the end of the C bindings section for C++ compilers.
//
//*****************************************************************************
//*****************************************************************************
//
// Close the Doxygen group.
//! @}
//
//*****************************************************************************
#ifdef __cplusplus
}
#endif // __cplusplus
#endif // __NVRAM_H__

View File

@ -1,533 +0,0 @@
/*****************************************************************************
*
* security.c - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the
* distribution.
*
* Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*****************************************************************************/
//*****************************************************************************
//
//! \addtogroup security_api
//! @{
//
//*****************************************************************************
#include "security.h"
#ifndef CC3000_UNENCRYPTED_SMART_CONFIG
// foreward sbox
const unsigned char sbox[256] = {
//0 1 2 3 4 5 6 7 8 9 A B C D E F
0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, //0
0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, //1
0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, //2
0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75, //3
0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, //4
0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf, //5
0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8, //6
0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2, //7
0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73, //8
0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb, //9
0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79, //A
0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08, //B
0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a, //C
0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e, //D
0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf, //E
0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16 }; //F
// inverse sbox
const unsigned char rsbox[256] =
{ 0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38, 0xbf, 0x40, 0xa3, 0x9e, 0x81, 0xf3, 0xd7, 0xfb
, 0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87, 0x34, 0x8e, 0x43, 0x44, 0xc4, 0xde, 0xe9, 0xcb
, 0x54, 0x7b, 0x94, 0x32, 0xa6, 0xc2, 0x23, 0x3d, 0xee, 0x4c, 0x95, 0x0b, 0x42, 0xfa, 0xc3, 0x4e
, 0x08, 0x2e, 0xa1, 0x66, 0x28, 0xd9, 0x24, 0xb2, 0x76, 0x5b, 0xa2, 0x49, 0x6d, 0x8b, 0xd1, 0x25
, 0x72, 0xf8, 0xf6, 0x64, 0x86, 0x68, 0x98, 0x16, 0xd4, 0xa4, 0x5c, 0xcc, 0x5d, 0x65, 0xb6, 0x92
, 0x6c, 0x70, 0x48, 0x50, 0xfd, 0xed, 0xb9, 0xda, 0x5e, 0x15, 0x46, 0x57, 0xa7, 0x8d, 0x9d, 0x84
, 0x90, 0xd8, 0xab, 0x00, 0x8c, 0xbc, 0xd3, 0x0a, 0xf7, 0xe4, 0x58, 0x05, 0xb8, 0xb3, 0x45, 0x06
, 0xd0, 0x2c, 0x1e, 0x8f, 0xca, 0x3f, 0x0f, 0x02, 0xc1, 0xaf, 0xbd, 0x03, 0x01, 0x13, 0x8a, 0x6b
, 0x3a, 0x91, 0x11, 0x41, 0x4f, 0x67, 0xdc, 0xea, 0x97, 0xf2, 0xcf, 0xce, 0xf0, 0xb4, 0xe6, 0x73
, 0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85, 0xe2, 0xf9, 0x37, 0xe8, 0x1c, 0x75, 0xdf, 0x6e
, 0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89, 0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b
, 0xfc, 0x56, 0x3e, 0x4b, 0xc6, 0xd2, 0x79, 0x20, 0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4
, 0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31, 0xb1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xec, 0x5f
, 0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d, 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef
, 0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61
, 0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d };
// round constant
const unsigned char Rcon[11] = {
0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36};
unsigned char expandedKey[176];
//*****************************************************************************
//
//! expandKey
//!
//! @param key AES128 key - 16 bytes
//! @param expandedKey expanded AES128 key
//!
//! @return none
//!
//! @brief expend a 16 bytes key for AES128 implementation
//!
//*****************************************************************************
void expandKey(unsigned char *expandedKey,
unsigned char *key)
{
unsigned short ii, buf1;
for (ii=0;ii<16;ii++)
expandedKey[ii] = key[ii];
for (ii=1;ii<11;ii++){
buf1 = expandedKey[ii*16 - 4];
expandedKey[ii*16 + 0] = sbox[expandedKey[ii*16 - 3]]^expandedKey[(ii-1)*16 + 0]^Rcon[ii];
expandedKey[ii*16 + 1] = sbox[expandedKey[ii*16 - 2]]^expandedKey[(ii-1)*16 + 1];
expandedKey[ii*16 + 2] = sbox[expandedKey[ii*16 - 1]]^expandedKey[(ii-1)*16 + 2];
expandedKey[ii*16 + 3] = sbox[buf1 ]^expandedKey[(ii-1)*16 + 3];
expandedKey[ii*16 + 4] = expandedKey[(ii-1)*16 + 4]^expandedKey[ii*16 + 0];
expandedKey[ii*16 + 5] = expandedKey[(ii-1)*16 + 5]^expandedKey[ii*16 + 1];
expandedKey[ii*16 + 6] = expandedKey[(ii-1)*16 + 6]^expandedKey[ii*16 + 2];
expandedKey[ii*16 + 7] = expandedKey[(ii-1)*16 + 7]^expandedKey[ii*16 + 3];
expandedKey[ii*16 + 8] = expandedKey[(ii-1)*16 + 8]^expandedKey[ii*16 + 4];
expandedKey[ii*16 + 9] = expandedKey[(ii-1)*16 + 9]^expandedKey[ii*16 + 5];
expandedKey[ii*16 +10] = expandedKey[(ii-1)*16 +10]^expandedKey[ii*16 + 6];
expandedKey[ii*16 +11] = expandedKey[(ii-1)*16 +11]^expandedKey[ii*16 + 7];
expandedKey[ii*16 +12] = expandedKey[(ii-1)*16 +12]^expandedKey[ii*16 + 8];
expandedKey[ii*16 +13] = expandedKey[(ii-1)*16 +13]^expandedKey[ii*16 + 9];
expandedKey[ii*16 +14] = expandedKey[(ii-1)*16 +14]^expandedKey[ii*16 +10];
expandedKey[ii*16 +15] = expandedKey[(ii-1)*16 +15]^expandedKey[ii*16 +11];
}
}
//*****************************************************************************
//
//! galois_mul2
//!
//! @param value argument to multiply
//!
//! @return multiplied argument
//!
//! @brief multiply by 2 in the galois field
//!
//*****************************************************************************
unsigned char galois_mul2(unsigned char value)
{
if (value>>7)
{
value = value << 1;
return (value^0x1b);
} else
return value<<1;
}
//*****************************************************************************
//
//! aes_encr
//!
//! @param[in] expandedKey expanded AES128 key
//! @param[in/out] state 16 bytes of plain text and cipher text
//!
//! @return none
//!
//! @brief internal implementation of AES128 encryption.
//! straight forward aes encryption implementation
//! first the group of operations
//! - addRoundKey
//! - subbytes
//! - shiftrows
//! - mixcolums
//! is executed 9 times, after this addroundkey to finish the 9th
//! round, after that the 10th round without mixcolums
//! no further subfunctions to save cycles for function calls
//! no structuring with "for (....)" to save cycles.
//!
//!
//*****************************************************************************
void aes_encr(unsigned char *state, unsigned char *expandedKey)
{
unsigned char buf1, buf2, buf3, round;
for (round = 0; round < 9; round ++){
// addroundkey, sbox and shiftrows
// row 0
state[ 0] = sbox[(state[ 0] ^ expandedKey[(round*16) ])];
state[ 4] = sbox[(state[ 4] ^ expandedKey[(round*16) + 4])];
state[ 8] = sbox[(state[ 8] ^ expandedKey[(round*16) + 8])];
state[12] = sbox[(state[12] ^ expandedKey[(round*16) + 12])];
// row 1
buf1 = state[1] ^ expandedKey[(round*16) + 1];
state[ 1] = sbox[(state[ 5] ^ expandedKey[(round*16) + 5])];
state[ 5] = sbox[(state[ 9] ^ expandedKey[(round*16) + 9])];
state[ 9] = sbox[(state[13] ^ expandedKey[(round*16) + 13])];
state[13] = sbox[buf1];
// row 2
buf1 = state[2] ^ expandedKey[(round*16) + 2];
buf2 = state[6] ^ expandedKey[(round*16) + 6];
state[ 2] = sbox[(state[10] ^ expandedKey[(round*16) + 10])];
state[ 6] = sbox[(state[14] ^ expandedKey[(round*16) + 14])];
state[10] = sbox[buf1];
state[14] = sbox[buf2];
// row 3
buf1 = state[15] ^ expandedKey[(round*16) + 15];
state[15] = sbox[(state[11] ^ expandedKey[(round*16) + 11])];
state[11] = sbox[(state[ 7] ^ expandedKey[(round*16) + 7])];
state[ 7] = sbox[(state[ 3] ^ expandedKey[(round*16) + 3])];
state[ 3] = sbox[buf1];
// mixcolums //////////
// col1
buf1 = state[0] ^ state[1] ^ state[2] ^ state[3];
buf2 = state[0];
buf3 = state[0]^state[1]; buf3=galois_mul2(buf3); state[0] = state[0] ^ buf3 ^ buf1;
buf3 = state[1]^state[2]; buf3=galois_mul2(buf3); state[1] = state[1] ^ buf3 ^ buf1;
buf3 = state[2]^state[3]; buf3=galois_mul2(buf3); state[2] = state[2] ^ buf3 ^ buf1;
buf3 = state[3]^buf2; buf3=galois_mul2(buf3); state[3] = state[3] ^ buf3 ^ buf1;
// col2
buf1 = state[4] ^ state[5] ^ state[6] ^ state[7];
buf2 = state[4];
buf3 = state[4]^state[5]; buf3=galois_mul2(buf3); state[4] = state[4] ^ buf3 ^ buf1;
buf3 = state[5]^state[6]; buf3=galois_mul2(buf3); state[5] = state[5] ^ buf3 ^ buf1;
buf3 = state[6]^state[7]; buf3=galois_mul2(buf3); state[6] = state[6] ^ buf3 ^ buf1;
buf3 = state[7]^buf2; buf3=galois_mul2(buf3); state[7] = state[7] ^ buf3 ^ buf1;
// col3
buf1 = state[8] ^ state[9] ^ state[10] ^ state[11];
buf2 = state[8];
buf3 = state[8]^state[9]; buf3=galois_mul2(buf3); state[8] = state[8] ^ buf3 ^ buf1;
buf3 = state[9]^state[10]; buf3=galois_mul2(buf3); state[9] = state[9] ^ buf3 ^ buf1;
buf3 = state[10]^state[11]; buf3=galois_mul2(buf3); state[10] = state[10] ^ buf3 ^ buf1;
buf3 = state[11]^buf2; buf3=galois_mul2(buf3); state[11] = state[11] ^ buf3 ^ buf1;
// col4
buf1 = state[12] ^ state[13] ^ state[14] ^ state[15];
buf2 = state[12];
buf3 = state[12]^state[13]; buf3=galois_mul2(buf3); state[12] = state[12] ^ buf3 ^ buf1;
buf3 = state[13]^state[14]; buf3=galois_mul2(buf3); state[13] = state[13] ^ buf3 ^ buf1;
buf3 = state[14]^state[15]; buf3=galois_mul2(buf3); state[14] = state[14] ^ buf3 ^ buf1;
buf3 = state[15]^buf2; buf3=galois_mul2(buf3); state[15] = state[15] ^ buf3 ^ buf1;
}
// 10th round without mixcols
state[ 0] = sbox[(state[ 0] ^ expandedKey[(round*16) ])];
state[ 4] = sbox[(state[ 4] ^ expandedKey[(round*16) + 4])];
state[ 8] = sbox[(state[ 8] ^ expandedKey[(round*16) + 8])];
state[12] = sbox[(state[12] ^ expandedKey[(round*16) + 12])];
// row 1
buf1 = state[1] ^ expandedKey[(round*16) + 1];
state[ 1] = sbox[(state[ 5] ^ expandedKey[(round*16) + 5])];
state[ 5] = sbox[(state[ 9] ^ expandedKey[(round*16) + 9])];
state[ 9] = sbox[(state[13] ^ expandedKey[(round*16) + 13])];
state[13] = sbox[buf1];
// row 2
buf1 = state[2] ^ expandedKey[(round*16) + 2];
buf2 = state[6] ^ expandedKey[(round*16) + 6];
state[ 2] = sbox[(state[10] ^ expandedKey[(round*16) + 10])];
state[ 6] = sbox[(state[14] ^ expandedKey[(round*16) + 14])];
state[10] = sbox[buf1];
state[14] = sbox[buf2];
// row 3
buf1 = state[15] ^ expandedKey[(round*16) + 15];
state[15] = sbox[(state[11] ^ expandedKey[(round*16) + 11])];
state[11] = sbox[(state[ 7] ^ expandedKey[(round*16) + 7])];
state[ 7] = sbox[(state[ 3] ^ expandedKey[(round*16) + 3])];
state[ 3] = sbox[buf1];
// last addroundkey
state[ 0]^=expandedKey[160];
state[ 1]^=expandedKey[161];
state[ 2]^=expandedKey[162];
state[ 3]^=expandedKey[163];
state[ 4]^=expandedKey[164];
state[ 5]^=expandedKey[165];
state[ 6]^=expandedKey[166];
state[ 7]^=expandedKey[167];
state[ 8]^=expandedKey[168];
state[ 9]^=expandedKey[169];
state[10]^=expandedKey[170];
state[11]^=expandedKey[171];
state[12]^=expandedKey[172];
state[13]^=expandedKey[173];
state[14]^=expandedKey[174];
state[15]^=expandedKey[175];
}
//*****************************************************************************
//
//! aes_decr
//!
//! @param[in] expandedKey expanded AES128 key
//! @param[in\out] state 16 bytes of cipher text and plain text
//!
//! @return none
//!
//! @brief internal implementation of AES128 decryption.
//! straight forward aes decryption implementation
//! the order of substeps is the exact reverse of decryption
//! inverse functions:
//! - addRoundKey is its own inverse
//! - rsbox is inverse of sbox
//! - rightshift instead of leftshift
//! - invMixColumns = barreto + mixColumns
//! no further subfunctions to save cycles for function calls
//! no structuring with "for (....)" to save cycles
//!
//*****************************************************************************
void aes_decr(unsigned char *state, unsigned char *expandedKey)
{
unsigned char buf1, buf2, buf3;
signed char round;
round = 9;
// initial addroundkey
state[ 0]^=expandedKey[160];
state[ 1]^=expandedKey[161];
state[ 2]^=expandedKey[162];
state[ 3]^=expandedKey[163];
state[ 4]^=expandedKey[164];
state[ 5]^=expandedKey[165];
state[ 6]^=expandedKey[166];
state[ 7]^=expandedKey[167];
state[ 8]^=expandedKey[168];
state[ 9]^=expandedKey[169];
state[10]^=expandedKey[170];
state[11]^=expandedKey[171];
state[12]^=expandedKey[172];
state[13]^=expandedKey[173];
state[14]^=expandedKey[174];
state[15]^=expandedKey[175];
// 10th round without mixcols
state[ 0] = rsbox[state[ 0]] ^ expandedKey[(round*16) ];
state[ 4] = rsbox[state[ 4]] ^ expandedKey[(round*16) + 4];
state[ 8] = rsbox[state[ 8]] ^ expandedKey[(round*16) + 8];
state[12] = rsbox[state[12]] ^ expandedKey[(round*16) + 12];
// row 1
buf1 = rsbox[state[13]] ^ expandedKey[(round*16) + 1];
state[13] = rsbox[state[ 9]] ^ expandedKey[(round*16) + 13];
state[ 9] = rsbox[state[ 5]] ^ expandedKey[(round*16) + 9];
state[ 5] = rsbox[state[ 1]] ^ expandedKey[(round*16) + 5];
state[ 1] = buf1;
// row 2
buf1 = rsbox[state[ 2]] ^ expandedKey[(round*16) + 10];
buf2 = rsbox[state[ 6]] ^ expandedKey[(round*16) + 14];
state[ 2] = rsbox[state[10]] ^ expandedKey[(round*16) + 2];
state[ 6] = rsbox[state[14]] ^ expandedKey[(round*16) + 6];
state[10] = buf1;
state[14] = buf2;
// row 3
buf1 = rsbox[state[ 3]] ^ expandedKey[(round*16) + 15];
state[ 3] = rsbox[state[ 7]] ^ expandedKey[(round*16) + 3];
state[ 7] = rsbox[state[11]] ^ expandedKey[(round*16) + 7];
state[11] = rsbox[state[15]] ^ expandedKey[(round*16) + 11];
state[15] = buf1;
for (round = 8; round >= 0; round--){
// barreto
//col1
buf1 = galois_mul2(galois_mul2(state[0]^state[2]));
buf2 = galois_mul2(galois_mul2(state[1]^state[3]));
state[0] ^= buf1; state[1] ^= buf2; state[2] ^= buf1; state[3] ^= buf2;
//col2
buf1 = galois_mul2(galois_mul2(state[4]^state[6]));
buf2 = galois_mul2(galois_mul2(state[5]^state[7]));
state[4] ^= buf1; state[5] ^= buf2; state[6] ^= buf1; state[7] ^= buf2;
//col3
buf1 = galois_mul2(galois_mul2(state[8]^state[10]));
buf2 = galois_mul2(galois_mul2(state[9]^state[11]));
state[8] ^= buf1; state[9] ^= buf2; state[10] ^= buf1; state[11] ^= buf2;
//col4
buf1 = galois_mul2(galois_mul2(state[12]^state[14]));
buf2 = galois_mul2(galois_mul2(state[13]^state[15]));
state[12] ^= buf1; state[13] ^= buf2; state[14] ^= buf1; state[15] ^= buf2;
// mixcolums //////////
// col1
buf1 = state[0] ^ state[1] ^ state[2] ^ state[3];
buf2 = state[0];
buf3 = state[0]^state[1]; buf3=galois_mul2(buf3); state[0] = state[0] ^ buf3 ^ buf1;
buf3 = state[1]^state[2]; buf3=galois_mul2(buf3); state[1] = state[1] ^ buf3 ^ buf1;
buf3 = state[2]^state[3]; buf3=galois_mul2(buf3); state[2] = state[2] ^ buf3 ^ buf1;
buf3 = state[3]^buf2; buf3=galois_mul2(buf3); state[3] = state[3] ^ buf3 ^ buf1;
// col2
buf1 = state[4] ^ state[5] ^ state[6] ^ state[7];
buf2 = state[4];
buf3 = state[4]^state[5]; buf3=galois_mul2(buf3); state[4] = state[4] ^ buf3 ^ buf1;
buf3 = state[5]^state[6]; buf3=galois_mul2(buf3); state[5] = state[5] ^ buf3 ^ buf1;
buf3 = state[6]^state[7]; buf3=galois_mul2(buf3); state[6] = state[6] ^ buf3 ^ buf1;
buf3 = state[7]^buf2; buf3=galois_mul2(buf3); state[7] = state[7] ^ buf3 ^ buf1;
// col3
buf1 = state[8] ^ state[9] ^ state[10] ^ state[11];
buf2 = state[8];
buf3 = state[8]^state[9]; buf3=galois_mul2(buf3); state[8] = state[8] ^ buf3 ^ buf1;
buf3 = state[9]^state[10]; buf3=galois_mul2(buf3); state[9] = state[9] ^ buf3 ^ buf1;
buf3 = state[10]^state[11]; buf3=galois_mul2(buf3); state[10] = state[10] ^ buf3 ^ buf1;
buf3 = state[11]^buf2; buf3=galois_mul2(buf3); state[11] = state[11] ^ buf3 ^ buf1;
// col4
buf1 = state[12] ^ state[13] ^ state[14] ^ state[15];
buf2 = state[12];
buf3 = state[12]^state[13]; buf3=galois_mul2(buf3); state[12] = state[12] ^ buf3 ^ buf1;
buf3 = state[13]^state[14]; buf3=galois_mul2(buf3); state[13] = state[13] ^ buf3 ^ buf1;
buf3 = state[14]^state[15]; buf3=galois_mul2(buf3); state[14] = state[14] ^ buf3 ^ buf1;
buf3 = state[15]^buf2; buf3=galois_mul2(buf3); state[15] = state[15] ^ buf3 ^ buf1;
// addroundkey, rsbox and shiftrows
// row 0
state[ 0] = rsbox[state[ 0]] ^ expandedKey[(round*16) ];
state[ 4] = rsbox[state[ 4]] ^ expandedKey[(round*16) + 4];
state[ 8] = rsbox[state[ 8]] ^ expandedKey[(round*16) + 8];
state[12] = rsbox[state[12]] ^ expandedKey[(round*16) + 12];
// row 1
buf1 = rsbox[state[13]] ^ expandedKey[(round*16) + 1];
state[13] = rsbox[state[ 9]] ^ expandedKey[(round*16) + 13];
state[ 9] = rsbox[state[ 5]] ^ expandedKey[(round*16) + 9];
state[ 5] = rsbox[state[ 1]] ^ expandedKey[(round*16) + 5];
state[ 1] = buf1;
// row 2
buf1 = rsbox[state[ 2]] ^ expandedKey[(round*16) + 10];
buf2 = rsbox[state[ 6]] ^ expandedKey[(round*16) + 14];
state[ 2] = rsbox[state[10]] ^ expandedKey[(round*16) + 2];
state[ 6] = rsbox[state[14]] ^ expandedKey[(round*16) + 6];
state[10] = buf1;
state[14] = buf2;
// row 3
buf1 = rsbox[state[ 3]] ^ expandedKey[(round*16) + 15];
state[ 3] = rsbox[state[ 7]] ^ expandedKey[(round*16) + 3];
state[ 7] = rsbox[state[11]] ^ expandedKey[(round*16) + 7];
state[11] = rsbox[state[15]] ^ expandedKey[(round*16) + 11];
state[15] = buf1;
}
}
//*****************************************************************************
//
//! aes_encrypt
//!
//! @param[in] key AES128 key of size 16 bytes
//! @param[in\out] state 16 bytes of plain text and cipher text
//!
//! @return none
//!
//! @brief AES128 encryption:
//! Given AES128 key and 16 bytes plain text, cipher text of 16 bytes
//! is computed. The AES implementation is in mode ECB (Electronic
//! Code Book).
//!
//!
//*****************************************************************************
void aes_encrypt(unsigned char *state,
unsigned char *key)
{
// expand the key into 176 bytes
expandKey(expandedKey, key);
aes_encr(state, expandedKey);
}
//*****************************************************************************
//
//! aes_decrypt
//!
//! @param[in] key AES128 key of size 16 bytes
//! @param[in\out] state 16 bytes of cipher text and plain text
//!
//! @return none
//!
//! @brief AES128 decryption:
//! Given AES128 key and 16 bytes cipher text, plain text of 16 bytes
//! is computed The AES implementation is in mode ECB
//! (Electronic Code Book).
//!
//!
//*****************************************************************************
void aes_decrypt(unsigned char *state,
unsigned char *key)
{
expandKey(expandedKey, key); // expand the key into 176 bytes
aes_decr(state, expandedKey);
}
//*****************************************************************************
//
//! aes_read_key
//!
//! @param[out] key AES128 key of size 16 bytes
//!
//! @return on success 0, error otherwise.
//!
//! @brief Reads AES128 key from EEPROM
//! Reads the AES128 key from fileID #12 in EEPROM
//! returns an error if the key does not exist.
//!
//!
//*****************************************************************************
signed long aes_read_key(unsigned char *key)
{
signed long returnValue;
returnValue = nvmem_read(NVMEM_AES128_KEY_FILEID, AES128_KEY_SIZE, 0, key);
return returnValue;
}
//*****************************************************************************
//
//! aes_write_key
//!
//! @param[out] key AES128 key of size 16 bytes
//!
//! @return on success 0, error otherwise.
//!
//! @brief writes AES128 key from EEPROM
//! Writes the AES128 key to fileID #12 in EEPROM
//!
//!
//*****************************************************************************
signed long aes_write_key(unsigned char *key)
{
signed long returnValue;
returnValue = nvmem_write(NVMEM_AES128_KEY_FILEID, AES128_KEY_SIZE, 0, key);
return returnValue;
}
#endif //CC3000_UNENCRYPTED_SMART_CONFIG
//*****************************************************************************
//
// Close the Doxygen group.
//! @}
//
//*****************************************************************************

View File

@ -1,135 +0,0 @@
/*****************************************************************************
*
* security.h - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the
* distribution.
*
* Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*****************************************************************************/
#ifndef __SECURITY__
#define __SECURITY__
#include "nvmem.h"
//*****************************************************************************
//
// If building with a C++ compiler, make all of the definitions in this header
// have a C binding.
//
//*****************************************************************************
#ifdef __cplusplus
extern "C" {
#endif
#define AES128_KEY_SIZE 16
#ifndef CC3000_UNENCRYPTED_SMART_CONFIG
//*****************************************************************************
//
//! aes_encrypt
//!
//! @param[in] key AES128 key of size 16 bytes
//! @param[in\out] state 16 bytes of plain text and cipher text
//!
//! @return none
//!
//! @brief AES128 encryption:
//! Given AES128 key and 16 bytes plain text, cipher text of 16 bytes
//! is computed. The AES implementation is in mode ECB (Electronic
//! Code Book).
//!
//!
//*****************************************************************************
extern void aes_encrypt(unsigned char *state, unsigned char *key);
//*****************************************************************************
//
//! aes_decrypt
//!
//! @param[in] key AES128 key of size 16 bytes
//! @param[in\out] state 16 bytes of cipher text and plain text
//!
//! @return none
//!
//! @brief AES128 decryption:
//! Given AES128 key and 16 bytes cipher text, plain text of 16 bytes
//! is computed The AES implementation is in mode ECB
//! (Electronic Code Book).
//!
//!
//*****************************************************************************
extern void aes_decrypt(unsigned char *state, unsigned char *key);
//*****************************************************************************
//
//! aes_read_key
//!
//! @param[out] key AES128 key of size 16 bytes
//!
//! @return on success 0, error otherwise.
//!
//! @brief Reads AES128 key from EEPROM
//! Reads the AES128 key from fileID #12 in EEPROM
//! returns an error if the key does not exist.
//!
//!
//*****************************************************************************
extern signed long aes_read_key(unsigned char *key);
//*****************************************************************************
//
//! aes_write_key
//!
//! @param[out] key AES128 key of size 16 bytes
//!
//! @return on success 0, error otherwise.
//!
//! @brief writes AES128 key from EEPROM
//! Writes the AES128 key to fileID #12 in EEPROM
//!
//!
//*****************************************************************************
extern signed long aes_write_key(unsigned char *key);
#endif //CC3000_UNENCRYPTED_SMART_CONFIG
//*****************************************************************************
//
// Mark the end of the C bindings section for C++ compilers.
//
//*****************************************************************************
#ifdef __cplusplus
}
#endif // __cplusplus
#endif

View File

@ -1,673 +0,0 @@
//
//
//
#include "sntp.h"
//Lists of pool servers
const char* ntp_us_pool_list[] = { "0.us.pool.ntp.org",
"1.us.pool.ntp.org",
"2.us.pool.ntp.org",
"3.us.pool.ntp.org",
"0.north-america.pool.ntp.org",
"1.north-america.pool.ntp.org",
"2.north-america.pool.ntp.org",
"3.north-america.pool.ntp.org",
NULL
};
const char* ntp_global_pool_list[] = { "0.pool.ntp.org",
"1.pool.ntp.org",
"2.pool.ntp.org",
"pool.ntp.org",
NULL
};
// ExtractNTPTime - convert ntp seconds into calendar time
// Notes:
// - 1900 was NOT a leap-year.
// - This routine deals with the overflow of the 32-bit seconds value,
// which will happen on 02/07/2036 at 06:28:16.
//
#define SECS_DAY (24L * 60 * 60) /* number of seconds in a day */
#define BASE_YEAR (1900) /* NTP time starts at 1/1/1900 00:00:00 */
#define FIX_PT_DAYS_YEAR ((365L * 256) + (256 / 4))
// It may not look that way, but this is (365.25 * 256)
// That is, it's (365 * 256) + (0.25 * 256) = (365.25 * 256). Why are we doing this?
// There are 365 days in a year. After you factor out seconds in the current day,
// you're left with days since 1/1/1900. Dividing by 365 would therefore give you
// the number of years since 1900, if it wasn't for leap years. If you include
// leap-years, you get 365.25 days per year. So, we have to divide ntp days by 365.25
// to get the proper year. Instead of doing a floating point divide by 365.25, we do
// fixed point arithmetic, placing the binary-point at 8 bits (i.e., 256 decimal).
//There's only one small fly in this ointment - 1900 was not a leap year.
// Fortunately, we can compensate by adding 1 to the NTP days, as if 1900 WAS a
// leap-year. When we divide days down to years, the extra day is lost in
// the roundoff. Problem solved.
// days in each month: {jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec};
char monthDays[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
#ifdef CLOCK_DEBUG
void dumpBlock1(char* buf, short len) /*rdl 2/16/2008*/
{
uint8_t* offset = (uint8_t*)buf;
int16_t count = 0;
int lineCount = 0;
char ascii[17] = "";
char* pAscii = ascii;
delay(10);
if (CC3KPrinter != 0) { CC3KPrinter->print(F("Block: (addr ")); CC3KPrinter->print((uint16_t)buf, HEX); CC3KPrinter->print(F(", length ")); CC3KPrinter->print(len, HEX); }
// traceFn("Block: (addr %p, length 0x%04x)", buf, len);
while (count < len)
{
if (CC3KPrinter != 0) { CC3KPrinter->println(); CC3KPrinter->print((uint16_t)offset,HEX); CC3KPrinter->print(F(": ")); }
// traceFn("\r\n %p: ", offset);
lineCount = 0;
pAscii = (char*)&ascii;
memset(ascii,' ',16);
while ((count < len) && (lineCount < 8))
{
if ((*offset <= ' ') || (*offset == 0xFF)) *pAscii++ = '.'; else *pAscii++ = *offset; *pAscii++ = ' ';
if (CC3KPrinter != 0) { CC3KPrinter->print((*offset)>>4,HEX); CC3KPrinter->print((*offset++)&0x0F,HEX); CC3KPrinter->print(F(" ")); }
// traceFn("0x%02bx ", *offset++);
count++;
lineCount++;
}
while (lineCount++ < 8)
{
if (CC3KPrinter != 0) { CC3KPrinter->print(F(" ")); }
// traceFn(" ");
}
if (CC3KPrinter != 0) { CC3KPrinter->print(F(" | ")); CC3KPrinter->print(ascii); CC3KPrinter->print(F("|")); }
// traceFn(" | %s|", ascii);
delay(10);
}
if (CC3KPrinter != 0) { CC3KPrinter->println(); }
// traceFn("\r\n");
}
#endif
//Calculates (time / 2) for NTP timestamp values (64-bit fixed point, normalized to 32-bit)
// ORIGINAL VALUE OF time IS DESTROYED, and replaced with result of calculation.
// performs a signed divide
void NTPdiv2(SNTP_Timestamp_t* time)
{
uint32_t carry = time->seconds & 1; //this bit will shift from 'seconds' to 'fraction'
time->fraction >>= 1; //divide 'fraction' by 2
time->fraction |= carry << 31; //OR in the low bit of 'seconds' as the high bit of 'fraction
time->seconds >>= 1; //signed divide of 'seconds' by 2
}
//Calculates (time1 + time2) for NTP timestamp values (64-bit fixed point, normalized to 32-bit)
// ORIGINAL VALUE OF time2 IS DESTROYED, and replaced with result of calculation.
// Returns overflow
uint8_t AddNTPtime(SNTP_Timestamp_t* time1, SNTP_Timestamp_t* time2)
{
uint8_t carry = ((time2->fraction>>1)+(time1->fraction>>1) & 0x80000000)>>31;
time2->fraction += time1->fraction;
time2->seconds += carry;
carry = ((time2->seconds>>1)+(time1->seconds>>1) & 0x80000000)>>31;
time2->seconds += time1->seconds;
return carry; //if there's still a carry, then we have an overflow.
}
//Calculates (time2 - time1) for NTP timestamp values (64-bit fixed point, normalized to 32-bit)
// ORIGINAL VALUE OF time2 IS DESTROYED, and replaced with result of calculation.
// Returns underflow
uint8_t DiffNTPtime(SNTP_Timestamp_t* time1, SNTP_Timestamp_t* time2)
{
uint8_t borrow = ((time2->fraction>>1)-(time1->fraction>>1) & 0x80000000)>>31;
time2->fraction -= time1->fraction;
time2->seconds -= borrow;
borrow = ((time2->seconds>>1)-(time1->seconds>>1) & 0x80000000)>>31;
time2->seconds -= time1->seconds;
return borrow; //if there's still a borrow, then we have an underflow.
}
int sntp::GetSystemClockAsNTPTime(SNTP_Timestamp_t* ntpSystemTime)
{
long systemMillis;
if (ntpSystemTime)
{
ntpSystemTime->seconds = millis() / 1000;
systemMillis = millis() - (ntpSystemTime->seconds * 1000);
systemMillis = (systemMillis << 10) / 1000;
ntpSystemTime->fraction = systemMillis << 22;
}
#ifdef CLOCK_DEBUG
if (CC3KPrinter != 0) { CC3KPrinter->print(F(" GetSystemClockAsNTPTime: ")); CC3KPrinter->print(ntpSystemTime->seconds,HEX); CC3KPrinter->print(F(".")); CC3KPrinter->println(ntpSystemTime->fraction,HEX); }
#endif
return 0;
}
SNTP_Timestamp_t* sntp::NTPGetTime(SNTP_Timestamp_t* ntpTime, bool local)
{
SNTP_Timestamp_t ntpSystemTime;
if (ntpTime)
{
GetSystemClockAsNTPTime(&ntpSystemTime);
*ntpTime = m_NTPReferenceTime;
#ifdef CLOCK_DEBUG
if (CC3KPrinter != 0) { CC3KPrinter->print(F(" NTPGetTime m_NTPReferenceTime: ")); CC3KPrinter->print(ntpTime->seconds,HEX); CC3KPrinter->print(F(".")); CC3KPrinter->println(ntpTime->fraction,HEX); }
#endif
AddNTPtime(&ntpSystemTime, ntpTime);
#ifdef CLOCK_DEBUG
if (CC3KPrinter != 0) { CC3KPrinter->print(F(" NTPGetTime NTP Current UTC: ")); CC3KPrinter->print(ntpTime->seconds,HEX); CC3KPrinter->print(F(".")); CC3KPrinter->println(ntpTime->fraction,HEX); }
#endif
if (local) //if true, add in local offset from UTC
{
AddNTPtime(m_cur_UTC_offset, ntpTime);
#ifdef CLOCK_DEBUG
if (CC3KPrinter != 0) { CC3KPrinter->print(F(" NTPGetTime NTP Current Local: ")); CC3KPrinter->print(ntpTime->seconds,HEX); CC3KPrinter->print(F(".")); CC3KPrinter->println(ntpTime->fraction,HEX); }
#endif
}
}
return ntpTime;
}
SNTP_Timestamp_t* sntp::NTPSetTime(SNTP_Timestamp_t* ntpTime, bool local)
{
SNTP_Timestamp_t ntpSystemTime;
if (ntpTime)
{
if (local)
{
DiffNTPtime(m_cur_UTC_offset, ntpTime); //take out local offset to set clock as UTC
}
GetSystemClockAsNTPTime(&ntpSystemTime);
m_NTPReferenceTime = *ntpTime;
DiffNTPtime(&ntpSystemTime, &m_NTPReferenceTime);
m_timeIsSet = true;
}
return ntpTime;
}
NetTime_t *sntp::ExtractNTPTime(/*in*/ SNTP_Timestamp_t *ntpTime, /*out*/ NetTime_t *extractedTime)
{
uint32_t time = ntpTime->seconds;
uint32_t dayclock, dayno;
int year;
char month;
int day;
bool dateOverflow = (0 == (time & 0x80000000)); //32-bit counter overflowed?
extractedTime->millis = ((ntpTime->fraction >>22) * 1000) >>10;
dayclock = time % SECS_DAY; //seconds since midnight
dayno = time / SECS_DAY; //days since 1/1/1900 (or since 2/7/2036)
#ifdef CLOCK_DEEP_DEBUG
if (CC3KPrinter != 0) { CC3KPrinter->print(F("dayclock = ")); CC3KPrinter->print(dayclock); CC3KPrinter->print(F("dayno = ")); CC3KPrinter->println(dayno); }
#endif
if (dateOverflow) //if the date overflowed, we'll effectively add the overflowed bit
{ // back into dayno and dayclock. They've got plenty of room for it now
dayclock = (dayclock + 23296); //new zero-point for dayclock is 06:28:16
dayno += 49710; //new zero-point for dayno is 02/07/2036
dayno += (dayclock / SECS_DAY); // PLUS 6:28:16, or 49710 days, 23296 seconds since 1/1/1900 00:00:00
dayclock %= SECS_DAY; // get rid of any overflow (we already added it to dayno in previous line)
#ifdef CLOCK_DEEP_DEBUG
if (CC3KPrinter != 0) { CC3KPrinter->print(F(" date overflow: dayclock =")); CC3KPrinter->print(dayclock); CC3KPrinter->print(F("dayno = ")); CC3KPrinter->println(dayno); }
#endif
}
extractedTime->sec = dayclock % 60; //seconds in current minute
extractedTime->min = (dayclock % 3600) / 60; //minutes in current hour
extractedTime->hour = dayclock / 3600; //hours in current day
extractedTime->wday = (dayno + 1) % 7; //days since Sunday (0..6). Biased since 1/1/1900 was a thursday
dayno += 1; //No leap-year in 1900, as there should have been. This throws off the
// calculation of year = dayno / 365.25. So we add one to line things back
// up again, just for the year calculation.
dayno <<= 8; //fixed point arithmetic - multiply by 256 so we can do an integer divide by
year = (dayno / FIX_PT_DAYS_YEAR) + BASE_YEAR; // (365.25 * 256)instead of doing a floating-point divide by 365.25
#ifdef CLOCK_DEEP_DEBUG
if (CC3KPrinter != 0) { CC3KPrinter->print(year); CC3KPrinter->print(F(" = (")); CC3KPrinter->print(dayno); CC3KPrinter->print(F(" // ")); CC3KPrinter->print(FIX_PT_DAYS_YEAR); CC3KPrinter->print(F(") + ")); CC3KPrinter->println(BASE_YEAR); }
#endif
extractedTime->year = year;
dayno = (dayno % FIX_PT_DAYS_YEAR) >> 8;
extractedTime->yday = dayno;
//if year is evenly divisible by 4, it's a leap-year, except for 1900. Change February days in table accordingly
monthDays[1] = ((0 == (year & 3)) && (1900 != year))? 29 : 28;
//Now, we're going to loop through the month table, subtracting days from dayno until dayno goes negative
// that will give us the current month
day = (int)dayno;
month = 0;
while (0 <= day)
day-= monthDays[month++];
month -= 1; //we need to return month as zero-based. Phooey!
extractedTime->mon = month;
extractedTime->mday = day + monthDays[month] + 1; //Since we looped until days went negative, we need add back in days in current month
extractedTime->isdst = 0; //currently ignored.
#ifdef CLOCK_DEEP_DEBUG
dumpBlock1((char*)extractedTime, sizeof(NetTime_t));
#endif
return extractedTime;
}
//bool GetGatewayAddress(char* gatewayAddr)
//{
//bool success = false;
//tNetappIpconfigRetArgs ipconfig;
//netapp_ipconfig(&ipconfig);
//
///* If byte 1 is 0 we don't have a valid address */
//if (ipconfig.aucIP[3] != 0)
//{
//snprintf(gatewayAddr, MAX_URL_NAME, "%d.%d.%d.%d",ipconfig.aucIP+11,ipconfig.aucIP+10,ipconfig.aucIP+9,ipconfig.aucIP+8);
//success = true;
//}
//return success;
//}
sntp::sntp()
{
m_localPool = ntp_us_pool_list;
m_globalPool = ntp_global_pool_list;
m_NTPReferenceTime.seconds = 0X80000000; //initial base time for real-time clock (1/20/1968 03:14:08)
m_NTPReferenceTime.fraction = 0;
m_std_UTC_offset.seconds = 0; //Local standard-time offset from UTC. Example: Eastern Standard is UTC - 5 hours
m_std_UTC_offset.fraction = 0;
m_dst_UTC_offset.seconds = 0; //Local daylight-savings-time offset from UTC. Ex: Eastern Daylght is UTC - 4 hours
m_dst_UTC_offset.fraction = 0;
m_cur_UTC_offset = &m_std_UTC_offset; //Current offset from UTC. Pointer to either std_UTC_offset or dst_UTC_offset
m_twelveHour = false; //use 12-hour time when true, 24-hour time when false
m_enable_dst = false; //enable daylight savings time
//GetGatewayAddress((char*)&m_userServerStrings[1]);
//m_userServers[0] = (char*)&m_userServerStrings[1];
}
sntp::sntp(char* ntp_server_url1, char* ntp_server_url2, short local_utc_offset, short dst_utc_offset, bool enable_dst)
{
int user_server_count = 0;
sntp();
m_std_UTC_offset.seconds = (uint32_t)(60L * local_utc_offset);
m_dst_UTC_offset.seconds = (uint32_t)(60L * dst_utc_offset);
m_cur_UTC_offset = &m_dst_UTC_offset;
m_enable_dst = enable_dst;
if (ntp_server_url1)
{
strncpy((char*)&m_userServerStrings[user_server_count], ntp_server_url1, MAX_URL_NAME);
m_userServers[user_server_count] = (char*)&m_userServerStrings[user_server_count];
user_server_count++;
}
if (ntp_server_url2)
{
strncpy((char*)&m_userServerStrings[user_server_count], ntp_server_url2, MAX_URL_NAME);
m_userServers[user_server_count] = (char*)&m_userServerStrings[user_server_count];
user_server_count++;
}
}
sntp::sntp(char* ntp_server_url1, short local_utc_offset)
{
sntp(ntp_server_url1, NULL, local_utc_offset, 0, false);
}
sntp::sntp(char* ntp_server_url1, char* ntp_server_url2, short local_utc_offset)
{
sntp(ntp_server_url1, ntp_server_url2, local_utc_offset, 0, false);
}
sntp::sntp(char* ntp_server_url1, short local_utc_offset, short dst_utc_offset, bool enable_dst)
{
sntp(ntp_server_url1, NULL, local_utc_offset, dst_utc_offset, enable_dst);
}
//To spread the load of NTP client request, ntp.org maintains DNS servers that will return a list of
// available NTP servers from a pool. This routine gets a list of servers from the specified pool
// and returns it, along with a count of the servers in the list.
char sntp::GetNTPServerList(const char** ntp_pool_list, uint32_t* addrBuffer, int maxServerCount)
{
uint32_t ntpServer= NULL;
const char **ntpPoolName;
uint8_t serverCount = 0;
if ((ntp_pool_list) && (addrBuffer))
{
ntpPoolName = ntp_pool_list;
while ((*ntpPoolName) && (!ntpServer))
{
#ifdef CLOCK_DEBUG
if (CC3KPrinter != 0) { CC3KPrinter->print(F("Checking NTP server/pool address ")); CC3KPrinter->println(*ntpPoolName); }
#endif
gethostbyname(*ntpPoolName, strlen(*ntpPoolName), &ntpServer);
#ifdef CLOCK_DEBUG
if (CC3KPrinter != 0) { CC3KPrinter->print(F(" returns ntpServer: ")); CC3KPrinter->println(ntpServer,HEX); }
#endif
ntpPoolName++;
}
if (ntpServer)
{
*addrBuffer = ntpServer;
serverCount += 1;
}
}
return serverCount;
}
//Called by task to poll specific NTP server for current time.
bool sntp::SNTP_GetTime(int sntpSocket, uint32_t *ntpServerAddr)
{
sockaddr_in socketAddr;
socklen_t sockLen;
int32_t recvTimeout = 30000;
int8_t byteCount;
SNTP_Timestamp_t tsDestination;
bool result = false;
SNTP_Message_t sntp_message; // sntp message buffer
#ifdef CLOCK_DEBUG
if (CC3KPrinter != 0) { CC3KPrinter->println(F("SNTP_GetTime")); }
#endif
// set the ntp server address and port
memset(&socketAddr, 0, sizeof(sockaddr_in));
socketAddr.sin_family = AF_INET;
memcpy(&(socketAddr.sin_addr), ntpServerAddr, 4);
socketAddr.sin_port = htons(SNTP_PORT);
//Prepare the outgoing ntp request packet
memset(&sntp_message, 0, sizeof(SNTP_Message_t)); //zero the outgoing message
sntp_message.mode = client; // NTP client request
sntp_message.VN = 3; // NTP version 3
NTPGetTime(&sntp_message.tsTransmit, false); //transmitting at current UTC time
#ifdef CLOCK_DEBUG
if (CC3KPrinter != 0) { CC3KPrinter->print(F("SNTP sendto server ")); CC3KPrinter->println(socketAddr.sin_addr.s_addr,HEX); }
dumpBlock1((char*)&sntp_message, sizeof(SNTP_Message_t));
#endif
sockLen = sizeof(sockaddr_in);
byteCount = sendto(sntpSocket, &sntp_message, sizeof(SNTP_Message_t), 0, (sockaddr*)&socketAddr, sockLen);
#ifdef CLOCK_DEBUG
if (CC3KPrinter != 0) { CC3KPrinter->print(F("sendto transmitted ")); CC3KPrinter->print(byteCount,HEX); CC3KPrinter->println(F(" bytes")); }
#endif
if (sizeof(SNTP_Message_t) == byteCount)
{
#ifdef CLOCK_DEBUG
if (CC3KPrinter != 0) { CC3KPrinter->println(F("Waiting for response")); }
#endif
setsockopt(sntpSocket, SOL_SOCKET, SOCKOPT_RECV_TIMEOUT, &recvTimeout, (socklen_t)sizeof(recvTimeout));
sockLen = sizeof(sockaddr_in);
byteCount = recvfrom(sntpSocket, &sntp_message, sizeof(SNTP_Message_t), 0, (sockaddr*)&socketAddr, &sockLen);
//tsDestination = UTC time when we received reply
NTPGetTime(&tsDestination, false);
#ifdef CLOCK_DEBUG
if (CC3KPrinter != 0) { CC3KPrinter->print(F("SNTP received ")); CC3KPrinter->print(byteCount); CC3KPrinter->println(F(" bytes")); }
#endif
//If we got a good response packet, go ahead and calculate the current time.
// This is done according the the following equation:
// ((Receive time - Originate Time) + (Transmit Time - Destination Time)) / 2
if (sizeof(SNTP_Message_t) == byteCount)
{
//Change the byte order of the received timestamps to big-endian
sntp_message.tsReceive.seconds = htonl(sntp_message.tsReceive.seconds);
sntp_message.tsReceive.fraction = htonl(sntp_message.tsReceive.fraction);
sntp_message.tsTransmit.seconds = htonl(sntp_message.tsTransmit.seconds);
sntp_message.tsTransmit.fraction = htonl(sntp_message.tsTransmit.fraction);
//we don't use tsReference for anything, so don't bother swapping it.
// sntp_message.tsReference.seconds = htonl(sntp_message.tsReference.seconds);
// sntp_message.tsReference.fraction = htonl(sntp_message.tsReference.fraction);
#ifdef CLOCK_DEBUG
dumpBlock1((char*)&sntp_message, sizeof(SNTP_Message_t));
if (CC3KPrinter != 0) { CC3KPrinter->println(F("Received at ")); }
dumpBlock1((char*)&tsDestination, sizeof(tsDestination));
#endif
//Formula is: correction = ((tsReceive-tsOriginate)/2) + ((tsTransmit-tsDestination)/2)
//
//Server received request at tsReceive, we sent request at tsOriginate
DiffNTPtime(&sntp_message.tsOriginate, &sntp_message.tsReceive);
#ifdef CLOCK_DEBUG
if (CC3KPrinter != 0) { CC3KPrinter->print(F(" (R - O): ")); CC3KPrinter->print(sntp_message.tsReceive.seconds,HEX); CC3KPrinter->print(F(".")); CC3KPrinter->println(sntp_message.tsReceive.fraction,HEX); }
#endif
NTPdiv2(&sntp_message.tsReceive);
#ifdef CLOCK_DEBUG
if (CC3KPrinter != 0) { CC3KPrinter->print(F(" (R - O)/2: ")); CC3KPrinter->print(sntp_message.tsReceive.seconds,HEX); CC3KPrinter->print(F(".")); CC3KPrinter->println(sntp_message.tsReceive.fraction,HEX); }
#endif
//Server sent reply at tsTransmit, we received reply at tsDestination
DiffNTPtime(&tsDestination, &sntp_message.tsTransmit);
#ifdef CLOCK_DEBUG
if (CC3KPrinter != 0) { CC3KPrinter->print(F(" (T - D): ")); CC3KPrinter->print(sntp_message.tsTransmit.seconds,HEX); CC3KPrinter->print(F(".")); CC3KPrinter->println(sntp_message.tsTransmit.fraction,HEX); }
#endif
NTPdiv2(&sntp_message.tsTransmit);
#ifdef CLOCK_DEBUG
if (CC3KPrinter != 0) { CC3KPrinter->print(F(" (T - D)/2: ")); CC3KPrinter->print(sntp_message.tsTransmit.seconds,HEX); CC3KPrinter->print(F(".")); CC3KPrinter->println(sntp_message.tsTransmit.fraction,HEX); }
#endif
//Correction is returned in tsTransmit
AddNTPtime(&sntp_message.tsReceive, &sntp_message.tsTransmit);
#ifdef CLOCK_DEBUG
if (CC3KPrinter != 0) { CC3KPrinter->print(F(" Offset: ")); CC3KPrinter->print(sntp_message.tsTransmit.seconds,HEX); CC3KPrinter->print(F(".")); CC3KPrinter->println(sntp_message.tsTransmit.fraction,HEX); }
#endif
//Add correction to current ntp reference time
AddNTPtime(&sntp_message.tsTransmit, &m_NTPReferenceTime); //adjust NTP reference time
m_timeIsSet = true;
#ifdef CLOCK_DEBUG
NTPGetTime(&tsDestination, false); //we'll display local time
if (CC3KPrinter != 0) { CC3KPrinter->print(F(" time is ")); CC3KPrinter->print(tsDestination.seconds,HEX); CC3KPrinter->print(F(".")); CC3KPrinter->println(tsDestination.fraction,HEX); }
#endif
result = true;
}
}
return result;
}
bool sntp::UpdateNTPTime()
{
bool portIsBound = false;
int sntpSocket;
sockaddr_in socketAddr;
uint16_t localPort;
NTP_Pool_t ntp_pool_list; // list of NTP server pools
NTP_Server_List_t *pServerList; // pointer to list of ntp servers returned by a server pool
NTP_Server_List_t ntp_server_list; // local buffer for list of ntp servers returned by a server pool
uint8_t ntp_server_count; // number of ntp servers in ntp_server_list
bool checkLocal; // true if we haven't searched the local NTP server list.
bool checkGlobal; // true if we haven't searched the global NTP server list.
#ifdef CLOCK_DEBUG
if (CC3KPrinter != 0) { CC3KPrinter->println(F("sntp.update")); }
#endif
sntpSocket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
if (sntpSocket >= 0) //got one?
{
while (!portIsBound)
{ //set up the sockAddr
memset(&socketAddr, 0, sizeof(sockaddr_in)); //zero it
localPort = (uint16_t)random(0xC000, 0xFFFF); //generate random port number in range C000-FFFF
socketAddr.sin_family = AF_INET; //IP version 4
socketAddr.sin_addr.s_addr = 0; //local socket address
socketAddr.sin_port = htons(localPort); //well-known NTP port number, assigned by IANA
// bind the socket to the local port
portIsBound = (0 == bind(sntpSocket, (sockaddr*)&socketAddr, sizeof(sockaddr_in)));
#ifdef CLOCK_DEBUG
if (CC3KPrinter != 0) { CC3KPrinter->print(F("local: ")); CC3KPrinter->print(socketAddr.sin_addr.s_addr, HEX); CC3KPrinter->print(F(": ")); CC3KPrinter->println(socketAddr.sin_port, HEX); }
#endif
}
if (portIsBound)
{
#ifdef CLOCK_DEBUG
if (CC3KPrinter != 0) { CC3KPrinter->print(F("Init SNTP bind socket ")); CC3KPrinter->print(sntpSocket); CC3KPrinter->print(F("to port ")); CC3KPrinter->print(socketAddr.sin_port); CC3KPrinter->println(F(" succeeded")); }
#endif
m_change_DST = 0;
m_timeIsSet = false;
while (!m_timeIsSet) //stay here until we either get a time, or run out of servers
{
//start with user's NTP servers. These may not be pool servers, so they'll only get one IP address from DNS
ntp_pool_list = m_userServers; //start with user's ntp server list
m_localPool = ntp_us_pool_list;
m_globalPool = ntp_global_pool_list;
checkLocal = (NULL != m_localPool); // if that craps out, we'll try the local server-pool list
checkGlobal = (NULL != m_globalPool); //if that craps out, we'll try the global server-pool list
#ifdef CLOCK_DEEP_DEBUG
if (CC3KPrinter != 0)
{
CC3KPrinter->print(F("m_localPool: ")); CC3KPrinter->print(*m_localPool); CC3KPrinter->print(F("checkLocal: ")); CC3KPrinter->println(checkLocal);
CC3KPrinter->print(F("m_globalPool: ")); CC3KPrinter->print(*m_globalPool); CC3KPrinter->print(F("checkGlobal: ")); CC3KPrinter->println(checkGlobal);
}
#endif
#ifdef CLOCK_DEBUG
if (CC3KPrinter != 0) { CC3KPrinter->print(F("try user's ntp server list: ")); CC3KPrinter->println((uint32_t)*ntp_pool_list); }
#endif
memset(&ntp_server_list, 0, sizeof(NTP_Server_List_t));
pServerList = &ntp_server_list; //server ip addresses returned here
while ((!m_timeIsSet) && (pServerList))
{
//try to get a server list.
ntp_server_count = GetNTPServerList(ntp_pool_list, (uint32_t*)pServerList, MAX_NTP_SERVERS); // Just returns if pServerList is NULL
#ifdef CLOCK_DEEP_DEBUG
dumpBlock1((char*)pServerList, ntp_server_count * sizeof(uint32_t));
#endif
int i = 0;
while ((!m_timeIsSet) && (i++ < ntp_server_count) && (pServerList))
{
uint32_t serverAddr = htonl(*(uint32_t*)pServerList++);
m_timeIsSet = SNTP_GetTime(sntpSocket, &serverAddr);
}
if (!m_timeIsSet)
{
pServerList = &ntp_server_list; //reset pServerList pointer
if (checkLocal)
{
ntp_pool_list = m_localPool; //try local ntp server pool list ('local' means 'regional', e.g., US, North America, etc)
checkLocal = false;
#ifdef CLOCK_DEBUG
if (CC3KPrinter != 0) { CC3KPrinter->print(F("try local ntp_pool_list: ")); CC3KPrinter->println((uint32_t)*ntp_pool_list); }
#endif
}
else
{
if (checkGlobal)
{
ntp_pool_list = m_globalPool; //now try global (i.e., default) ntp server pool list
checkGlobal = false;
#ifdef CLOCK_DEBUG
if (CC3KPrinter != 0) { CC3KPrinter->print(F("try global ntp_pool_list: ")); CC3KPrinter->println((uint32_t)*ntp_pool_list); }
#endif
}
else
{
pServerList = NULL; //rats. came up empty. This will get us out of the loop
ntp_server_count = 0;
} //else not checkGlobal
} //else not checkLocal
} //if (!m_timeIsSet)
} //while ((!m_timeIsSet) && (pServerList))
if (m_timeIsSet)
{
// //If necessary, make change to/from Daylight Savings Time
// // NOTE: m_change_DST will have been set on the previous iteration of the loop, so that
// // we update the time AFTER we wake up. This is because the timer will have been adjusted
// // to wake up when the time-change happens
// // 'm_change_DST' is tri-state: 0 or no change, +1 for spring change, -1 for fall change.
// UpdateDST(m_change_DST);
//
// //Now, see if the time change will happen before the next scheduled wake-up.
// // If so, shorten sleep-time so we wake up at the time-change
// TaskLock(&Clock.lock);
// m_change_DST = Check_DST(NTPGetTime(&m_tempTS, false), &m_sleepTime); //if necessary, shortens m_sleepTime so we wake up at the time-change
// TaskUnlock(&Clock.lock); // Also makes sure current DST settings are correct.
//
// strBufLen = 32;
// Trace("The time is now %s\r\n", FormatFullNTPtime(NTPGetTime(&m_tempTS, true), strBuf, &strBufLen, true));
//
//
}
} // while (!m_timeIsSet)
closesocket(sntpSocket);
sntpSocket = -1;
} //if (portIsBound)
else //socket bind failed
{
if (CC3KPrinter != 0) { CC3KPrinter->print(F("Init SNTP bind socket ")); CC3KPrinter->print(sntpSocket); CC3KPrinter->print(F("to port ")); CC3KPrinter->print(SNTP_PORT); CC3KPrinter->println(F("failed")); }
closesocket(sntpSocket);
sntpSocket = -1;
}
} //if (sntpSocket >= 0)
else // didn't get a socket
{
if (CC3KPrinter != 0) { CC3KPrinter->println(F("Failed to get a socket")); }
}
#ifdef CLOCK_DEBUG
if (CC3KPrinter != 0)
{
CC3KPrinter->println(F("exit sntp.update"));
CC3KPrinter->print(F("m_std_UTC_offset.seconds: ")); CC3KPrinter->println(m_std_UTC_offset.seconds, HEX);
CC3KPrinter->print(F("m_dst_UTC_offset.seconds: ")); CC3KPrinter->println(m_dst_UTC_offset.seconds, HEX);
}
#endif
return m_timeIsSet;
}
//sntp SNTP;

Some files were not shown because too many files have changed in this diff Show More