From fa0f82332c64a1c662352711ce7cb9867d9024e3 Mon Sep 17 00:00:00 2001 From: David Cowden Date: Fri, 23 Dec 2016 11:10:34 -0700 Subject: [PATCH] Adding v2.0.0-rc1 files --- documents/images/configurationSelect.png | Bin 0 -> 19630 bytes ...t-ethernet-firmware-compile-and-program.md | 10 +- documents/iot-ethernet-mplab-ipe.md | 2 +- documents/iot-ethernet-out-of-box-guide.md | 148 +- .../nbproject/configurations.xml | 2467 +++++++++++++---- software/aws-iot-ethernet/firmware/src/app.c | 402 ++- software/aws-iot-ethernet/firmware/src/app.h | 65 +- software/aws-iot-ethernet/firmware/src/app1.c | 4 +- software/aws-iot-ethernet/firmware/src/app1.h | 7 +- software/aws-iot-ethernet/firmware/src/app2.c | 683 +++++ software/aws-iot-ethernet/firmware/src/app2.h | 293 ++ .../firmware/src/app_insight_support.c | 167 ++ .../firmware/src/app_insight_support.h | 97 + .../firmware/src/app_nvm_support.c | 84 +- .../aws-iot-ethernet/firmware/src/ca-certs.h | 1 + .../firmware/src/configuration_http.c | 289 -- .../src/configuration_webpage/DynRcrd.bin | Bin 60 -> 0 bytes .../src/configuration_webpage/FileRcrd.bin | Bin 24 -> 0 bytes .../configuration_webpage/css/mchp-min.css | 1 - .../src/configuration_webpage/css/mchp.css | 146 - .../src/configuration_webpage/error.htm | 12 - .../src/configuration_webpage/footer.inc | 4 - .../src/configuration_webpage/header.inc | 11 - .../src/configuration_webpage/images/mchp.gif | Bin 1263 -> 0 bytes .../src/configuration_webpage/index.htm | 32 - .../configuration_webpage/javascript/mchp.js | 198 -- .../src/configuration_webpage/reconnect.htm | 16 - .../firmware/src/custom_http_app.c | 1879 ------------- .../firmware/src/http_print.c | 79 - .../firmware/src/http_print.idx | 4 - .../aws-iot-ethernet/firmware/src/mpfs_img2.c | 589 ---- .../aws-iot-ethernet/firmware/src/parson.c | 516 ++-- .../aws-iot-ethernet/firmware/src/parson.h | 65 +- .../DM990004_IoT_Ethernet.mhc | 1165 ++++++++ .../FreeRTOSConfig.h | 10 +- .../DM990004_IoT_Ethernet}/bsp_config.h | 4 +- .../config.h | 0 .../configuration.xml | 836 +++--- .../framework/driver/adc/drv_adc_static.h | 0 .../framework/driver/adc/src/drv_adc_static.c | 0 .../framework/driver/cmp/drv_cmp_static.h | 0 .../framework/driver/cmp/src/drv_cmp_static.c | 0 .../framework/net/pres/net_pres_cert_store.c | 0 .../framework/net/pres/net_pres_enc_glue.c | 7 +- .../framework/net/pres/net_pres_enc_glue.h | 0 .../framework/system/clk/src/sys_clk_static.c | 0 .../framework/system/clk/sys_clk_static.h | 0 .../system/ports/src/sys_ports_static.c | 0 .../rtos_hooks.c | 6 + .../system_config.h | 270 +- .../system_definitions.h | 7 +- .../system_exceptions.c | 0 .../DM990004_IoT_Ethernet/system_init.c | 895 ++++++ .../system_interrupt.c | 1 + .../system_interrupt_a.S | 0 .../system_tasks.c | 30 +- .../DM990005_IoT_Ethernet.mhc} | 450 ++- .../DM990005_IoT_Ethernet/FreeRTOSConfig.h | 162 ++ .../DM990005_IoT_Ethernet/bsp_config.h | 612 ++++ .../DM990005_IoT_Ethernet/config.h | 78 + .../DM990005_IoT_Ethernet/configuration.xml | 2405 ++++++++++++++++ .../framework/driver/adc/drv_adc_static.h | 105 + .../framework/driver/adc/src/drv_adc_static.c | 268 ++ .../framework/driver/cmp/drv_cmp_static.h | 68 + .../framework/driver/cmp/src/drv_cmp_static.c | 111 + .../framework/net/pres/net_pres_cert_store.c | 45 + .../framework/net/pres/net_pres_enc_glue.c | 296 ++ .../framework/net/pres/net_pres_enc_glue.h | 61 + .../framework/system/clk/src/sys_clk_static.c | 371 +++ .../framework/system/clk/sys_clk_static.h | 81 + .../system/ports/src/sys_ports_static.c | 901 ++++++ .../DM990005_IoT_Ethernet/rtos_hooks.c | 124 + .../DM990005_IoT_Ethernet/system_config.h | 548 ++++ .../system_definitions.h | 154 + .../DM990005_IoT_Ethernet/system_exceptions.c | 143 + .../system_init.c | 107 +- .../DM990005_IoT_Ethernet/system_interrupt.c | 142 + .../system_interrupt_a.S | 184 ++ .../DM990005_IoT_Ethernet/system_tasks.c | 218 ++ 79 files changed, 13751 insertions(+), 5385 deletions(-) create mode 100644 documents/images/configurationSelect.png create mode 100644 software/aws-iot-ethernet/firmware/src/app2.c create mode 100644 software/aws-iot-ethernet/firmware/src/app2.h create mode 100644 software/aws-iot-ethernet/firmware/src/app_insight_support.c create mode 100644 software/aws-iot-ethernet/firmware/src/app_insight_support.h delete mode 100644 software/aws-iot-ethernet/firmware/src/configuration_http.c delete mode 100644 software/aws-iot-ethernet/firmware/src/configuration_webpage/DynRcrd.bin delete mode 100644 software/aws-iot-ethernet/firmware/src/configuration_webpage/FileRcrd.bin delete mode 100644 software/aws-iot-ethernet/firmware/src/configuration_webpage/css/mchp-min.css delete mode 100644 software/aws-iot-ethernet/firmware/src/configuration_webpage/css/mchp.css delete mode 100644 software/aws-iot-ethernet/firmware/src/configuration_webpage/error.htm delete mode 100644 software/aws-iot-ethernet/firmware/src/configuration_webpage/footer.inc delete mode 100644 software/aws-iot-ethernet/firmware/src/configuration_webpage/header.inc delete mode 100644 software/aws-iot-ethernet/firmware/src/configuration_webpage/images/mchp.gif delete mode 100644 software/aws-iot-ethernet/firmware/src/configuration_webpage/index.htm delete mode 100644 software/aws-iot-ethernet/firmware/src/configuration_webpage/javascript/mchp.js delete mode 100644 software/aws-iot-ethernet/firmware/src/configuration_webpage/reconnect.htm delete mode 100644 software/aws-iot-ethernet/firmware/src/custom_http_app.c delete mode 100644 software/aws-iot-ethernet/firmware/src/http_print.c delete mode 100644 software/aws-iot-ethernet/firmware/src/http_print.idx delete mode 100644 software/aws-iot-ethernet/firmware/src/mpfs_img2.c create mode 100644 software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/DM990004_IoT_Ethernet.mhc rename software/aws-iot-ethernet/firmware/src/system_config/{IoT_Ethernet => DM990004_IoT_Ethernet}/FreeRTOSConfig.h (93%) rename software/aws-iot-ethernet/firmware/src/{ => system_config/DM990004_IoT_Ethernet}/bsp_config.h (95%) rename software/aws-iot-ethernet/firmware/src/system_config/{IoT_Ethernet => DM990004_IoT_Ethernet}/config.h (100%) rename software/aws-iot-ethernet/firmware/src/system_config/{IoT_Ethernet => DM990004_IoT_Ethernet}/configuration.xml (82%) rename software/aws-iot-ethernet/firmware/src/system_config/{IoT_Ethernet => DM990004_IoT_Ethernet}/framework/driver/adc/drv_adc_static.h (100%) rename software/aws-iot-ethernet/firmware/src/system_config/{IoT_Ethernet => DM990004_IoT_Ethernet}/framework/driver/adc/src/drv_adc_static.c (100%) rename software/aws-iot-ethernet/firmware/src/system_config/{IoT_Ethernet => DM990004_IoT_Ethernet}/framework/driver/cmp/drv_cmp_static.h (100%) rename software/aws-iot-ethernet/firmware/src/system_config/{IoT_Ethernet => DM990004_IoT_Ethernet}/framework/driver/cmp/src/drv_cmp_static.c (100%) rename software/aws-iot-ethernet/firmware/src/system_config/{IoT_Ethernet => DM990004_IoT_Ethernet}/framework/net/pres/net_pres_cert_store.c (100%) rename software/aws-iot-ethernet/firmware/src/system_config/{IoT_Ethernet => DM990004_IoT_Ethernet}/framework/net/pres/net_pres_enc_glue.c (92%) rename software/aws-iot-ethernet/firmware/src/system_config/{IoT_Ethernet => DM990004_IoT_Ethernet}/framework/net/pres/net_pres_enc_glue.h (100%) rename software/aws-iot-ethernet/firmware/src/system_config/{IoT_Ethernet => DM990004_IoT_Ethernet}/framework/system/clk/src/sys_clk_static.c (100%) rename software/aws-iot-ethernet/firmware/src/system_config/{IoT_Ethernet => DM990004_IoT_Ethernet}/framework/system/clk/sys_clk_static.h (100%) rename software/aws-iot-ethernet/firmware/src/system_config/{IoT_Ethernet => DM990004_IoT_Ethernet}/framework/system/ports/src/sys_ports_static.c (100%) rename software/aws-iot-ethernet/firmware/src/system_config/{IoT_Ethernet => DM990004_IoT_Ethernet}/rtos_hooks.c (97%) rename software/aws-iot-ethernet/firmware/src/system_config/{IoT_Ethernet => DM990004_IoT_Ethernet}/system_config.h (79%) rename software/aws-iot-ethernet/firmware/src/system_config/{IoT_Ethernet => DM990004_IoT_Ethernet}/system_definitions.h (93%) rename software/aws-iot-ethernet/firmware/src/system_config/{IoT_Ethernet => DM990004_IoT_Ethernet}/system_exceptions.c (100%) create mode 100644 software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/system_init.c rename software/aws-iot-ethernet/firmware/src/system_config/{IoT_Ethernet => DM990004_IoT_Ethernet}/system_interrupt.c (96%) rename software/aws-iot-ethernet/firmware/src/system_config/{IoT_Ethernet => DM990004_IoT_Ethernet}/system_interrupt_a.S (100%) rename software/aws-iot-ethernet/firmware/src/system_config/{IoT_Ethernet => DM990004_IoT_Ethernet}/system_tasks.c (89%) rename software/aws-iot-ethernet/firmware/src/system_config/{IoT_Ethernet/IoT_Ethernet.mhc => DM990005_IoT_Ethernet/DM990005_IoT_Ethernet.mhc} (68%) create mode 100644 software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/FreeRTOSConfig.h create mode 100755 software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/bsp_config.h create mode 100644 software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/config.h create mode 100644 software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/configuration.xml create mode 100644 software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/driver/adc/drv_adc_static.h create mode 100644 software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/driver/adc/src/drv_adc_static.c create mode 100644 software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/driver/cmp/drv_cmp_static.h create mode 100644 software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/driver/cmp/src/drv_cmp_static.c create mode 100644 software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/net/pres/net_pres_cert_store.c create mode 100644 software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/net/pres/net_pres_enc_glue.c create mode 100644 software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/net/pres/net_pres_enc_glue.h create mode 100644 software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/system/clk/src/sys_clk_static.c create mode 100644 software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/system/clk/sys_clk_static.h create mode 100644 software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/system/ports/src/sys_ports_static.c create mode 100644 software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/rtos_hooks.c create mode 100644 software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/system_config.h create mode 100644 software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/system_definitions.h create mode 100644 software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/system_exceptions.c rename software/aws-iot-ethernet/firmware/src/system_config/{IoT_Ethernet => DM990005_IoT_Ethernet}/system_init.c (90%) create mode 100644 software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/system_interrupt.c create mode 100644 software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/system_interrupt_a.S create mode 100644 software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/system_tasks.c diff --git a/documents/images/configurationSelect.png b/documents/images/configurationSelect.png new file mode 100644 index 0000000000000000000000000000000000000000..74c3f967909543faf2bb1284669538da480f2a20 GIT binary patch literal 19630 zcmZVlbyQqW@Forq5Fj{#;O;KL9TI|T@WE{ccXtazaCZyt?ry=|-QC^o$LG8I?(RA7 z{bNo~cUSeT)~bG<8>}cVfr5yS2mk<3q$GbT0RT{VA8G&3a38<+eXSG#03xlKsHmcp zs3@tTy$#sR5(EH92FEABt9%7wLu^#{f0|eSrl$GMh9YTdkMtP>_Lo`n;DjM&Zy0h! zC$8cbC?^rPpI-@ypzvVGL!iE>bP9wcLl5!bvSwA!vX!)$xQu1I9=E!5G#89{-OrXd z9KrtuT}(|WDdPF67(i$Tmc#3K$YaEwP;CDqb5z2^5DN>2W8xmb`;>6Q_)2auDNB`g z_?&e}tD&ck!HYnDlgG)uR{nPOZy_?1dI%8Z2*F#ee zX?MHHQKT+m*H8nF#0p>0L{=kqfxs8nQq)`AzP%scv(b&d^^LuJ$^iKGb-P-dA0Z;h z+*#mWvp8+Nmw`v-Qv`Hh)H7Cxaf*K1F_x7rmg zix>0bjA2SG7-JigO@r{{rx8$_Y~7N1cxt5^PUOmKg!%qxED`IA*j0nJKY}llbHc%u z4KEbd#ta64Zr_G?n;wv?=o@kRBKvF35|t(Svk0tN6g<`hfQa>za;cA&?I-opV_0+m z89LOkFB(Er$Za}`g+9eskuR1(tBR=b8>EE(IktqF8ysmtGPWr0StMrxxZ)dlvfTtp z;^@DBv!YXH`3k8ZJj&iOQxrV-bO`|HGEl79kYj^0(y=sH`|e z86K%d$pe}&^fmP0pJLfilMx4^VWiYw)GL`026TgQk?o)2(TQ!mDxh(%B$4Z7_pT^U>fujH<1-BQR!Cv$idp=qIq=!dwZ zQS!p=1K55f=MO2N6w1$_n`1ap)P*fcwn=)4c!}jq)|%bbiq-yHg44u1#XV)S`g51T zEWw@MGM#gfd{cJA=g$Ai{E8LOHDS`oMvjLURu<;o2ir%{$4{3Zm;6;-nzT;0_(w7D zD1XMmETlGrL&81TvD~rf2H}uk3X|65wNJTXt>x@ zt!~`EBWeF+pJ5N(R#8l8wP>E$ZWg`ntcFvxdHs?1Y-lm2!_Gd>*ycE0nuF(pD6o6epWoj@z~)oEaL9ubkSPF&xfjX|uTV#^!t$)aGYX0tJt8d7WF8N*bV2 z`MKPLl!QpNe6@JB$hq2jKj%W{4CmN8QKDj0EgE@~MERhx-17YLjx+pKxK$7LuY&cu z{%gc-%xw)%a8H|0skd4;{m5}Bjc`qHC~#=Vco1d?14;>s4Z)Z21@S@g=P>v1Uq%Gm zpSBUV38)K$%cQagg<{*AemC7Y1Ui)Lqoz#B@#X{bQSwE>Az*K?8<+_^zJE9tn$}>X zJKs9K$F)bd$GLaUw8Mz4u>-6Hw$^gg?`WxMtkoN8xB<%=%UP^SCV z!8LM0qcmFlTG3WHr;X|5I<-1^tE5^PL<7uVy?UC3mc@z&VXODGt~s)v&BmV0i2R7b zh#;c=J%W+QbUk*T1*zrWeU)8GXE3h>|N8->^Q8S|lS+$#^Q;|K<6LuueHf2a8b#W^ z^`13(L#(yUD$&Y(bA!i*K&v34pu51XfT-ZGAc>oqN3RE`tDO6?YsH=QJ=w#<)5!(i zPO-z|iu>6PbPKEnj^opmSAf^B7s)f;bMVX3%ddCXH~v==#u+VI?F9?~)QWF96dDW) zv^v~d^Pfgq+h4ueG~cnmTlhEoCwC18puu+_*dZ-q+Y8UIaF*Kg%nBE=#qtc{Cy*M8@h>onf$HNED;YfPC)uz~8KBcalvLfF@#6>s{N zqKjzkTHEz^mNl#OKKynqw$GiYi9|ut#xnLY5SOQO%eCGm)yCu7v)z`8IL$=j1<}>m zCJF65^|@wsm-D+el3~oDXNDE}6#7~E29@?zngth!j^npJm?QWQRL_TRm;L;zYpSEO zPqTUO!SFSxLPZEAhfl$;%3fvWR=-XQ_zcn?6eqIA+*_WWdd!0wIRBy~qijoLN8AwK z@+>WxE@{l>E~q#nM}UYuo*Zt*VfwuyUDEV3O<%;$6Nh3)VgpAduZ#Bv6MkdcS^TtE zFM=)LTOwSRe>1IIVp;{ulh*X#1hrSB|%#mkQ6c^E)eF`fKz})k*ARLH&4pCdo+d*huc>&sG*SKoANCGwKG22tWbtyBO-m zSOk2(OPv2+I@{5l(Xk1PyceqnaB6&B2B0sX`Yxie{>$dThS7ogp$*k^yLJ2^b7-fQ zP*Z2hl*CDwp6rH&D#8Z+z`?`LzRJdaU4(6MM=bK33S6iCMY-3%0KsUszP=QGSrP`Y z9Q=b7p(+1x9ih_AR5Tnlr8ToczCr{?GHj-V@|%_J3QlcKF|BeHh5{UkS@MW>%K} zqx(Zt;J;ixMKf2BrN&P)E0DFrM;k(HJl_QVr~dz6$^UKf|B(d#U&(LmtpBg%|5Nh6 zB?VaiGvNO*=zsOr|Kxsjmk^==%m3+mAw&gi+XVnX1R(YEyNWB+X*zrwme^Il1g5D`PlKCn@|?oo-C8m}wRUd$M{q~n?V~K;QmV1Jq$Q`Ore4Lg`EKf#=;?F}<@7%0 zp>;ze6n@Hv3hXPAA)Y^XDcgm!zQT}fqTYu6+;-PIRIS$tF-z%0p+v9vq&=b7(Y#cC zgP+LSmXCVw)OrhdNG?N~N1B5cebnmRVSy65BM#>OgFv~#0tJgKoXG0EwDwX?7wHhm-ZBVLHu#u@s^2eLTs#&4pH%!v;1i`XznNxHVj2yMf9w&n;XaH;emn5 za)SMQm*Z($ZpI55X1_QyHbjidzuxn`XpNSu&8l2BYnD3YZDu!1Of;9vi1sJu7`9N~ zp?>z*LM76x7E9Kd&z26?<>!oUs=KJi>PW5INQ?BL;c_4+l4uS`5b+yt_k~Zjdp*ar zSNweufo{i0;yJBI!MudzJ-_;)zntlE<7`+3x>ndK zvh_hFwF{-tm@>*_s!xo}jbJU~u=Mn>7Baj}Czj^G8O*>OkVc z(lLd4$5MwzWUH0H;h7;pPF8xiR7Pb(WJcsVqMz7+`zrajlyak9)HjgCpm?;fqx4}J z?^up*06>dKe>895)z~TpjYz4ehGENT0TAyJTc(?@Rh_jQ3K>r?TFdtdxrK$`1T@Kl~m;*ZBrf{MU0jjA8w5rlL; z&&%t%N_o=wgp)+y41aT2EvYm+9bCP#ykbZ*ld3uMozEzu! zSL2GdJNtlc@3YMbQM7mho7QiHYPy0;%&T{wUD3-m<=l4LvajOHyXE7Lz5c|>B)v64 zGQ949ZXafWw*CcQ9TsFR!AXmHpVrMI4#qfguR6whzCG>-b~jiqlB;Xm1+I8rk8WOM z`n&<<1#eZJFR3m~GTic!NrVK>9(qG@WIDWG89O;F7Zk^Y-#zh!y*+t+?6&JjjlbD$ zhAn6f)b}o>OUV4aU-FHIZu>zkIxEUrw>)$pg|?h%4w7`wMzi67j zY~3QK*jN zkp(TNE`fiKhtNa za;s1IvnG^2pYcGHt>B>RTq%%ZUe}|HXw2z!N%igRzGL`fYQ)gdp9%PGzrWoJKc4%% zGYGohL{)UWH7l+aWO{2hyPR9sbxFli2X5nH>p3rioEu^PTr`<4HqHF~4r52aP4vYu2}Uebug$&AYGXk#?r6Tk=9KDsZ#4G9g1x8PiV}D6`b1{z?_E6|4;xel6><%CV29>AN|Jfwdi@MGI7I7bnN4-pw z>b&(jg2Q^H5&ciM#pzOA;3gwz#p`}`)AJ%6vQQ0@dE5$R$#uUyy3+-O{TvSM%T&WH zdKE*Q_w-9`{UnWStUvg?(K_#KIbW<=G7uDpyCX0B>bRUdAX?Dv?BBJJS5ncgx#sfrCD0ouYvqFz?$D&aw(icu(!q4b& zebI6=CBuYE`jNGTXSVM8N+}`D+oR2>aRE*b|bOWhLgb1 z*(gKwaIIa|yqM4%*wY|4$ja#8Tp$J<$2>)68-SFug40& zSOOsaP3CtgFXRgHZ2Kph6Qk$G(t7b@p?sG~;abcgzQfeazi~$L?~DjFvGZfbP7j(e zBO5X~i;aaPS^)gIML~g?#>cAEi8icSzX*UJyNz)fyU?^tUUC?(<+6iE&>p^ryHlI&WQewvM%=^ z`;&a*ETMl{sJjEWap&IV~bqW@~__HISqahsnsR9k!1zlzvb2=WhP!8<3yhGGxLfQCVjA@SAT z0m1B|H~5^+vCU3Ll09&@c~Uu$samPeE1|5ah)|iHm+_?B!@PsC*)OEZUSv zI4se5kaMSFZb^4d%`X|L9P%fyY8VYMym$8M=_#s`1Tr#ZudRoR$kqC!^J- zvwXmMYOR!+GBPIonFKyg#AU`U1H^!|b+9T+`$Kl?$EsEZBO+^L>6tIUh3lW_D>*Kl>lRZvOh@oah4 z;l0EHH`Uo?Wg@xxoxP!31$=B!EywWhi_yWS_Pb9=)z?l!i^Y ziIy82LK(5%9auW3$Aumn%PhuL9;+8jbw^V;IW^UEO00JGQrbIy#|qrtD`lFhIio7^uLXl-k#sS-sIGb@eO;sZ{SGaB4J_X86VppOZDCL zoS=26{Hp!f^Ac+WZ=%mMVJ2|z6B+fWMpL-sH90MYBM9rak-gH}JbUSZhTe+vV;-6! zueJ;DN*%g7X8PcH=~(9^9D!Osi@II6%j)>4S|DbTPD#Wr??0IoytA^H-eFO8mkVS! zH(l_S$w&r8Xc+Z;m5$b7yUo1f9mdo6iuG?z5i((Xk&i_%+US@wsr!SpwuhAJAPHFv zpP5Q|ZY*X0!->0Zt26aIOeKrxoGN8Nb(R(!j38PDJ%#aBgID43-WDZ1iRcLCz=Kb9 z$9X!-b4mr)g1`>zvashj6CkTgeL4dFO_ZqdIrFpR{VQ5jrcW|uKgqGMF-uXZ!Iu72 z9A34jYJ%s*+HyTj`KTtD#hn&~)pBjjlGD);pHUDY`=-S3wVux_mEcH9&6tM^Q}^{w z(R8kNPySTJvJl%z?6@?s@sEvP8XUhtxLxyQzjW$>wu6x_LI|{J6jdccEVHtVqW(pG zKfa2yh#}FG=@EBR>{6hHV39~;9SeVZ{&{&MTUxG>rk?xY2d>qt0i(D*?k1inew>`E zc@_n2VP4?mmv6UdMJC9t$WRQb<>c$0uX!ge3OKyk{omO}M|Q$rz;Qrt+j!6W*9WDJ z-H%OlC{`g5B2$Jk{)|g7&4eFcj#@5^ z3y&J#nN207hw1?-T#_O{Jo_FU!Lv3^<1&Rg-WoWQEd4fIU7F)g44&687&iPxW|6D$ z>urm{X5hm+ghm`(;yfNfJVlxE>hL;6M|+mM2#Y3oc%t6y$FwL-P!#+fGvQ ze_C1uuX%#!1%DU~qx5aGfVb6vnQfxxJ2pj81o+L^aml&V%Gf&C9Oz_`n_ay_cyXo&elZ?L8PR-Ev3PgfEudGNi7~eKE|-_Rb3x zv&kSzVp7BUs4L@c=&Mb4HGwIr7j`=CeEV=g z@{10b`@6j6;RMmYJ4`&-3745Z!7e-R3>qrGzLW|8_ZJ^Uro+<`82V6k{-B!0QlnVp z4VuIvKA6vv%0(QfQ77kbMy4jyC}S^!F~{bY!ZSfzI9L%j#?)p{j$9U$BREJo?<29o ziFwTJet1-Oro)zEP`}=g6^LM~VB2+xri?-L1GQ9S-VgUMO7?`ybaKV25nmaue3TtP zGI8v8DtoYXp|YH}W4gaIumE6q+oKWEWcrr z%$BIJ6FHZN1974@6F;xs&sd1Xtb4rXiFI!wTwKWzyZ+uEO|4G~PKD06wyz(K8O)T9 zCAtNj9vDZg(`9EbAj+&b9FHbf@OET%iEBSH!ldU13T&a$!d zZ#d>FI&yB~Y4Kz}Wh1deVCr+o8eX-nQ^p929QvQW@o(vQAqt+DHPmOb*X*FK6agTJ z?}n)#G$0%69Gt8Yuoa$Zb2PF>?+m8BjJs-U z*uKtq=?TNUK=w2D0*yDqX~L%vbf)w2k{!*BpL(J_@}?cybx+sk556_PwoNaT!4SV5h(yGtwu-A-`%@A5P$2G;Hx#1Jhtfzfh4AN_N z?dcmGiuvX+KS6Rn zV#OM7R%1>5)!DH*RO<5CW6SAcU2iwmiBnHqvkM855q^oM8TVGcxZ`)~aBMnlbOd(r zj<;GN;h*psrT*Z5^sHtxPTUK$l2xqNJ5-)H^p_7P#| zeSFp})q%DQm(S$JKa{NF7^aV9Uv=bC-}Vz>?IQ|)oYzbW0M38FbdQHgmkNyPO_lGC z`@XQtw}cdo4LT$a5qpr(zDDqAPn|5Ka6B5Gd`jjp2|ih7c2itfmqpu8%9@`*>xg?Z zxxp$|7Q2`$KJK!Q*~H8CKqX<l#41GP4Dll3eJc5-m9#KY< zQLgc=xFr)bJ~OXbu>EC95GN^+=l^~KS64E;gpyj?mz5&H!HvOQ^!fc^UK`H_!ul#_ z;&PZO>;QTfocg^9QCep{>_#8T6C@}YBpJI1itxXi%#tcZGH-R3w0W@uCvg}!Lp6qH z#xtDa=Pi=BZH3QYS-nBBUYIlS&mm238kf18NHw6!No#TKR5}VckR}QON)F{=w&-+T ziyJBp{-Teq7=&=GoV6hFMlx}{d?-%+$waaM3~T2!GL;mhFdP*s}0z|>nsRz~2j@%S&8zKk<*_3wVc8y$-5Fs*(B9a)-9XD3@OMKjc>Sw&am zm&KHxCbQWMjhHSP_8C0$Rz7>%zwYj9P_WGxWoM$;SZQ@TM2v6~;Ti48+%`Mqo@U7* z9h2YAr}!avwdlM(2xRC`#!!%07(LOh>_(1_o5O#OGIN+30mOH08TKw)>%XPU$;Z;X zCy=S%$#Qeil@(P|E1@4fAU@@xcy8<aN(n&$~9e1Cb6$J3i*z4#MK%KJTOw)nUjij=EppSzEKyGhVt;-E0gq@cOV@ ze{MV*!syD3UbpS6^BV4voV5MrR9d^ejB}AK6kzcY=6UIj87|GU$W5tg&~Mc>!Or9= z)RChnXxRy)0;lQ9X6HB`%?zHDq%AdchV_=@xqmoL8Qi6b5Y>9=ZB?UOnV#^eQYUV+ zwcMhUg?f2>V%JJSyIE48jZk#bQ~aYqcWKD_agwuAo)~6Lv+!MZ_tsVBV&{T^dFpvI zE=wQz>jbMBpN%JZjZD~Wa@j^fjh4Veg=~+I_c@2#et(p~UFu;I7>-mWmg_c4cyG|R zXS&SKu?#9LR<0*#E4Tv4ITJmSh!tpBQl*nrK_5m${^)uwl|*GJr~X3I4^0MHiERN% zzjHee450)Thq+Cb%BK*{@X1-T5!tR4Ppr1RJCqAJi$gfLd>dOkAtW`Wk_ag&_NdmF zF(l48=izFf0i@Sud+>mko6xF$fp2WNK>4ItnnV)pq2*TV6hc#uL@mfJ{<3@uC+WJU zW%CR>pox!UqJL~4K5HFkPP*#+pE5C<({Rm8vdP}=`0ng@$G83qt)k+?%069C-&o&I zBYcB=V@zFnI{yAv736V?f{3UQmh&jt8u|S3u6~(xalt(K(W7o0I0p5KDEB%GsrX_% zr3NjN!?kmsX-4}>YEBPrP~R1>6bG$2U)bS0S*!gcP9x5*hbLmf}6m;{bBQoYfF}-<|>~toW;jwDeC%r5Q)(O{V^t(oev`r(TC$#l9GTUo`PAfayetoswsHTXFkL z40D`&eq~LEF%}|H%8%$SyI{ zW~BC-+XsUFaf@anitR!F~0?r0hNj=t3T7?V3ZC~l-TXUps{c91};+BayiK}#5 zLx}aqZUyhU%+&YY!F*%bi#a3#N#o9wIYzgh1Xg!hf}-odfgI)Y8ud1# z37mZcT5Zx0%Qby$JnI$eWp#N@XJ4;e`PYM*-eBRZY~HDR%Xv*ryny+Y-jCb6eA?fe zN*spGcm%_kCJ;+R76}cT%lJt!D%YJKOZc%wJW=eYJ6wqR`&*X21{TBHtKQX4oYzRq z)rQJ=qs>-5xi zxz)VYt{+)(9@p0s7_GQpGof$(OXNnp7I0{uIdZR-wYlJav>WNK2K6W{#^~x)&w-@U z%~dIFmfeAMhV7P%jpFpfYJ-|h|7y<(lT+it;LMbSp*B$YN|FVAnWfs3JKSO(>FhPC zY@)*`+U?idq(0Z@eleU?ItIO@Lo?(*VUMo|hU^4(Ayqw<@*uRF2p@fj!a1H+pi=1r zn$KYTUHHhz?_{V&W7i+cja{x=KBYy5{Bf+-~w$@%;_!rkJ0(dvN5uR@z83OhxK!6$8ix@YW zLOA)t^yi6S=Kg?=7yHh(UvjmhRmS2EGP$z{9tm$Pji`oBoU&R)!rj$Vrt?_B5+3S$XCU%2iY7lPIfNLoNy$Y9TjwZg1<)f&vdGWkjSi$*dbfB+$H4B zP@KX!%dqz5a*JF<&aK4Dk}vv!VBtpCnE{eiEvC&pxHR*nsTB9U`b6EQjL>H* zTB!r*AvHdj@DyJS3VrnVxU6P0T3BP&lTD)Vs&E%eskJ0H{gq3}jM;U{I$Y#ZVxFOa z@ayBS>IL~_g)h;)4257R5Z62{MLDCq1kx?Kii~rbHs`h5>b~KQqHw%z#yac{3zJ`0 z3k64-#+D6(}f>%VdBKGLRul(^BU_1VGSvpmTN>g*~>ixon_ktLrq@73#?-y1y3JfG`3?O`t zDCNU1pVl6#h))Q#Q6fM|-z5t&j^68hxw7@o~h zz>*z+;0^oLiSFMm4n0TXA9}wlZf>0TRZ_Mn5mLVpYCnK6{Sqe9!v}WSMX8^FA5ZkH z6`#{QE{QBvkUo$?@&kUdLW7ZUbog7{h~#Rb{=%%&94B`BJ>BmU{qIjhvawzIy>=uG zYwjhs{**zn2A&=_lMmVZ!=6El&_Ug1h{e=Olyu&kf^|MMc|O# z=VhCYMG7F0$o+oRMdp01&FVGxe6B22us+`7nji31J1rmk0hmr^mNYth7p+e1ocI4^j#b?rPR0L2`?LDrN zO?;qICj2iqhts>;k;13}y&nNRGd!WKZ<_rO-PNK=rc{M)o8=c6c+{_`&F=>}k-xLX zVyI+xic89;wm_F#z0e|6x(C=Fmue?>1i0ox2V96i^ZR{bbF0bscO1wC9YzIP z+?L3Rqg6{NPtL}ruzX1z8&~{fwHd-tUg=ES*&A7iWayfc>%Eo2jb?>?n&A+RkAlAS zqxgq~w=hm;%Z5J^qcCng*=&1;&)cId5HPyZ^ivTmZ%_J_vpvlecV z<1yHvvqR9fAEer&n6+{)8A7hso92adpCB3KRp0eX za^5tr^fi19I=e)q@LMBi?SH@!D*p*960S|#t=faQ>v1J&o@fy2mCyUVj~L(LfB2)v zd0RtWx<1nPP({A`6$jX7c+!6=yrRV5kPk@7$ch|*B1+J$bO|xE8ega~0xi{=P1RYb zx10sl3D4`eq=SO9Fu2H11dz`sHZ*>J_PXrFx$1%^(eTN&sBQNRVe!+9J&((o6DAGK zIHyH|)W*XqoHJi%S~DYMSdv>*Hw;QU49q83ErWKK!lw#cSQg__&G_UFZ4T64_)+3J zhl!TgPZn#eJhppfNc4YxiS+;V?o)u+;cZb7>lQgff2DOAy?EJA2>b~)+Y6}5og4f) zZQLqKEfPjxIJtT>ThjZC#iie=2vd3K?0RK?WL&2C$gkv)t3dc$d_&@cB+%fDR#y@Q zF~G4YlLS4*#}-%0rE(z%&)>xsR|nV|%INQ$GUYnmE9bebOO%PXxz8|FzeV1Uh#T(B zOv>ynnp|Hi2oFt4+;x98S>8^4_m*)#n{Ss~4%5+E%oouD`yFG~;Mj6HDEekRmw83A zw)gGr7VHo)&*Hg+)S6bN&YZaWaU49i%GG;5hyY)Y6>And7R_I)^QtFrR!PFxY;S(G z)#AEsk2dW5d0k#U#=v71gT|Xp>Q3A7$j0+A^7~F{JIVKQ!sLmlr}l3Ir^9zh9@@zR zCBaRUPZF}&Qr$BeYJ8jPa{7z5bz^GOW_yq6>PeBqT%<3pt**yGUOq%a_+z&2HtlCH zMB|`}bTcx0MdV@LP*A-9P?3y)0$`sZFM0h&B4u$=0dfhDrE<`i?1FdXZrQe~0x0L1J3UU6 zme3<~_x<7eg;8tJ17|V3LlstrUK7CFu`o=iJRFs-{1ZUIL7ZUzk32$Qh_iz(phRnw zr9XO+44#-&E8GgMSg9_>leJU?Oohm1%HfNMhOX{YWljADjZ#qwqjJNrlXBcKfe1`* zcD|fA5C>1NJjU)m!n0`1C*8tT2AWIj*m*FD;DT(*_JnkZ`C+XyD(f52q^InD{lLW2 zbufE_qerNJCh$?GZOkYu#OFlt4MEr+yJS&QI6>(yYi?H`w3S8q@hv%O`qqC( z&YcMQBF_`OIcttdUo^(P;{)Kd{$hA{vyxTLA-8AyA+rSla3g{jJuavpcgKeI8c7{e z4!DhsbMW38ET*NwV;M%Egy`To71Ej!V@@RDRM|gYYK+0) z$-eO0B^p0(S1#NV%<*5%R2^6VHdyRiyU^u7OoJ%0j=K-6#~PVfV1ap1AGU>Lppq-> z>gn#(;yK2`!qLr`Hn+!qR^RcqsbrS*rwZ}POL?YH%gBPkT`Rxwd)oUXfPr0PuQH&8 z;9@Ykc(z#PcvX~*qC);+L!pQ|C$NQ76y!%8U<^%QiTu)&?|PHIFV5T4JMOKGR#aAI9J9&2hfl4qC7I@D<;VXC)maKd~$sDd#6DrrCVX2!#Q{EGrE3B7X0opLwD7q-IROC|@$RhXsA)o$#- zHgK6GyC}PH{fwt)*a)dQm<}FKE8sD}?)Tqvg7UZj#Weiuu%Ch&Ylf;a&VetpPT_&O zUC3M3gX|{jP#2WN+EeT00Y5nMxs7nO!9M$?ngD>r1T0%!S}@V9GpDj?f6QMcrd+FL zJu}?rJ!{-9EepchWgPpbKP=JcO@eO}nUypB{`PwAgL8Ca$_hXh`7N*ojhB;5igu7| z2c(TqDf27MV)14+1XqTGG?a02U3|(!HBJr4zATMw6VzMHK$^ z58YGNo=PUpk27NO3{}Mu5QD)T9aju)mP9Mu*k9A;FUk+!C5Ne4rP3t+pP{gp*d zj6`k(X8jz}9?^RkT$V=H3e2{}Dd}1($b>)r`=kC=Td(nZ^RA#653xk zmd~&Mus?qziNSr0$1M77YL?S0M$ZzzxyB{F`1>-)%S>zf)ir&3vdu`z6Y*X|s!t=RlN-SQt&GOH60V+}&yQir$|@v5U69irE+O9??$N z7j+5g9tmBHTqLPgnh!E(q1`UBJ}U(ZEfEHYzYgGbK%+5h{c-K#5WI4HZE5zreS37} z1=5@LO2u{d*!qc7=p-68?QKp~*>Z+iaF->BHO4>=oy6=ZPy!p_0bKZBDyqqK^oQxA zu&w%J@F63$ZACIk+-W?oO&~Euhv`pmACVeZDCSC!oyde&7k$D)yMqLfy?LarIBBa* zHD6)S;y)bni|ayZs?Fqv&lZUi!0I}Pa(!)))NJkD!OAUkK|}2qm)^3Yb_@%5&qv&m zu$w--s!HGKf2eo;G4gFYC@%TL�mc|n?iP!8GoiTuZh&NOE_ za;e}9Kki1HZ($SsAY8Uwozgg-BN7{5T{8@rw&wp*@3AA}7Wj(sLc`!^xM*A$7nG&{ z!QWQx!^J$V{Ol2sPgVgPkw1GiGi&Qa5oqx;wnbj!ixCSr9il4dWQ>t<55Im|t%mlo z$DrjJI1rtT81LymZyv%=hwykW`2ldbwTHC^9nrQ7%8I$L7T6b&&Iua)#9OS6yWlclm;daHYPs7U9 zu_w=>%NSk7OAYUpq`yPDZw*Yv+{2ORd=Kil*W`@YPr7~Rb4KB2%SUH zF$#4sjd;^#A` zVA`dr4MoZoHmVQ(2>sb&kYh7zPaDe9W`l~i(;g}GWcobUuYf=FgCKyX&-EkLxieN3 zxtrJXsT&V9>GQMH78PJIMtncJCKo>SgZWZ~BeIta6*1u7gX%_S_c=>Q;%L&u0%`pH zddNQ!{yuwV4E*%Y%<~`>z|#Ip zK{X@S#b;-d&Gzs!2bUL;h2~V&w+Vd!9{v$q%`jegFrQ-TVt6Ax-?L^gMpl*ne+<*T}8J;HSV%_y1Noa;({Va+(1A^v-! z;3&>?6_@+{wSxyj&Clo*1VkxEUgMd<>(~WWX=r-!dKtk;G5@;mep5k_4Hi>t@gfSutTVYnvWV^KlB6UlkZQ zZrq(NFLQH*C!%)2XJ6#~eE8sp+4w>82g~3~n3$M~JU-J$8s*>LL$5Mnu#%fta?wE+kR zdSO``h=)vCP;Im(ICO!ELifnR7tpr7qIXTbv6YQxH&7Dv65B8hf7$<0Ae~O6Bm|8s ztkeIVrZpo>fpGKNsPWO-aCMvg;o!q(7hW4#;&lV3sOxmFaf}UP63O!?VCGx!7vZ)t2dQ=~E|KN3%99CUsfCS_wwpia_bY(`VTh>0zMx2u<29_ZBM zLw%<_2=HQ7DOw!q*dUA!1c-TwG9wKEu#3>4_|e(mAFTz#fQoS(xlz9waEaqt_}w>~ zcrz_eXI#8^aUt6V`C<{WV<_nNyrSiuXAJuAgNqFO+5-9gWWoLNYyd@`2l*on#oT%@ z+!y-;$!Iqf#1&5hoJbgnn7XC0qPF`H4W2iub_O>MaXPc(hU4dL<<*Y7X}I<)BN|UM zOgea^dj0As&9G>^$KoT}y+w*+sKxUsF2(!2v>qMeX}d`DIchloJhn5P?b2{{-FnJQ zlTl^@H#rHQvPJ?JN{rT-qs7GoFp{4Zask}6G=+tAUv8TQx4b*SlGoRz)+W=EyFzQN%2yk z$;2zEAYCAVU0ebTvD{g#c*Rk$@F3nCLApQ!fdm2xBp`u6lSx2WWtsHuyYDW`>Vvui z2_!9nK$A&YbV0^I0)YhLkw5@4@kl916G$MCK++NjKqhI?1sMYg1QLix0)b5?9x0W> zH15jMa>!mvS>ijZXcWjInsmxOE&!Rbe+Ef&z=Eiqomk8k53x_m&Q5Hz5HG#{`s;GZ zC6~mTTpoYbgZ5I7q9ryWOnvnys{u2!=*$h$9$}rZranJYp=BcgUhx4 zR*iW`rrldtrrlFF9JW{1+w$Xmon_X0S4OQW0GX)bDc_Na0*vmomT11ROdszPC`%qo ztL}JZLApeTOFMRKH!m!+k-FLX6T;=1-?A}}$)Zt@${8G*wP}aj7i+ zeT2;u=`R>AMUqSf2&Zw!OHVxUgxzR~w>=vyz3{>d@n)?M>EgA?G;iKq#*G^n-YkkQ z+1Vq76AjpJhP`Xq=$v%X2!nJY@{d+ld5B|ksf_f3_N4v=BOjA_BmOD0K8;n|8AczlQtW2z$@G|Ni@Smps4t@(`Bj>=K%c0t@`(pYiGaGJC}1a@kX(Wz(Ed z_O{M_Xmp|5+qPn=Y>x3kb}(EjB(jQiK}U$^$NnE|IL`Kpq-RGn&BqRFS6y|LRj+Tq z{dRli5OEMHw*nG7&prI`!{K~aUwyTV963@hzx;B$OB;FUpx0b;jm=^N%PW6FUfJo9cOp3L;E4@vBw^> zCplbv@x^lQz4zKM?&1z-D;9!Q2+w!VGj|up42)y0FCV>pL^~(yTLbQJ^l34a>f~F2pyH-1Zi;@ znmzgClQtcoM2BSOv{Vv&#!L6zcb`34g!H;;lL8(<%+LXFedwWwEO2rp3^OUDx$U;w z2w;S4$cNk$;olaV z;=di{`6|FrH2#hQhRH(%Pmvq$Df)44uHk)C_9mGz^Dk+2#^X`BN$r!4T2&C4Y6&FL zFfY9DLc71~l3nxu>6gx;@v4bnrZE*f874wG3Q6^#IU(;I&5KeSIc%+C{mjGt60NSNE1<6#+F z0z-iF&O6U`bl%SF@v7zE=PgdShS8z$>$SSnN9WRO@^H;QzS;>%!|4YM&p2@a!fnx_ zML3@gOu?U9XRP8lq>NJsAl<^0{914;AiB|2Qn$=M;5G7CTkf2GW-(!ED7NxyTr{Qc?^<@x_S zFB^^hucnEOPS<$|@FTe)kqy%Kf@hY6Bjf^-V1+C=kufG<~g4PozZ3gqF^>BT`1sB+| z2t(s=<1~F~y8vUQj5N9A%IoFiK1awESKlD7zx0#|t1JfrH1~fdmz{NzWvhGsw`9B3 zsuON2(fAEOCYp50d0f1WlOsGB`*TzZ$Dv>k08}6hkr-tG9l+q8d+rH0deUL6rNc0k z0))JE>NW15L4)McM<2Cz9c&uRW?|1j3!q%;pfO)|*=5#9no991AMun)T21e|t{DfaJkKh&UFcy)P^N&9HBw!^FfJ_Bx2oL® Harmony Integrated Software Framework v1.08.01 for your OS from here: [Harmony](http://www.microchip.com/mplab/mplab-harmony) +- Download and install Microchip MPLAB® Harmony Integrated Software Framework v1.09 for your OS from here: [Harmony](http://www.microchip.com/mplab/mplab-harmony) - Download and install Microchip MPLAB® X IDE for your OS from here: -[Microchip MPLAB® X IDE](http://www.microchip.com/mplabx) (3.35 tested) -- Download and install the v1.42 XC32 compiler for your OS from here: [Microchip MPLAB® XC32 Compiler](http://www.microchip.com/xc32) +[Microchip MPLAB® X IDE](http://www.microchip.com/mplabx) (3.40 Required) +- Download and install the v1.42 XC32 compiler for your OS from here: [Microchip MPLAB® XC32 Compiler](http://www.microchip.com/xc32) More information about Microchip tools can be found on [Microchip's developer help site](http://microchip.wikidot.com/swtools:start) @@ -32,8 +32,10 @@ Example below is shown on MAC OS X, these instructions may vary slightly on diff - Navigate to: ` /aws-iot-firmware-pic32mz/software/aws-iot-ethernet/firmware` - Select the project __aws-iot-ethernet.X__ - With your project opened, right click on the project __aws-iot-ethernet__ in the Projects tab and select __Set as Main Project__ +- Select the configuration for the board you wish to program from the dropdown box at the top. +![](images/configurationSelect.png) - Follow these directions to install the Microchip Harmony Configurator (MHC): [Steps to Install MHC](http://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB%20Harmony%20Configurator%20(MHC)%20and%20MPLAB%20Harmony%20Graphics%20Composer.pdf) -- Open the MHC by clicking __Tools -> Embedded -> MPLAB Harmony Configurator__ +- Open the MHC by clicking __Tools -> Embedded -> MPLAB Harmony Configurator__ - The MHC will prompt asking to choose a Harmony framework to use, select "Yes" and select the location of your Harmony install and click "OK" - The MHC will then ask if you want to open the configuration file __IoT-Ethernet.mhc__ for the __aws-iot-ethernet__ project, select "Open" to proceed. - With the new Harmony framework selected for your project, you will need to regenerate code by clicking the generate code button. ![](images/generateCode.png) diff --git a/documents/iot-ethernet-mplab-ipe.md b/documents/iot-ethernet-mplab-ipe.md index d7dcdad..6603ad6 100644 --- a/documents/iot-ethernet-mplab-ipe.md +++ b/documents/iot-ethernet-mplab-ipe.md @@ -15,7 +15,7 @@ You will need the following Microchip development tools to program the Microchip - Download the latest HEX file for IoT Ethernet from here: [IoT Ethernet Project](https://github.com/MicrochipTech/aws-iot-firmware-pic32mz/releases/latest) - Download and install Microchip MPLAB® X IDE for your OS from here: -[Microchip MPLAB® X IDE](http://www.microchip.com/mplabx) (3.35 tested) +[Microchip MPLAB® X IDE](http://www.microchip.com/mplabx) - PICKit 3 In-Circuit Debugger/Programmer (or other programmer) --- diff --git a/documents/iot-ethernet-out-of-box-guide.md b/documents/iot-ethernet-out-of-box-guide.md index aa738bd..ee361a0 100755 --- a/documents/iot-ethernet-out-of-box-guide.md +++ b/documents/iot-ethernet-out-of-box-guide.md @@ -16,157 +16,25 @@ You will need the following Microchip development tools to run out of box demo - Download and install [Insight on Things](https://github.com/MicrochipTech/aws-iot-insight-on-things-desktop-app) desktop application; [Download latest version](https://github.com/MicrochipTech/aws-iot-insight-on-things-desktop-app/releases/latest) - To learn more about building the project from source or just upgrading the firmware, read [IoT Ethernet Firmware Compiling and Programing](iot-ethernet-firmware-compile-and-program.md) in our documents folder -#### AWS Tools and Applications -- You will need an AWS account to use AWS IoT. - - For more information how to setup an AWS Account please go to [AWS](http://aws.amazon.com) main page - - Please check with your IT or IS department on your company's policies on using cloud computing, or to see if you have a corporate AWS account that should be used. - -- To use the AWS IoT services you will need to make use of _AWS Command Line Interface_ (awscli) tool. For more information on how to install, configure, and use the awscli tool please go to [AWS Command Line Interface User Guide](http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html). - -> NOTE: If you are a **Microchip Employee** we have a corporate AWS account that must be used. To setup your AWS IoT device please go to https://setup.iot.microchip.com for more information - --- -### Setting Up the AWS IoT Service - -To setup your AWS IoT service to work with the _IoT Ethernet Kit_ you will need to work with the awscli that you installed in the previous section. - -1. Using the awscli you will need to find the endpoint that will be used for your AWS IoT account. To do this run the following command in your terminal/command window. - - ``` - aws iot describe-endpoint - ``` -You will receive the following back that you will need to add to the firmware in the next section. The output will look like: `.iot.us-east-1.amazonaws.com` -- Create certificates that will be used in the application firmware by running the following command in your terminal/command prompt window: - - ``` - aws iot create-keys-and-certificate --set-as-active --output text - ``` - > You will need to copy the output on the terminal/command window to text files for the certs and private key. Please also note the _certificate arn_ value that will be used later in this section; it is the first long string of text that you will seen on the screen. - > - > NOTE: this is the only time that you will be able to see this information and make sure there is no text or spaces at the beginning of each of the files you create. For example in the output below you will need to remove the `KEYPAIR` text and spaces so that the first line of the private key starts with the dashes: - > - >``` - >... - >Gmh/2ib2NsA8Tf+8drTQXf3gQ4oemdOfnA4IlXiFGA9QAP9i/krzYvaVAlSogLWh - >wRHaP1hzPuS9+0UjZkS1Uzyfqmd+vR4Om8S+t2VmEwYMJMG3mUaFXdhBhMDJ - >-----END CERTIFICATE----- - > - >KEYPAIR -----BEGIN RSA PRIVATE KEY----- - >MIIEpAIBAAKCAQEAynvp1r7jl9HzbAVCgVWzYmKu4O6nNM4wBZQ1YjHpSOL1+joF - >KKcXM8eS8jmUbHRJ84JeDrr9A50ok1cyUCDBPkf6c7VO4xWGzXruR3WoVjRYq3vc - >... - >``` -- Create and attach the following policy that will allow your thing to publish and subscribe to the AWS IoT service - - First create a file that will have the policy information in it and save it to you computer: - > NOTE: Make sure you replace `` and `` with the AWS-IoT region and your AWS account number - - ``` - { - "Version": "2012-10-17", - "Statement": [{ - "Effect": "Allow", - "Action": [ - "iot:Connect" - ], - "Resource": [ - "arn:aws:iot:::client/${iot:ClientId}" - ] - }, - { - "Effect": "Allow", - "Action": [ - "iot:Publish" - ], - "Resource": [ - "arn:aws:iot:::topic/$aws/things/${iot:ClientId}/shadow/update", - "arn:aws:iot:::topic/$aws/things/${iot:ClientId}/shadow/get" - ] - }, - { - "Effect": "Allow", - "Action": [ - "iot:Subscribe" - ], - "Resource": [ - "arn:aws:iot:::topicfilter/$aws/things/${iot:ClientId}/shadow/update/delta", - "arn:aws:iot:::topicfilter/$aws/things/${iot:ClientId}/shadow/update/accepted", - "arn:aws:iot:::topicfilter/$aws/things/${iot:ClientId}/shadow/update/rejected", - "arn:aws:iot:::topicfilter/$aws/things/${iot:ClientId}/shadow/get/accepted", - "arn:aws:iot:::topicfilter/$aws/things/${iot:ClientId}/shadow/get/rejected" - ] - }, - { - "Effect": "Allow", - "Action": [ - "iot:Receive" - ], - "Resource": [ - "arn:aws:iot:::topic/$aws/things/${iot:ClientId}/shadow/update/delta", - "arn:aws:iot:::topic/$aws/things/${iot:ClientId}/shadow/update/accepted", - "arn:aws:iot:::topic/$aws/things/${iot:ClientId}/shadow/update/rejected", - "arn:aws:iot:::topic/$aws/things/${iot:ClientId}/shadow/get/accepted", - "arn:aws:iot:::topic/$aws/things/${iot:ClientId}/shadow/get/rejected" - ] - }] - } - ``` - - Load the policy to the AWS IoT services with the following command: - - ``` - aws iot create-policy --policy-name 'MQTTandShadowPolicy' --policy-document file:// - ``` - - You will need to attached this policy to a principal to allow the cert the rights to publish and subscribe to topics: - - ``` - aws iot attach-principal-policy --principal '' --policy-name 'MQTTandShadowPolicy' - ``` -- Create a thing shadow based on the MAC address of the board: - - ``` - aws iot create-thing --thing-name '' - ``` ---- ### Running the Demo -There are two parts to running the demo. First you have to commission the demo so it knows how to talk to your AWS Account that you setup in the [Setting Up the AWS IoT Service](Setting Up the AWS IoT Service) section of this out of box guide. Second is sending and receiving data from AWS IoT. +There are two parts to running the demo. First you have to commission the demo so it knows how to talk to your AWS Account. Second is sending and receiving data from AWS IoT. #### Commissioning To setup and run the demo follow these instructions: -1. Plug the IoT Ethernet Kit into a router or switch using an ethernet cable -- Power the IoT Ethernet Kit by connecting the supplied Micro-USB cable to a power source and setting the power switch on the board to USB -- Connect your computer to the same network that the IoT Ethernet Kit is connected - - Your board will register a Multicast DNS (mDNS) name with the local network that will allow you to access a configuration webpage. -- Use a bonjour or multicast DNS service to find your board's IP address and enter the IP address into a web browser. The kit will have a service name such as `xxxxxx_IoT-E` where `xxxxxx` is the last six characters of the kit's MAC address. - - Alternatively you can try entering `xxxxxx_iot-e.local` into a web browser to navigate to the webpage where `xxxxxx` is the last six characters of the MAC address on the board -- Once the web browser finds and displays the IoT Ethernet Kit configuration webpage - - Enter your AWS IoT Endpoint Address that you received from the previous AWS IoT Service Setup section. The endpoint will have the form `.iot.us-east-1.amazonaws.com` -- Copy and paste your AWS Certificate into the box labeled AWS Certificate. - - The cert should look like - - ``` - -----BEGIN CERTIFICATE----- - - -----END CERTIFICATE----- - ``` -- Copy and paste your AWS Certificate Private Key into the box labeled AWS Certificate Private Key. - - The key should look like - - ``` - -----BEGIN RSA PRIVATE KEY---- - - -----END RSA PRIVATE KEY----- - ``` -- Click the __Join__ button and a _Connecting to server_ page will appear showing the endpoint that the IoT Ethernet board will connect to along with the AWS Thing Name (MAC Address). - > NOTE: The information you enter above will be sent in the clear and is not secured as if you where using https; this is an option that you can add to your code later +1. Power the IoT Ethernet Kit by connecting the supplied Micro-USB cable to a computer that will be running the Insight on Things application in the next step and set the power switch on the board to USB. +- Download and install the [Insight on Things](https://github.com/MicrochipTech/aws-iot-insight-on-things-desktop-app) application v2.0.0 or greater. +- Follow the instructions for running the Insight on Things application. - You will see a LEDs D1-D6 light up while the board gets initial data from the server. - - If not, please see the [Status and Error Code Table](Status and Error Code Table) table below for more information + - If not, please see the [Status and Error Code Table](Status and Error Code Table) table below for more information. - The board is now connect and running; there are two blue LED status indicator on the board. - - LED D6 will flash briefly when transmitting data - - LED D5 will flash briefly when receiving data + - LED D6 will flash briefly when transmitting data. + - LED D5 will flash briefly when receiving data. #### Sending and Receiving Data with AWS IoT -This demo is controlled though the AWS IoT shadow registors by the [Insight on Things](https://github.com/MicrochipTech/aws-iot-insight-on-things-desktop-app) desktop application that we provide you. [Click here download the latest version](https://github.com/MicrochipTech/aws-iot-insight-on-things-desktop-app/releases/latest). You will need to follow the README.md guide on the github page to setup this application. +This demo is controlled though the AWS IoT shadow registers by the [Insight on Things](https://github.com/MicrochipTech/aws-iot-insight-on-things-desktop-app) desktop application that we provide you. [Click here download the latest version](https://github.com/MicrochipTech/aws-iot-insight-on-things-desktop-app/releases/latest). You will need to follow the README.md guide on the github page to setup this application. --- diff --git a/software/aws-iot-ethernet/firmware/aws-iot-ethernet.X/nbproject/configurations.xml b/software/aws-iot-ethernet/firmware/aws-iot-ethernet.X/nbproject/configurations.xml index a05fcb7..1fa30ba 100644 --- a/software/aws-iot-ethernet/firmware/aws-iot-ethernet.X/nbproject/configurations.xml +++ b/software/aws-iot-ethernet/firmware/aws-iot-ethernet.X/nbproject/configurations.xml @@ -6,344 +6,427 @@ projectFiles="true"> - + - ../src/system_config/IoT_Ethernet/framework/driver/adc/drv_adc_static.h + ../src/system_config/DM990004_IoT_Ethernet/framework/driver/adc/drv_adc_static.h - ../src/system_config/IoT_Ethernet/framework/driver/cmp/drv_cmp_static.h + ../src/system_config/DM990004_IoT_Ethernet/framework/driver/cmp/drv_cmp_static.h - ../src/system_config/IoT_Ethernet/framework/net/pres/net_pres_enc_glue.h + ../src/system_config/DM990004_IoT_Ethernet/framework/net/pres/net_pres_enc_glue.h - ../src/system_config/IoT_Ethernet/framework/system/clk/sys_clk_static.h + ../src/system_config/DM990004_IoT_Ethernet/framework/system/clk/sys_clk_static.h - ../src/system_config/IoT_Ethernet/FreeRTOSConfig.h - ../src/system_config/IoT_Ethernet/config.h - ../src/system_config/IoT_Ethernet/system_config.h - ../src/system_config/IoT_Ethernet/system_definitions.h + ../src/system_config/DM990004_IoT_Ethernet/bsp_config.h + ../src/system_config/DM990004_IoT_Ethernet/FreeRTOSConfig.h + ../src/system_config/DM990004_IoT_Ethernet/config.h + ../src/system_config/DM990004_IoT_Ethernet/system_config.h + ../src/system_config/DM990004_IoT_Ethernet/system_definitions.h + + + + + + ../src/system_config/DM990005_IoT_Ethernet/framework/driver/adc/drv_adc_static.h + + + ../src/system_config/DM990005_IoT_Ethernet/framework/driver/cmp/drv_cmp_static.h + + + + + ../src/system_config/DM990005_IoT_Ethernet/framework/net/pres/net_pres_enc_glue.h + + + + + ../src/system_config/DM990005_IoT_Ethernet/framework/system/clk/sys_clk_static.h + + + + ../src/system_config/DM990005_IoT_Ethernet/bsp_config.h + ../src/system_config/DM990005_IoT_Ethernet/FreeRTOSConfig.h + ../src/system_config/DM990005_IoT_Ethernet/config.h + ../src/system_config/DM990005_IoT_Ethernet/system_config.h + ../src/system_config/DM990005_IoT_Ethernet/system_definitions.h ../src/app.h ../src/ca-certs.h ../src/app_nvm_support.h - ../src/bsp_config.h ../src/app1.h + ../src/app2.h + ../src/app_insight_support.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/ecc.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/arc4.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/pwdbased.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/tfm.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/asn.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/des3.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/rsa.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/aes.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/md5.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/sha.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/sha256.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/sha512.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/hmac.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/hash.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/compress.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/random.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/coding.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/error-crypt.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/integer.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/internal.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/logging.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/memory.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/misc.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/port.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/settings.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/types.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/version.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/visibility.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/asn_public.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/camellia.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/certs_test.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/dh.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/dsa.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/ec.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/hc128.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/md2.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/md4.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/mpi_class.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/mpi_superclass.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/rabbit.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/ripemd.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/ssl.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/ecc.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/arc4.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/pwdbased.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/tfm.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/asn.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/des3.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/rsa.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/aes.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/md5.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/sha.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/sha256.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/sha512.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/hmac.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/hash.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/compress.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/random.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/coding.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/error-crypt.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/integer.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/internal.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/logging.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/memory.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/misc.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/port.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/settings.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/types.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/version.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/visibility.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/asn_public.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/camellia.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/certs_test.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/dh.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/dsa.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/ec.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/hc128.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/md2.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/md4.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/mpi_class.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/mpi_superclass.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/rabbit.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/ripemd.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/ssl.h - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/crypto.h + ../../../../../../../microchip/harmony/v1_09/framework/crypto/crypto.h - ../../../../../../../microchip/harmony/v1_08_01/framework/driver/ethmac/drv_ethmac.h - ../../../../../../../microchip/harmony/v1_08_01/framework/driver/ethmac/src/drv_ethmac_local.h - ../../../../../../../microchip/harmony/v1_08_01/framework/driver/ethmac/src/dynamic/_eth_dcpt_lists.h - ../../../../../../../microchip/harmony/v1_08_01/framework/driver/ethmac/src/dynamic/drv_ethmac_lib.h + + + ../../../../../../../microchip/harmony/v1_09/framework/driver/ethmac/src/dynamic/_eth_dcpt_lists.h + ../../../../../../../microchip/harmony/v1_09/framework/driver/ethmac/src/dynamic/drv_ethmac_lib.h + + ../../../../../../../microchip/harmony/v1_09/framework/driver/ethmac/src/drv_ethmac_local.h + + ../../../../../../../microchip/harmony/v1_09/framework/driver/ethmac/drv_ethmac.h - ../../../../../../../microchip/harmony/v1_08_01/framework/driver/ethphy/drv_ethphy.h - ../../../../../../../microchip/harmony/v1_08_01/framework/driver/ethphy/src/drv_ethphy_local.h - ../../../../../../../microchip/harmony/v1_08_01/framework/driver/ethphy/src/dynamic/drv_extphy_regs.h - ../../../../../../../microchip/harmony/v1_08_01/framework/driver/ethphy/src/dynamic/drv_extphy_smsc8740.h + + + ../../../../../../../microchip/harmony/v1_09/framework/driver/ethphy/src/dynamic/drv_extphy_regs.h + ../../../../../../../microchip/harmony/v1_09/framework/driver/ethphy/src/dynamic/drv_extphy_dp83640.h + ../../../../../../../microchip/harmony/v1_09/framework/driver/ethphy/src/dynamic/drv_extphy_dp83848.h + ../../../../../../../microchip/harmony/v1_09/framework/driver/ethphy/src/dynamic/drv_extphy_ip101gr.h + ../../../../../../../microchip/harmony/v1_09/framework/driver/ethphy/src/dynamic/drv_extphy_smsc8700.h + ../../../../../../../microchip/harmony/v1_09/framework/driver/ethphy/src/dynamic/drv_extphy_smsc8720.h + ../../../../../../../microchip/harmony/v1_09/framework/driver/ethphy/src/dynamic/drv_extphy_smsc8740.h + ../../../../../../../microchip/harmony/v1_09/framework/driver/ethphy/src/dynamic/drv_extphy_smsc9303.h + + ../../../../../../../microchip/harmony/v1_09/framework/driver/ethphy/src/drv_ethphy_local.h + + ../../../../../../../microchip/harmony/v1_09/framework/driver/ethphy/drv_ethphy.h - ../../../../../../../microchip/harmony/v1_08_01/framework/driver/nvm/src/drv_nvm_local.h - ../../../../../../../microchip/harmony/v1_08_01/framework/driver/nvm/src/drv_nvm_variant_mapping.h + ../../../../../../../microchip/harmony/v1_09/framework/driver/nvm/src/drv_nvm_local.h + ../../../../../../../microchip/harmony/v1_09/framework/driver/nvm/src/drv_nvm_variant_mapping.h - ../../../../../../../microchip/harmony/v1_08_01/framework/driver/nvm/drv_nvm.h + ../../../../../../../microchip/harmony/v1_09/framework/driver/nvm/drv_nvm.h - ../../../../../../../microchip/harmony/v1_08_01/framework/driver/tmr/src/drv_tmr_variant_mapping.h - ../../../../../../../microchip/harmony/v1_08_01/framework/driver/tmr/src/drv_tmr_local.h + ../../../../../../../microchip/harmony/v1_09/framework/driver/tmr/src/drv_tmr_variant_mapping.h + ../../../../../../../microchip/harmony/v1_09/framework/driver/tmr/src/drv_tmr_local.h - ../../../../../../../microchip/harmony/v1_08_01/framework/driver/tmr/drv_tmr.h - ../../../../../../../microchip/harmony/v1_08_01/framework/driver/tmr/drv_tmr_mapping.h - ../../../../../../../microchip/harmony/v1_08_01/framework/driver/tmr/drv_tmr_compatibility.h + ../../../../../../../microchip/harmony/v1_09/framework/driver/tmr/drv_tmr.h + ../../../../../../../microchip/harmony/v1_09/framework/driver/tmr/drv_tmr_mapping.h + ../../../../../../../microchip/harmony/v1_09/framework/driver/tmr/drv_tmr_compatibility.h - + - ../../../../../../../microchip/harmony/v1_08_01/framework/driver/usb/usbhs/src/drv_usbhs_local.h - ../../../../../../../microchip/harmony/v1_08_01/framework/driver/usb/usbhs/src/drv_usbhs_variant_mapping.h + ../../../../../../../microchip/harmony/v1_09/framework/driver/usb/usbhs/src/drv_usbhs_local.h + ../../../../../../../microchip/harmony/v1_09/framework/driver/usb/usbhs/src/drv_usbhs_variant_mapping.h - ../../../../../../../microchip/harmony/v1_08_01/framework/driver/usb/usbhs/drv_usbhs.h + ../../../../../../../microchip/harmony/v1_09/framework/driver/usb/usbhs/drv_usbhs.h + + ../../../../../../../microchip/harmony/v1_09/framework/driver/usb/drv_usb.h + + + + ../../../../../../../microchip/harmony/v1_09/framework/driver/wifi/mrf24w/drv_wifi.h - ../../../../../../../microchip/harmony/v1_08_01/framework/driver/usb/drv_usb.h - ../../../../../../../microchip/harmony/v1_08_01/framework/driver/driver.h - ../../../../../../../microchip/harmony/v1_08_01/framework/driver/driver_common.h + ../../../../../../../microchip/harmony/v1_09/framework/driver/driver.h + ../../../../../../../microchip/harmony/v1_09/framework/driver/driver_common.h - ../../../../../../../microchip/harmony/v1_08_01/framework/gfx/gfx_palette.h + ../../../../../../../microchip/harmony/v1_09/framework/gfx/gfx_palette.h - ../../../../../../../microchip/harmony/v1_08_01/framework/net/pres/src/net_pres_local.h + ../../../../../../../microchip/harmony/v1_09/framework/net/pres/src/net_pres_local.h - ../../../../../../../microchip/harmony/v1_08_01/framework/net/pres/net_pres.h - ../../../../../../../microchip/harmony/v1_08_01/framework/net/pres/net_pres_certstore.h - ../../../../../../../microchip/harmony/v1_08_01/framework/net/pres/net_pres_encryptionproviderapi.h - ../../../../../../../microchip/harmony/v1_08_01/framework/net/pres/net_pres_socketapi.h - ../../../../../../../microchip/harmony/v1_08_01/framework/net/pres/net_pres_transportapi.h - ../../../../../../../microchip/harmony/v1_08_01/framework/net/pres/net_pres_socketapiconversion.h + ../../../../../../../microchip/harmony/v1_09/framework/net/pres/net_pres.h + ../../../../../../../microchip/harmony/v1_09/framework/net/pres/net_pres_certstore.h + ../../../../../../../microchip/harmony/v1_09/framework/net/pres/net_pres_encryptionproviderapi.h + ../../../../../../../microchip/harmony/v1_09/framework/net/pres/net_pres_socketapi.h + ../../../../../../../microchip/harmony/v1_09/framework/net/pres/net_pres_transportapi.h + ../../../../../../../microchip/harmony/v1_09/framework/net/pres/net_pres_socketapiconversion.h - ../../../../../../../microchip/harmony/v1_08_01/framework/osal/src/osal_impl_basic.h - ../../../../../../../microchip/harmony/v1_08_01/framework/osal/src/osal_impl_none.h - ../../../../../../../microchip/harmony/v1_08_01/framework/osal/src/osal_freertos.h + ../../../../../../../microchip/harmony/v1_09/framework/osal/src/osal_impl_basic.h + ../../../../../../../microchip/harmony/v1_09/framework/osal/src/osal_impl_none.h + ../../../../../../../microchip/harmony/v1_09/framework/osal/src/osal_freertos.h - ../../../../../../../microchip/harmony/v1_08_01/framework/osal/osal.h - ../../../../../../../microchip/harmony/v1_08_01/framework/osal/osal_definitions.h + ../../../../../../../microchip/harmony/v1_09/framework/osal/osal.h + ../../../../../../../microchip/harmony/v1_09/framework/osal/osal_definitions.h - ../../../../../../../microchip/harmony/v1_08_01/framework/peripheral/peripheral.h - ../../../../../../../microchip/harmony/v1_08_01/framework/peripheral/peripheral_common.h - ../../../../../../../microchip/harmony/v1_08_01/framework/peripheral/peripheral_common_32bit.h + ../../../../../../../microchip/harmony/v1_09/framework/peripheral/peripheral.h + ../../../../../../../microchip/harmony/v1_09/framework/peripheral/peripheral_common.h + ../../../../../../../microchip/harmony/v1_09/framework/peripheral/peripheral_common_32bit.h - ../../../../../../../microchip/harmony/v1_08_01/framework/system/clk/sys_clk.h - ../../../../../../../microchip/harmony/v1_08_01/framework/system/clk/sys_clk_mapping.h + ../../../../../../../microchip/harmony/v1_09/framework/system/clk/sys_clk.h + ../../../../../../../microchip/harmony/v1_09/framework/system/clk/sys_clk_mapping.h - - ../../../../../../../microchip/harmony/v1_08_01/framework/system/command/sys_command.h - - - ../../../../../../../microchip/harmony/v1_08_01/framework/system/common/sys_common.h - ../../../../../../../microchip/harmony/v1_08_01/framework/system/common/sys_module.h - ../../../../../../../microchip/harmony/v1_08_01/framework/system/common/sys_buffer.h - ../../../../../../../microchip/harmony/v1_08_01/framework/system/common/sys_queue.h - - - - ../../../../../../../microchip/harmony/v1_08_01/framework/system/console/src/sys_console_local.h - ../../../../../../../microchip/harmony/v1_08_01/framework/system/console/src/sys_console_usb_cdc_local.h - - ../../../../../../../microchip/harmony/v1_08_01/framework/system/console/sys_console.h + + ../../../../../../../microchip/harmony/v1_09/framework/system/common/sys_common.h + ../../../../../../../microchip/harmony/v1_09/framework/system/common/sys_module.h + ../../../../../../../microchip/harmony/v1_09/framework/system/common/sys_buffer.h + ../../../../../../../microchip/harmony/v1_09/framework/system/common/sys_queue.h - - - ../../../../../../../microchip/harmony/v1_08_01/framework/system/debug/src/sys_debug_local.h - - ../../../../../../../microchip/harmony/v1_08_01/framework/system/debug/sys_debug.h + + ../../../../../../../microchip/harmony/v1_09/framework/system/debug/sys_debug.h - + - ../../../../../../../microchip/harmony/v1_08_01/framework/system/devcon/src/sys_devcon_local.h + ../../../../../../../microchip/harmony/v1_09/framework/system/devcon/src/sys_devcon_local.h - ../../../../../../../microchip/harmony/v1_08_01/framework/system/devcon/sys_devcon.h + ../../../../../../../microchip/harmony/v1_09/framework/system/devcon/sys_devcon.h - + - ../../../../../../../microchip/harmony/v1_08_01/framework/system/fs/mpfs/src/mpfs_local.h + ../../../../../../../microchip/harmony/v1_09/framework/system/fs/mpfs/src/mpfs_local.h - ../../../../../../../microchip/harmony/v1_08_01/framework/system/fs/src/sys_fs_local.h - ../../../../../../../microchip/harmony/v1_08_01/framework/system/fs/src/sys_fs_media_manager_local.h + ../../../../../../../microchip/harmony/v1_09/framework/system/fs/src/sys_fs_local.h + ../../../../../../../microchip/harmony/v1_09/framework/system/fs/src/sys_fs_media_manager_local.h - ../../../../../../../microchip/harmony/v1_08_01/framework/system/fs/sys_fs.h - ../../../../../../../microchip/harmony/v1_08_01/framework/system/fs/sys_fs_media_manager.h - ../../../../../../../microchip/harmony/v1_08_01/framework/system/fs/mpfs/mpfs.h + ../../../../../../../microchip/harmony/v1_09/framework/system/fs/sys_fs.h + ../../../../../../../microchip/harmony/v1_09/framework/system/fs/sys_fs_media_manager.h + ../../../../../../../microchip/harmony/v1_09/framework/system/fs/mpfs/mpfs.h - + - ../../../../../../../microchip/harmony/v1_08_01/framework/system/int/src/sys_int_private.h + ../../../../../../../microchip/harmony/v1_09/framework/system/int/src/sys_int_private.h - ../../../../../../../microchip/harmony/v1_08_01/framework/system/int/sys_int.h - ../../../../../../../microchip/harmony/v1_08_01/framework/system/int/sys_int_mapping.h - - - ../../../../../../../microchip/harmony/v1_08_01/framework/system/ports/sys_ports.h + ../../../../../../../microchip/harmony/v1_09/framework/system/int/sys_int.h + ../../../../../../../microchip/harmony/v1_09/framework/system/int/sys_int_mapping.h - - - ../../../../../../../microchip/harmony/v1_08_01/framework/system/random/src/sys_random_local.h - - ../../../../../../../microchip/harmony/v1_08_01/framework/system/random/sys_random.h + + ../../../../../../../microchip/harmony/v1_09/framework/system/ports/sys_ports.h - + - ../../../../../../../microchip/harmony/v1_08_01/framework/system/reset/src/sys_reset_local.h - ../../../../../../../microchip/harmony/v1_08_01/framework/system/reset/src/sys_reset_mapping.h + ../../../../../../../microchip/harmony/v1_09/framework/system/random/src/sys_random_local.h - ../../../../../../../microchip/harmony/v1_08_01/framework/system/reset/sys_reset.h + ../../../../../../../microchip/harmony/v1_09/framework/system/random/sys_random.h - + - ../../../../../../../microchip/harmony/v1_08_01/framework/system/tmr/src/sys_tmr_local.h + ../../../../../../../microchip/harmony/v1_09/framework/system/tmr/src/sys_tmr_local.h - ../../../../../../../microchip/harmony/v1_08_01/framework/system/tmr/sys_tmr.h + ../../../../../../../microchip/harmony/v1_09/framework/system/tmr/sys_tmr.h - ../../../../../../../microchip/harmony/v1_08_01/framework/system/system.h + ../../../../../../../microchip/harmony/v1_09/framework/system/system.h - - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/common/sys_fs_wrapper.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/common/helpers.h - - - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/berkeley_manager.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/dhcpv6_manager.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/dhcpv6_private.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/lldp_manager.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/lldp_private.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/lldp_tlv.h - - - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/tcp_private.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/tcp_manager.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/udp_private.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/udp_manager.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/tcpip_heap_alloc.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/arp_manager.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/arp_private.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/dhcp_manager.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/dhcp_private.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/dns_manager.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/dns_private.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/http_manager.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/http_private.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/nbns_manager.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/sntp_manager.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/zero_conf_helper.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/zero_conf_link_local_private.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/zero_conf_manager.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/tcpip_announce_manager.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/hash_fnv.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/link_list.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/oahash.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/tcpip_helpers_private.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/tcpip_manager_control.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/tcpip_module_manager.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/tcpip_notify.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/tcpip_packet.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/tcpip_private.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/tcpip_types.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/ipv4_manager.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/ipv4_private.h + + + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/common/helpers.h + + + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/crypto/aes.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/crypto/aes_cbc.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/crypto/aes_cfb.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/crypto/aes_ctr.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/crypto/aes_ecb.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/crypto/aes_ecb_pic32.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/crypto/aes_ofb.h + + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/ipv4_manager.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/ipv4_private.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/ndp_manager.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/ndp_private.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/ipv6_manager.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/ipv6_private.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/icmpv6_manager.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/tcp_private.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/tcp_manager.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/udp_private.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/udp_manager.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/tcpip_heap_alloc.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/arp_manager.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/arp_private.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/dhcp_manager.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/dhcp_private.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/dhcps_manager.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/dhcps_private.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/dns_manager.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/dns_private.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/dnss_manager.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/dnss_private.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/ddns_manager.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/ftp_manager.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/ftp_private.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/http_manager.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/http_private.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/http_net_manager.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/http_net_private.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/icmp_manager.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/nbns_manager.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/tcpip_reboot_manager.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/smtp_manager.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/smtpc_manager.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/snmp_private.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/snmp_manager.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/snmpv3_private.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/sntp_manager.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/telnet_manager.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/zero_conf_helper.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/zero_conf_link_local_private.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/zero_conf_manager.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/tcpip_announce_manager.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/iperf_manager.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/tcpip_commands_manager.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/tftpc_manager.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/tftpc_private.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/hash_fnv.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/link_list.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/oahash.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/tcpip_helpers_private.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/tcpip_manager_control.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/tcpip_module_manager.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/tcpip_notify.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/tcpip_packet.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/tcpip_private.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/tcpip_types.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/berkeley_manager.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/dhcpv6_manager.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/dhcpv6_private.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/lldp_manager.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/lldp_private.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/lldp_tlv.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/tcp.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/udp.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/tcpip_heap.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/arp.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/tls.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/dhcp.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/dns.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/http.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/nbns.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/sntp.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/zero_conf_link_local.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/zero_conf_multicast_dns.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/tcpip_helpers.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/tcpip_manager.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/tcpip.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/dhcpv6.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/lldp.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/tcpip_announce.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/tcpip_reboot.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/tcpip_common_ports.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/ipv4.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/tcpip_mac.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/tcpip_mac_object.h - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/tcpip_ethernet.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/ipv4.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/ndp.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/ipv6.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/icmpv6.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/tcp.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/udp.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/tcpip_heap.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/arp.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/berkeley_api.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/tls.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/dhcp.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/dhcps.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/dns.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/dnss.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/ddns.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/ftp.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/http.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/http_net.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/icmp.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/nbns.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/smtp.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/smtpc.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/snmp.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/snmpv3.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/sntp.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/telnet.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/zero_conf_link_local.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/zero_conf_multicast_dns.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/iperf.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/tcpip_commands.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/tftpc.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/tcpip_helpers.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/tcpip_manager.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/tcpip.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/dhcpv6.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/lldp.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/tcpip_announce.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/tcpip_reboot.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/tcpip_common_ports.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/tcpip_mac.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/tcpip_mac_object.h + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/tcpip_ethernet.h - ../../../../../../../microchip/harmony/v1_08_01/framework/usb/src/usb_device_local.h - ../../../../../../../microchip/harmony/v1_08_01/framework/usb/src/usb_device_mapping.h - ../../../../../../../microchip/harmony/v1_08_01/framework/usb/src/usb_device_cdc_local.h + ../../../../../../../microchip/harmony/v1_09/framework/usb/src/usb_device_local.h + ../../../../../../../microchip/harmony/v1_09/framework/usb/src/usb_device_mapping.h + ../../../../../../../microchip/harmony/v1_09/framework/usb/src/usb_device_cdc_local.h - ../../../../../../../microchip/harmony/v1_08_01/framework/usb/usb_device.h - ../../../../../../../microchip/harmony/v1_08_01/framework/usb/usb_billboard.h - ../../../../../../../microchip/harmony/v1_08_01/framework/usb/usb_chapter_9.h - ../../../../../../../microchip/harmony/v1_08_01/framework/usb/usb_common.h - ../../../../../../../microchip/harmony/v1_08_01/framework/usb/usb_cdc.h - ../../../../../../../microchip/harmony/v1_08_01/framework/usb/usb_device_cdc.h + ../../../../../../../microchip/harmony/v1_09/framework/usb/usb_device.h + ../../../../../../../microchip/harmony/v1_09/framework/usb/usb_billboard.h + ../../../../../../../microchip/harmony/v1_09/framework/usb/usb_chapter_9.h + ../../../../../../../microchip/harmony/v1_09/framework/usb/usb_common.h + ../../../../../../../microchip/harmony/v1_09/framework/usb/usb_cdc.h + ../../../../../../../microchip/harmony/v1_09/framework/usb/usb_device_cdc.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/rtos/FreeRTOS/Source/portable/MPLAB/PIC32MZ/ISR_Support.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/rtos/FreeRTOS/Source/portable/MPLAB/PIC32MZ/portmacro.h + ../../../../../../../microchip/harmony/v1_09/third_party/rtos/FreeRTOS/Source/portable/MPLAB/PIC32MZ/ISR_Support.h + ../../../../../../../microchip/harmony/v1_09/third_party/rtos/FreeRTOS/Source/portable/MPLAB/PIC32MZ/portmacro.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/rtos/FreeRTOS/Source/include/croutine.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/rtos/FreeRTOS/Source/include/event_groups.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/rtos/FreeRTOS/Source/include/FreeRTOS.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/rtos/FreeRTOS/Source/include/list.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/rtos/FreeRTOS/Source/include/mpu_wrappers.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/rtos/FreeRTOS/Source/include/portable.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/rtos/FreeRTOS/Source/include/projdefs.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/rtos/FreeRTOS/Source/include/queue.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/rtos/FreeRTOS/Source/include/semphr.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/rtos/FreeRTOS/Source/include/StackMacros.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/rtos/FreeRTOS/Source/include/deprecated_definitions.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/rtos/FreeRTOS/Source/include/task.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/rtos/FreeRTOS/Source/include/timers.h + ../../../../../../../microchip/harmony/v1_09/third_party/rtos/FreeRTOS/Source/include/croutine.h + ../../../../../../../microchip/harmony/v1_09/third_party/rtos/FreeRTOS/Source/include/event_groups.h + ../../../../../../../microchip/harmony/v1_09/third_party/rtos/FreeRTOS/Source/include/FreeRTOS.h + ../../../../../../../microchip/harmony/v1_09/third_party/rtos/FreeRTOS/Source/include/list.h + ../../../../../../../microchip/harmony/v1_09/third_party/rtos/FreeRTOS/Source/include/mpu_wrappers.h + ../../../../../../../microchip/harmony/v1_09/third_party/rtos/FreeRTOS/Source/include/portable.h + ../../../../../../../microchip/harmony/v1_09/third_party/rtos/FreeRTOS/Source/include/projdefs.h + ../../../../../../../microchip/harmony/v1_09/third_party/rtos/FreeRTOS/Source/include/queue.h + ../../../../../../../microchip/harmony/v1_09/third_party/rtos/FreeRTOS/Source/include/semphr.h + ../../../../../../../microchip/harmony/v1_09/third_party/rtos/FreeRTOS/Source/include/StackMacros.h + ../../../../../../../microchip/harmony/v1_09/third_party/rtos/FreeRTOS/Source/include/deprecated_definitions.h + ../../../../../../../microchip/harmony/v1_09/third_party/rtos/FreeRTOS/Source/include/task.h + ../../../../../../../microchip/harmony/v1_09/third_party/rtos/FreeRTOS/Source/include/timers.h + ../../../../../../../microchip/harmony/v1_09/third_party/rtos/FreeRTOS/Source/include/mpu_prototypes.h ../src/parson.h @@ -353,237 +436,237 @@ - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/aes.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/arc4.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/asn.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/asn_public.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/blake2-impl.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/blake2-int.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/blake2.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/camellia.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/chacha.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/coding.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/compress.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/des3.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/dh.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/dsa.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/ecc.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/error-crypt.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/fips_test.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/hc128.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/hmac.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/integer.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/logging.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/md2.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/md4.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/md5.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/memory.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/misc.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/mpi_class.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/mpi_superclass.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/pkcs7.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/poly1305.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/pwdbased.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/rabbit.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/random.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/ripemd.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/rsa.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/settings.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/settings_comp.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/sha.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/sha256.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/sha512.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/tfm.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/types.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/visibility.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ctaocrypt/wc_port.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/aes.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/arc4.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/asn.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/asn_public.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/blake2-impl.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/blake2-int.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/blake2.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/camellia.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/chacha.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/coding.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/compress.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/des3.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/dh.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/dsa.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/ecc.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/error-crypt.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/fips_test.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/hc128.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/hmac.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/integer.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/logging.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/md2.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/md4.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/md5.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/memory.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/misc.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/mpi_class.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/mpi_superclass.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/pkcs7.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/poly1305.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/pwdbased.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/rabbit.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/random.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/ripemd.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/rsa.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/settings.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/settings_comp.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/sha.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/sha256.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/sha512.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/tfm.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/types.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/visibility.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ctaocrypt/wc_port.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/openssl/asn1.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/openssl/bio.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/openssl/bn.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/openssl/conf.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/openssl/crypto.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/openssl/des.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/openssl/dh.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/openssl/dsa.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/openssl/ec.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/openssl/ec25519.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/openssl/ecdh.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/openssl/ecdsa.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/openssl/ed25519.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/openssl/engine.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/openssl/err.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/openssl/evp.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/openssl/hmac.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/openssl/lhash.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/openssl/md4.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/openssl/md5.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/openssl/ocsp.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/openssl/opensslconf.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/openssl/opensslv.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/openssl/ossl_typ.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/openssl/pem.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/openssl/pkcs12.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/openssl/rand.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/openssl/ripemd.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/openssl/rsa.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/openssl/sha.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/openssl/ssl.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/openssl/stack.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/openssl/ui.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/openssl/x509.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/openssl/x509v3.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/openssl/asn1.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/openssl/bio.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/openssl/bn.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/openssl/conf.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/openssl/crypto.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/openssl/des.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/openssl/dh.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/openssl/dsa.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/openssl/ec.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/openssl/ec25519.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/openssl/ecdh.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/openssl/ecdsa.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/openssl/ed25519.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/openssl/engine.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/openssl/err.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/openssl/evp.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/openssl/hmac.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/openssl/lhash.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/openssl/md4.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/openssl/md5.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/openssl/ocsp.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/openssl/opensslconf.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/openssl/opensslv.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/openssl/ossl_typ.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/openssl/pem.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/openssl/pkcs12.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/openssl/rand.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/openssl/ripemd.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/openssl/rsa.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/openssl/sha.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/openssl/ssl.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/openssl/stack.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/openssl/ui.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/openssl/x509.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/openssl/x509v3.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/callbacks.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/certs_test.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/crl.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/error-ssl.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/internal.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ocsp.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/options.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/sniffer.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/sniffer_error.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/ssl.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/test.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/cyassl/version.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/callbacks.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/certs_test.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/crl.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/error-ssl.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/internal.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ocsp.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/options.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/sniffer.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/sniffer_error.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/ssl.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/test.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/cyassl/version.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/examples/client/client.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/examples/client/client.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/examples/echoclient/echoclient.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/examples/echoclient/echoclient.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/examples/echoserver/echoserver.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/examples/echoserver/echoserver.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/examples/server/server.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/examples/server/server.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/tests/unit.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/tests/unit.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/openssl/asn1.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/openssl/bio.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/openssl/bn.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/openssl/conf.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/openssl/crypto.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/openssl/des.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/openssl/dh.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/openssl/dsa.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/openssl/ec.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/openssl/ec25519.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/openssl/ecdh.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/openssl/ecdsa.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/openssl/ed25519.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/openssl/engine.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/openssl/err.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/openssl/evp.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/openssl/hmac.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/openssl/lhash.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/openssl/md4.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/openssl/md5.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/openssl/ocsp.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/openssl/opensslconf.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/openssl/opensslv.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/openssl/ossl_typ.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/openssl/pem.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/openssl/pkcs12.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/openssl/rand.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/openssl/ripemd.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/openssl/rsa.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/openssl/sha.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/openssl/ssl.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/openssl/stack.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/openssl/ui.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/openssl/x509.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/openssl/x509v3.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/openssl/asn1.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/openssl/bio.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/openssl/bn.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/openssl/conf.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/openssl/crypto.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/openssl/des.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/openssl/dh.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/openssl/dsa.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/openssl/ec.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/openssl/ec25519.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/openssl/ecdh.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/openssl/ecdsa.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/openssl/ed25519.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/openssl/engine.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/openssl/err.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/openssl/evp.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/openssl/hmac.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/openssl/lhash.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/openssl/md4.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/openssl/md5.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/openssl/ocsp.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/openssl/opensslconf.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/openssl/opensslv.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/openssl/ossl_typ.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/openssl/pem.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/openssl/pkcs12.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/openssl/rand.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/openssl/ripemd.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/openssl/rsa.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/openssl/sha.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/openssl/ssl.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/openssl/stack.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/openssl/ui.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/openssl/x509.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/openssl/x509v3.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/port/ti/ti-ccm.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/port/ti/ti-hash.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/port/ti/ti-ccm.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/port/ti/ti-hash.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/port/nrf51.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/port/nrf51.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/aes.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/arc4.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/asn.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/coding.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/compress.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/des3.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/ecc.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/hash.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/hmac.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/idea.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/integer.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/logging.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/md5.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/memory.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/misc.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/pwdbased.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/random.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/rsa.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/settings.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/sha.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/sha256.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/sha512.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/signature.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/srp.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/tfm.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/types.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/visibility.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/wc_encrypt.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/wc_port.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/aes.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/arc4.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/asn.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/coding.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/compress.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/des3.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/ecc.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/hash.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/hmac.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/idea.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/integer.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/logging.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/md5.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/memory.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/misc.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/pwdbased.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/random.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/rsa.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/settings.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/sha.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/sha256.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/sha512.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/signature.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/srp.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/tfm.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/types.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/visibility.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/wc_encrypt.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/wc_port.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/internal.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/mem_track.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/version.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/internal.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/mem_track.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/version.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/asn_public.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/blake2-impl.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/blake2-int.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/blake2.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/camellia.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/chacha.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/chacha20_poly1305.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/curve25519.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/dh.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/dsa.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/ed25519.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/error-crypt.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/fe_operations.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/fips_test.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/ge_operations.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/hc128.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/md2.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/md4.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/mpi_class.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/mpi_superclass.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/pkcs7.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/poly1305.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/rabbit.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/ripemd.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/asn_public.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/blake2-impl.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/blake2-int.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/blake2.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/camellia.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/chacha.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/chacha20_poly1305.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/curve25519.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/dh.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/dsa.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/ed25519.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/error-crypt.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/fe_operations.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/fips_test.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/ge_operations.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/hc128.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/md2.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/md4.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/mpi_class.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/mpi_superclass.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/pkcs7.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/poly1305.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/rabbit.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/ripemd.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/callbacks.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/certs_test.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/crl.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/error-ssl.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/ocsp.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/options.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/sniffer.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/sniffer_error.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/ssl.h - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfssl/test.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/callbacks.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/certs_test.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/crl.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/error-ssl.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/ocsp.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/options.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/sniffer.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/sniffer_error.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/ssl.h + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfssl/test.h @@ -606,106 +689,149 @@ projectFiles="true"> - + + + + + + ../src/system_config/DM990004_IoT_Ethernet/framework/driver/adc/src/drv_adc_static.c + + + + + ../src/system_config/DM990004_IoT_Ethernet/framework/driver/cmp/src/drv_cmp_static.c + + + + + + ../src/system_config/DM990004_IoT_Ethernet/framework/net/pres/net_pres_enc_glue.c + ../src/system_config/DM990004_IoT_Ethernet/framework/net/pres/net_pres_cert_store.c + + + + + + ../src/system_config/DM990004_IoT_Ethernet/framework/system/clk/src/sys_clk_static.c + + + + + ../src/system_config/DM990004_IoT_Ethernet/framework/system/ports/src/sys_ports_static.c + + + + + ../src/system_config/DM990004_IoT_Ethernet/system_init.c + ../src/system_config/DM990004_IoT_Ethernet/system_interrupt.c + ../src/system_config/DM990004_IoT_Ethernet/system_exceptions.c + ../src/system_config/DM990004_IoT_Ethernet/system_tasks.c + ../src/system_config/DM990004_IoT_Ethernet/system_interrupt_a.S + ../src/system_config/DM990004_IoT_Ethernet/rtos_hooks.c + + - ../src/system_config/IoT_Ethernet/framework/driver/adc/src/drv_adc_static.c + ../src/system_config/DM990005_IoT_Ethernet/framework/driver/adc/src/drv_adc_static.c - ../src/system_config/IoT_Ethernet/framework/driver/cmp/src/drv_cmp_static.c + ../src/system_config/DM990005_IoT_Ethernet/framework/driver/cmp/src/drv_cmp_static.c - ../src/system_config/IoT_Ethernet/framework/net/pres/net_pres_enc_glue.c - ../src/system_config/IoT_Ethernet/framework/net/pres/net_pres_cert_store.c + ../src/system_config/DM990005_IoT_Ethernet/framework/net/pres/net_pres_enc_glue.c + ../src/system_config/DM990005_IoT_Ethernet/framework/net/pres/net_pres_cert_store.c - ../src/system_config/IoT_Ethernet/framework/system/clk/src/sys_clk_static.c + ../src/system_config/DM990005_IoT_Ethernet/framework/system/clk/src/sys_clk_static.c - ../src/system_config/IoT_Ethernet/framework/system/ports/src/sys_ports_static.c + ../src/system_config/DM990005_IoT_Ethernet/framework/system/ports/src/sys_ports_static.c - ../src/system_config/IoT_Ethernet/system_init.c - ../src/system_config/IoT_Ethernet/system_interrupt.c - ../src/system_config/IoT_Ethernet/system_exceptions.c - ../src/system_config/IoT_Ethernet/system_tasks.c - ../src/system_config/IoT_Ethernet/system_interrupt_a.S - ../src/system_config/IoT_Ethernet/rtos_hooks.c + ../src/system_config/DM990005_IoT_Ethernet/system_init.c + ../src/system_config/DM990005_IoT_Ethernet/system_interrupt.c + ../src/system_config/DM990005_IoT_Ethernet/system_exceptions.c + ../src/system_config/DM990005_IoT_Ethernet/system_tasks.c + ../src/system_config/DM990005_IoT_Ethernet/system_interrupt_a.S + ../src/system_config/DM990005_IoT_Ethernet/rtos_hooks.c ../src/app.c ../src/main.c - ../src/configuration_http.c ../src/app_nvm_support.c - ../src/http_print.c ../src/bsp_sys_init.c - ../src/mpfs_img2.c ../src/app1.c + ../src/app2.c + ../src/app_insight_support.c - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/ecc.c - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/arc4.c - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/pwdbased.c - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/tfm.c - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/asn.c - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/des3.c - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/rsa.c - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/aes.c - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/md5.c - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/sha.c - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/sha256.c - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/sha512.c - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/hmac.c - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/hash.c - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/compress.c - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/random.c - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/crypto.c - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/coding.c - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/error.c - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/integer.c - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/logging.c - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/memory.c - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/misc.c - ../../../../../../../microchip/harmony/v1_08_01/framework/crypto/src/port.c + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/ecc.c + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/arc4.c + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/pwdbased.c + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/tfm.c + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/asn.c + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/des3.c + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/rsa.c + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/aes.c + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/md5.c + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/sha.c + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/sha256.c + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/sha512.c + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/hmac.c + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/hash.c + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/compress.c + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/random.c + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/crypto.c + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/coding.c + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/error.c + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/integer.c + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/logging.c + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/memory.c + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/misc.c + ../../../../../../../microchip/harmony/v1_09/framework/crypto/src/port.c - ../../../../../../../microchip/harmony/v1_08_01/framework/driver/ethmac/src/dynamic/drv_ethmac.c - ../../../../../../../microchip/harmony/v1_08_01/framework/driver/ethmac/src/dynamic/drv_ethmac_lib.c + ../../../../../../../microchip/harmony/v1_09/framework/driver/ethmac/src/dynamic/drv_ethmac.c + ../../../../../../../microchip/harmony/v1_09/framework/driver/ethmac/src/dynamic/drv_ethmac_lib.c - ../../../../../../../microchip/harmony/v1_08_01/framework/driver/ethphy/src/dynamic/drv_ethphy.c - ../../../../../../../microchip/harmony/v1_08_01/framework/driver/ethphy/src/dynamic/drv_extphy_smsc8740.c + ../../../../../../../microchip/harmony/v1_09/framework/driver/ethphy/src/dynamic/drv_ethphy.c + ../../../../../../../microchip/harmony/v1_09/framework/driver/ethphy/src/dynamic/drv_extphy_smsc8740.c - ../../../../../../../microchip/harmony/v1_08_01/framework/driver/nvm/src/dynamic/drv_nvm.c - ../../../../../../../microchip/harmony/v1_08_01/framework/driver/nvm/src/dynamic/drv_nvm_erasewrite.c + ../../../../../../../microchip/harmony/v1_09/framework/driver/nvm/src/dynamic/drv_nvm.c + ../../../../../../../microchip/harmony/v1_09/framework/driver/nvm/src/dynamic/drv_nvm_erasewrite.c - ../../../../../../../microchip/harmony/v1_08_01/framework/driver/tmr/src/dynamic/drv_tmr.c + ../../../../../../../microchip/harmony/v1_09/framework/driver/tmr/src/dynamic/drv_tmr.c @@ -713,8 +839,8 @@ - ../../../../../../../microchip/harmony/v1_08_01/framework/driver/usb/usbhs/src/dynamic/drv_usbhs.c - ../../../../../../../microchip/harmony/v1_08_01/framework/driver/usb/usbhs/src/dynamic/drv_usbhs_device.c + ../../../../../../../microchip/harmony/v1_09/framework/driver/usb/usbhs/src/dynamic/drv_usbhs.c + ../../../../../../../microchip/harmony/v1_09/framework/driver/usb/usbhs/src/dynamic/drv_usbhs_device.c @@ -722,105 +848,78 @@ - ../../../../../../../microchip/harmony/v1_08_01/framework/net/pres/src/net_pres.c + ../../../../../../../microchip/harmony/v1_09/framework/net/pres/src/net_pres.c - ../../../../../../../microchip/harmony/v1_08_01/framework/osal/src/osal_freertos.c + ../../../../../../../microchip/harmony/v1_09/framework/osal/src/osal_freertos.c - - - ../../../../../../../microchip/harmony/v1_08_01/framework/system/command/src/sys_command.c - - - - - ../../../../../../../microchip/harmony/v1_08_01/framework/system/console/src/sys_console.c - ../../../../../../../microchip/harmony/v1_08_01/framework/system/console/src/sys_console_usb_cdc.c - - - - - ../../../../../../../microchip/harmony/v1_08_01/framework/system/debug/src/sys_debug.c - - - + - ../../../../../../../microchip/harmony/v1_08_01/framework/system/devcon/src/sys_devcon.c - ../../../../../../../microchip/harmony/v1_08_01/framework/system/devcon/src/sys_devcon_pic32mz.c - ../../../../../../../microchip/harmony/v1_08_01/framework/system/devcon/src/sys_devcon_cache_pic32mz.S - ../../../../../../../microchip/harmony/v1_08_01/framework/system/devcon/src/sys_devcon_cache.h + ../../../../../../../microchip/harmony/v1_09/framework/system/devcon/src/sys_devcon.c + ../../../../../../../microchip/harmony/v1_09/framework/system/devcon/src/sys_devcon_pic32mz.c + ../../../../../../../microchip/harmony/v1_09/framework/system/devcon/src/sys_devcon_cache_pic32mz.S + ../../../../../../../microchip/harmony/v1_09/framework/system/devcon/src/sys_devcon_cache.h - + - ../../../../../../../microchip/harmony/v1_08_01/framework/system/fs/src/dynamic/sys_fs.c - ../../../../../../../microchip/harmony/v1_08_01/framework/system/fs/src/dynamic/sys_fs_media_manager.c + ../../../../../../../microchip/harmony/v1_09/framework/system/fs/src/dynamic/sys_fs.c + ../../../../../../../microchip/harmony/v1_09/framework/system/fs/src/dynamic/sys_fs_media_manager.c - ../../../../../../../microchip/harmony/v1_08_01/framework/system/fs/mpfs/src/mpfs.c + ../../../../../../../microchip/harmony/v1_09/framework/system/fs/mpfs/src/mpfs.c - - - ../../../../../../../microchip/harmony/v1_08_01/framework/system/int/src/sys_int_pic32.c - - - + - ../../../../../../../microchip/harmony/v1_08_01/framework/system/random/src/sys_random.c + ../../../../../../../microchip/harmony/v1_09/framework/system/int/src/sys_int_pic32.c - + - ../../../../../../../microchip/harmony/v1_08_01/framework/system/reset/src/sys_reset.c + ../../../../../../../microchip/harmony/v1_09/framework/system/random/src/sys_random.c - + - ../../../../../../../microchip/harmony/v1_08_01/framework/system/tmr/src/sys_tmr.c + ../../../../../../../microchip/harmony/v1_09/framework/system/tmr/src/sys_tmr.c - - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/common/sys_fs_wrapper.c - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/common/helpers.c - - - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/tcp.c - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/udp.c - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/tcpip_heap_alloc.c - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/tcpip_heap_internal.c - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/arp.c - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/dhcp.c - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/dns.c - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/http.c - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/nbns.c - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/sntp.c - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/zero_conf_helper.c - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/zero_conf_link_local.c - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/zero_conf_multicast_dns.c - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/tcpip_announce.c - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/hash_fnv.c - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/oahash.c - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/tcpip_helpers.c - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/tcpip_helper_c32.S - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/tcpip_manager.c - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/tcpip_notify.c - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/tcpip_packet.c - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/ipv4.c + + + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/common/helpers.c + + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/ipv4.c + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/tcp.c + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/udp.c + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/tcpip_heap_alloc.c + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/tcpip_heap_internal.c + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/arp.c + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/dhcp.c + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/dns.c + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/nbns.c + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/sntp.c + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/hash_fnv.c + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/oahash.c + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/tcpip_helpers.c + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/tcpip_helper_c32.S + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/tcpip_manager.c + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/tcpip_notify.c + ../../../../../../../microchip/harmony/v1_09/framework/tcpip/src/tcpip_packet.c - ../../../../../../../microchip/harmony/v1_08_01/framework/usb/src/dynamic/usb_device.c - ../../../../../../../microchip/harmony/v1_08_01/framework/usb/src/dynamic/usb_device_cdc.c - ../../../../../../../microchip/harmony/v1_08_01/framework/usb/src/dynamic/usb_device_cdc_acm.c + ../../../../../../../microchip/harmony/v1_09/framework/usb/src/dynamic/usb_device.c + ../../../../../../../microchip/harmony/v1_09/framework/usb/src/dynamic/usb_device_cdc.c + ../../../../../../../microchip/harmony/v1_09/framework/usb/src/dynamic/usb_device_cdc_acm.c @@ -828,21 +927,21 @@ - ../../../../../../../microchip/harmony/v1_08_01/third_party/rtos/FreeRTOS/Source/portable/MemMang/heap_2.c + ../../../../../../../microchip/harmony/v1_09/third_party/rtos/FreeRTOS/Source/portable/MemMang/heap_2.c - ../../../../../../../microchip/harmony/v1_08_01/third_party/rtos/FreeRTOS/Source/portable/MPLAB/PIC32MZ/port.c - ../../../../../../../microchip/harmony/v1_08_01/third_party/rtos/FreeRTOS/Source/portable/MPLAB/PIC32MZ/port_asm.S + ../../../../../../../microchip/harmony/v1_09/third_party/rtos/FreeRTOS/Source/portable/MPLAB/PIC32MZ/port.c + ../../../../../../../microchip/harmony/v1_09/third_party/rtos/FreeRTOS/Source/portable/MPLAB/PIC32MZ/port_asm.S - ../../../../../../../microchip/harmony/v1_08_01/third_party/rtos/FreeRTOS/Source/croutine.c - ../../../../../../../microchip/harmony/v1_08_01/third_party/rtos/FreeRTOS/Source/list.c - ../../../../../../../microchip/harmony/v1_08_01/third_party/rtos/FreeRTOS/Source/queue.c - ../../../../../../../microchip/harmony/v1_08_01/third_party/rtos/FreeRTOS/Source/tasks.c - ../../../../../../../microchip/harmony/v1_08_01/third_party/rtos/FreeRTOS/Source/timers.c - ../../../../../../../microchip/harmony/v1_08_01/third_party/rtos/FreeRTOS/Source/event_groups.c + ../../../../../../../microchip/harmony/v1_09/third_party/rtos/FreeRTOS/Source/croutine.c + ../../../../../../../microchip/harmony/v1_09/third_party/rtos/FreeRTOS/Source/list.c + ../../../../../../../microchip/harmony/v1_09/third_party/rtos/FreeRTOS/Source/queue.c + ../../../../../../../microchip/harmony/v1_09/third_party/rtos/FreeRTOS/Source/tasks.c + ../../../../../../../microchip/harmony/v1_09/third_party/rtos/FreeRTOS/Source/timers.c + ../../../../../../../microchip/harmony/v1_09/third_party/rtos/FreeRTOS/Source/event_groups.c ../src/parson.c @@ -850,36 +949,36 @@ - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfcrypt/src/asm.c - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfcrypt/src/blake2b.c - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfcrypt/src/camellia.c - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfcrypt/src/chacha.c - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfcrypt/src/chacha20_poly1305.c - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfcrypt/src/curve25519.c - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfcrypt/src/dh.c - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfcrypt/src/dsa.c - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfcrypt/src/ecc_fp.c - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfcrypt/src/ed25519.c - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfcrypt/src/fe_low_mem.c - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfcrypt/src/fe_operations.c - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfcrypt/src/ge_low_mem.c - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfcrypt/src/ge_operations.c - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfcrypt/src/hc128.c - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfcrypt/src/md2.c - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfcrypt/src/md4.c - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfcrypt/src/pkcs7.c - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfcrypt/src/poly1305.c - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfcrypt/src/rabbit.c - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/wolfcrypt/src/ripemd.c + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfcrypt/src/asm.c + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfcrypt/src/blake2b.c + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfcrypt/src/camellia.c + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfcrypt/src/chacha.c + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfcrypt/src/chacha20_poly1305.c + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfcrypt/src/curve25519.c + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfcrypt/src/dh.c + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfcrypt/src/dsa.c + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfcrypt/src/ecc_fp.c + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfcrypt/src/ed25519.c + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfcrypt/src/fe_low_mem.c + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfcrypt/src/fe_operations.c + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfcrypt/src/ge_low_mem.c + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfcrypt/src/ge_operations.c + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfcrypt/src/hc128.c + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfcrypt/src/md2.c + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfcrypt/src/md4.c + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfcrypt/src/pkcs7.c + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfcrypt/src/poly1305.c + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfcrypt/src/rabbit.c + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/wolfcrypt/src/ripemd.c - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/src/crl.c - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/src/internal.c - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/src/io.c - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/src/keys.c - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/src/ocsp.c - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/src/sniffer.c - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/src/ssl.c - ../../../../../../../microchip/harmony/v1_08_01/third_party/tcpip/wolfssl/src/tls.c + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/src/crl.c + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/src/internal.c + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/src/io.c + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/src/keys.c + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/src/ocsp.c + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/src/sniffer.c + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/src/ssl.c + ../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl/src/tls.c @@ -898,13 +997,15 @@ ../src - ../../../../../microchip/harmony/v1_08_01 - ../src/IoT_Ethernet - ../src/system_config/IoT_Ethernet + ../../../../../microchip/harmony/v1_09 + ../src/DM990004_IoT_Ethernet + ../src/system_config/DM990004_IoT_Ethernet + ../src/DM990005_IoT_Ethernet + ../src/system_config/DM990005_IoT_Ethernet Makefile - + localhost PIC32MZ2048EFM064 @@ -918,8 +1019,7 @@ - ../../../../../../../microchip/harmony/v1_08_01/bin/framework/peripheral/PIC32MZ2048EFM064_peripherals.a - ../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/crypto/aes_pic32mx.a + ../../../../../../../microchip/harmony/v1_09/bin/framework/peripheral/PIC32MZ2048EFM064_peripherals.a @@ -939,6 +1039,342 @@ false false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -948,7 +1384,7 @@ + value="../src/wolfmqttsdk/;../src;../src/system_config/DM990004_IoT_Ethernet;../src/DM990004_IoT_Ethernet;../../../../../../../microchip/harmony/v1_09/framework;../src/system_config/DM990004_IoT_Ethernet/framework;../../../../../../../microchip/harmony/v1_09/third_party/rtos/FreeRTOS/Source/portable/MPLAB/PIC32MZ;../../../../../../../microchip/harmony/v1_09/third_party/rtos/FreeRTOS/Source/include;../../../../../../../microchip/harmony/v1_09/third_party/tcpip/wolfssl"/> @@ -975,7 +1411,7 @@ + value="../../../../../../../microchip/harmony/v1_09/third_party/rtos/FreeRTOS/Source/portable/MPLAB/PIC32MZ;../../../../../../../microchip/harmony/v1_09/third_party/rtos/FreeRTOS/Source/include;../src/system_config/DM990004_IoT_Ethernet"/> @@ -1241,12 +1677,845 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + localhost + PIC32MZ2048EFM064 + + + RealICEPlatformTool + XC32 + 1.42 + 4 + + + + + ../../../../../../../microchip/harmony/v1_09/bin/framework/peripheral/PIC32MZ2048EFM064_peripherals.a + + + + + + false + false + + + + + false + + false + + false + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + buffer, msg->total_len); payload[msg->total_len] = '\0'; - SYS_CONSOLE_PRINT("\r\nApp: MQTT.Message Received: %s -- Topic %*.*s\r\n\r\n", payload, msg->topic_name_len, msg->topic_name_len, msg->topic_name); appData.lightShowVal = BSP_LED_RX; xQueueSendToFront(app1Data.lightShowQueue, &appData.lightShowVal, 1); @@ -380,11 +370,9 @@ int mqttclient_message_cb(MqttClient *client, MqttMessage *msg, byte msg_new, by publish.packet_id = mqttclient_get_packetid(); publish.buffer = (byte *)reportedPayload; publish.total_len = strlen((char *)publish.buffer); - rc = MqttClient_Publish(&appData.myClient, &publish); - SYS_CONSOLE_PRINT("App: MQTT.Publish: Topic %s, %s (%d)\r\n Payload: %s\r\n", - publish.topic_name, MqttClient_ReturnCodeToString(rc), rc, publish.buffer); + rc = MqttClient_Publish(&appData.myClient, &publish); if (rc != MQTT_CODE_SUCCESS) { - while(1); + appData.state = APP_FATAL_ERROR; } appData.lightShowVal = BSP_LED_TX; xQueueSendToFront(app1Data.lightShowQueue, &appData.lightShowVal, 1); @@ -434,34 +422,43 @@ bool APP_TIMER_Set(uint32_t * timer) return true; } -const char* APP_ReturnCodeToString(int return_code) +void APP_DebugMessage(int DebugMessage) { - switch(return_code) + if(appData.debugSet) + xQueueSendToFront(app2Data.debugQueue, &DebugMessage, 1); +} + +/******************************************************** + * NVM Driver Events handler + ********************************************************/ + +void APP_EventHandler +( + DRV_NVM_EVENT event, + DRV_NVM_COMMAND_HANDLE commandHandle, + uintptr_t context +) +{ + switch (event) { - case APP_CODE_SUCCESS: - return "Success"; - case APP_CODE_ERROR_BAD_ARG: - return "Error (Bad argument)"; - case APP_CODE_ERROR_OUT_OF_BUFFER: - return "Error (Out of buffer)"; - case APP_CODE_ERROR_SSL_FATAL: - return "Error (SSL Fatal)"; - case APP_CODE_ERROR_INVALID_SOCKET: - return "Error (Invalid Socket)"; - case APP_CODE_ERROR_FAILED_TO_BEGIN_DNS_RESOLUTION: - return "Error (Failed to Begin DNS)"; - case APP_CODE_ERROR_DNS_FAILED: - return "Error (DNS Failed)"; - case APP_CODE_ERROR_FAILED_SSL_NEGOTIATION: - return "Error (Failed SSL Negotiation)"; - case APP_CODE_ERROR_TIMEOUT: - return "Error (Timeout)"; - case APP_CODE_ERROR_CMD_TIMEOUT: - return "Error (Command Timeout)"; + case DRV_NVM_EVENT_COMMAND_COMPLETE: + { + appData.eventCount++; + break; + } + + case DRV_NVM_EVENT_COMMAND_ERROR: + { + appData.errorEventCount++; + break; + } + + default: + { + break; + } } - return "Unknown"; } - // ***************************************************************************** // ***************************************************************************** // Section: Application Initialization and State Machine Functions @@ -481,7 +478,10 @@ void APP_Initialize ( void ) /* Place the App state machine in its initial state. */ appData.state = APP_STATE_INIT; memset(appData.host, '\0', sizeof(appData.host)); + sprintf(appData.macAddress, "Null"); appData.port = AWS_IOT_PORT; + appData.isCommissioned = false; + appData.writeToNVM = false; // Initialize MQTT net callbacks appData.myNet.connect = APP_tcpipConnect_cb; @@ -499,6 +499,13 @@ void APP_Initialize ( void ) appData.led2val = false; appData.led3val = false; appData.led4val = false; + + appData.socket_connected = false; + appData.mqtt_connected = false; + appData.debugSet = false; + + appData.eventCount = 0; + appData.errorEventCount = 0; } @@ -512,7 +519,6 @@ void APP_Initialize ( void ) void APP_Tasks ( void ) { - static int validConfig = 0; /* Check the application's current state. */ switch ( appData.state ) @@ -520,37 +526,32 @@ void APP_Tasks ( void ) /* Application's initial state. */ case APP_STATE_INIT: { + appData.nvmHandle = DRV_NVM_Open(0, DRV_IO_INTENT_READWRITE); + if(DRV_HANDLE_INVALID == appData.nvmHandle) + { + appData.state = APP_FATAL_ERROR; + break; + } + + /* Register for NVM driver events */ + DRV_NVM_EventHandlerSet (appData.nvmHandle, APP_EventHandler, 1); + + appData.gAppNVMMediaGeometry = DRV_NVM_GeometryGet(appData.nvmHandle); + if(NULL == appData. gAppNVMMediaGeometry){ + appData.state = APP_FATAL_ERROR; + break; + } + bool appInitialized = true; + if (appInitialized) { - SYS_CONSOLE_MESSAGE("App: Initialized\r\n"); - appData.state = APP_NVM_MOUNT_DISK; + appData.state = APP_NVM_ERASE_CONFIGURATION; } break; } - // Mount the file system where the webpages are loaded - case APP_NVM_MOUNT_DISK: - { - if(SYS_FS_Mount(SYS_FS_NVM_VOL, LOCAL_WEBSITE_PATH_FS, MPFS2, 0, NULL) == 0) - { - SYS_CONSOLE_PRINT("App: The %s File System is mounted.\r\n", SYS_FS_MPFS_STRING); - appData.state = APP_NVM_ERASE_CONFIGURATION; - } - else - { // Timeout 5 seconds - if(APP_TIMER_Expired(&appData.genericUseTimer, 5)) - { - SYS_CONSOLE_PRINT("App: The %s File System failed to mount. Critical Error, reset board\r\n", SYS_FS_MPFS_STRING); - appData.lightShowVal = BSP_LED_NVM_FAILED_MOUNT; - xQueueSendToFront(app1Data.lightShowQueue, &appData.lightShowVal, 1); - while(1); - } - } - break; - } - - // If user presses switch 2 and 3 on power up, the configuration will be erased + // If user presses switch 2 and 3 on power up, the configuration will be erased manually case APP_NVM_ERASE_CONFIGURATION: { if((BSP_SWITCH_StateGet(BSP_SWITCH_3_CHANNEL, BSP_SWITCH_3_PORT) == BSP_SWITCH_STATE_ASSERTED) @@ -560,9 +561,6 @@ void APP_Tasks ( void ) APP_NVM_Write(NVM_HOST_ADDRESS_SPACE, appData.host); APP_NVM_Erase(NVM_CLIENT_CERTIFICATE_SPACE); APP_NVM_Erase(NVM_CLIENT_KEY_SPACE); - SYS_CONSOLE_MESSAGE("***************************************\r\n" - "App: Erasing configuration!\r\n" - "***************************************\r\n"); appData.state = APP_TCPIP_WAIT_INIT; break; } @@ -573,19 +571,22 @@ void APP_Tasks ( void ) // Load the configuration stored in NVM on powerup case APP_NVM_LOAD_CONFIGURATION: { - SYS_CONSOLE_MESSAGE("App: Loading AWS IoT Endpoint Address and AWS Certificate/Certificate Private Key\r\n"); APP_NVM_Read(NVM_HOST_ADDRESS_SPACE, appData.host, sizeof(appData.host)); APP_NVM_Read(NVM_CLIENT_CERTIFICATE_SPACE, appData.clientCert, sizeof(appData.clientCert)); APP_NVM_Read(NVM_CLIENT_KEY_SPACE, appData.clientKey, sizeof(appData.clientKey)); - if(appData.host[0] != '\0') - { // Set this flag so we know we loaded a valid config from NVM - validConfig = 1; + if(appData.host[0] != '\0' && appData.host[0] != 0xff) + { // Set this flag so we know we loaded a valid configuration from NVM + appData.isCommissioned = true; + } + else + { // This means we have no endpoint, so lets set the string for debugging purposes + sprintf((char *)appData.host, "No Endpoint"); } appData.state = APP_TCPIP_WAIT_INIT; break; } - // Wait for the TCPIP stack to initialize, store the boards MAC address and initialize mDNS service + // Wait for the TCPIP stack to initialize and store MAC address case APP_TCPIP_WAIT_INIT: { SYS_STATUS tcpipStat; @@ -608,50 +609,71 @@ void APP_Tasks ( void ) TCPIP_STACK_NetNameGet(netH); TCPIP_STACK_NetBIOSName(netH); - // Retrieve MAC Address for UUID + // Retrieve MAC Address to store and convert to string TCPIP_NET_HANDLE netH = TCPIP_STACK_NetHandleGet("PIC32INT"); TCPIP_MAC_ADDR* pAdd = 0; pAdd = (TCPIP_MAC_ADDR *)TCPIP_STACK_NetAddressMac(netH); - - // Store UUID for application - appData.macAddress.v[5] = pAdd->v[5]; - appData.macAddress.v[4] = pAdd->v[4]; - appData.macAddress.v[3] = pAdd->v[3]; - appData.macAddress.v[2] = pAdd->v[2]; - appData.macAddress.v[1] = pAdd->v[1]; - appData.macAddress.v[0] = pAdd->v[0]; - - // Convert to string - sprintf(appData.uuid, "%02x%02x%02x%02x%02x%02x", - appData.macAddress.v[0], appData.macAddress.v[1], appData.macAddress.v[2], - appData.macAddress.v[3], appData.macAddress.v[4], appData.macAddress.v[5]); - - char mDNSServiceName[16]; // base name of the service Must not exceed 16 bytes long - strcpy(mDNSServiceName, &appData.uuid[6]); //Copy over UUID last 6 characters, - strcat(mDNSServiceName, "_IoT-E"); - SYS_CONSOLE_PRINT("App: Registering mDNS service as '%s'\r\n", mDNSServiceName); - // mDNS name will be xxxxxx_IoT-E where "xxxxxx" is the last three bytes of MAC address - mDNSServiceName[sizeof(mDNSServiceName) - 2] = '1' + i; - TCPIP_MDNS_ServiceRegister( netH - , mDNSServiceName // name of the service - ,"_http._tcp.local" // type of the service - ,80 // TCP or UDP port, at which this service is available - ,((const uint8_t *)"path=/index.htm") // TXT info - ,1 // auto rename the service when if needed - ,NULL // no callback function - ,NULL); + sprintf(appData.macAddress, "%02x%02x%02x%02x%02x%02x", + pAdd->v[0], pAdd->v[1], pAdd->v[2], + pAdd->v[3], pAdd->v[4], pAdd->v[5]); } - // Here we build our Update and Delta topic strings using the boards unique MAC address - sprintf(topic_awsUpdateDelta, "$aws/things/%02x%02x%02x%02x%02x%02x/shadow/update/delta", - appData.macAddress.v[0], appData.macAddress.v[1], appData.macAddress.v[2], - appData.macAddress.v[3], appData.macAddress.v[4], appData.macAddress.v[5]); - sprintf(topic_awsUpdate, "$aws/things/%02x%02x%02x%02x%02x%02x/shadow/update", - appData.macAddress.v[0], appData.macAddress.v[1], appData.macAddress.v[2], - appData.macAddress.v[3], appData.macAddress.v[4], appData.macAddress.v[5]); + // Here we build our Update and Delta topic strings using the boards MAC address + sprintf(topic_awsUpdateDelta, "$aws/things/%s/shadow/update/delta", appData.macAddress); + sprintf(topic_awsUpdate, "$aws/things/%s/shadow/update", appData.macAddress); APP_TIMER_Set(&appData.genericUseTimer); - appData.state = APP_TCPIP_WAIT_FOR_IP; + appData.state = APP_TCPIP_WAIT_CONFIGURATION; + } + break; + } + + case APP_TCPIP_WAIT_CONFIGURATION: + { + // Check to see if we are commissioned + if(appData.isCommissioned != true) + { + break; } + else + { // If appData.isCommissioned flag is set, then we know the config came from reading NVM so we can skip this step + if(appData.writeToNVM == true) + { + /* Clear the event counts */ + appData.eventCount = 0; + appData.errorEventCount = 0; + + //Queue NVM writes + APP_NVM_Write(NVM_HOST_ADDRESS_SPACE, appData.host); + APP_NVM_Write(NVM_CLIENT_CERTIFICATE_SPACE, appData.clientCert); + APP_NVM_Write(NVM_CLIENT_KEY_SPACE, appData.clientKey); + appData.state = APP_NVM_WRITE_CONFIGURATION; + } + else + { + appData.state = APP_TCPIP_WAIT_FOR_IP; + } + appData.lightShowVal = BSP_LED_INTIAL_CONNECT; + xQueueSendToFront(app1Data.lightShowQueue, &appData.lightShowVal, 1); + } + break; + } + + case APP_NVM_WRITE_CONFIGURATION: + { + if(appData.eventCount == 3) + { + APP_DebugMessage(DEBUG_NVM_WRITE_SUCCESS); + } + else if (appData.errorEventCount > 0) + { + APP_DebugMessage(DEBUG_NVM_WRITE_FAILED); + appData.state = APP_FATAL_ERROR; + } + else + { + break; + } + appData.state = APP_TCPIP_WAIT_FOR_IP; break; } @@ -661,10 +683,12 @@ void APP_Tasks ( void ) TCPIP_NET_HANDLE netH; int i, nNets; - if(APP_TIMER_Expired(&appData.genericUseTimer, 5)) + if(APP_TIMER_Expired(&appData.genericUseTimer, 10)) { - SYS_CONSOLE_MESSAGE("App: Not getting IP Addr, check connections. Retrying...\r\n"); + APP_DebugMessage(DEBUG_NO_IP_ADDRESS); APP_TIMER_Set(&appData.genericUseTimer); + uint32_t lightShowVal = BSP_LED_SERVER_CONNECT_FAILED; + xQueueSendToFront(app1Data.lightShowQueue, &lightShowVal, 1); } nNets = TCPIP_STACK_NumberOfNetworksGet(); @@ -678,74 +702,22 @@ void APP_Tasks ( void ) { uint32_t lightShowVal = BSP_LED_EASY_CONFIGURATION; xQueueSendToFront(app1Data.lightShowQueue, &lightShowVal, 1); - SYS_CONSOLE_PRINT("App: Board online. mDNS online. IP addr %d.%d.%d.%d online. All systems nominal.\r\n", - ipAddr.v[0],ipAddr.v[1],ipAddr.v[2],ipAddr.v[3]); - SYS_CONSOLE_PRINT("App: AWS Thing Name (MAC Address) '%s'\r\n", appData.uuid); - SYS_CONSOLE_MESSAGE("App: Waiting for configuration...\r\n"); - appData.state = APP_TCPIP_WAIT_CONFIGURATION; - } - } - } - break; - } - - case APP_TCPIP_WAIT_CONFIGURATION: - { - // We check if "host" is null, if it has a value, we assume we have a configuration - if(appData.host[0] == '\0') - { - break; - } - else - { // If validConfig flag is set, then we know the config came from reading NVM so we can skip this step - if(validConfig == 0) - { - SYS_CONSOLE_MESSAGE("App: Received configuration from webpage, writing to NVM...\r\n"); - if(APP_NVM_Write(NVM_HOST_ADDRESS_SPACE, appData.host) && - APP_NVM_Write(NVM_CLIENT_CERTIFICATE_SPACE, appData.clientCert) && - APP_NVM_Write(NVM_CLIENT_KEY_SPACE, appData.clientKey)) - { - SYS_CONSOLE_MESSAGE("App: Writing configuration to NVM - success\r\n"); - } - else - { - SYS_CONSOLE_MESSAGE("App: Writing configuration to NVM - failed\r\n"); - while(1); + appData.board_ipAddr.v4Add.Val = ipAddr.Val; + APP_DebugMessage(DEBUG_GOT_IP_ADDRESS); + appData.state = APP_TCPIP_MQTT_INIT; } - SYS_CONSOLE_PRINT("App: Configured AWS IoT Endpoint Address '%s'\r\n", appData.host); - } - else if(validConfig) - { - SYS_CONSOLE_PRINT("App: Found configuration - AWS IoT Endpoint Address '%s'\r\n", appData.host); - } - appData.lightShowVal = BSP_LED_INTIAL_CONNECT; - xQueueSendToFront(app1Data.lightShowQueue, &appData.lightShowVal, 1); - TCPIP_NET_HANDLE netH; - int i, nNets; - - //Disable ZeroConf and HTTP server since we have server - nNets = TCPIP_STACK_NumberOfNetworksGet(); - for (i = 0; i < nNets; i++) - { - netH = TCPIP_STACK_IndexToNet(i); - TCPIP_ZCLL_Disable(netH); } } - appData.state = APP_TCPIP_MQTT_INIT; break; } - - case APP_TCPIP_MQTT_INIT: { - SYS_CONSOLE_MESSAGE("App: Beginning MQTT Client application\r\n"); int rc = MqttClient_Init(&appData.myClient, &appData.myNet, mqttclient_message_cb, txBuffer, MAX_BUFFER_SIZE, rxBuffer, MAX_BUFFER_SIZE, MQTT_DEFAULT_CMD_TIMEOUT_MS); - SYS_CONSOLE_PRINT("App: MQTT.Client_Init: %s (%d)\r\n", MqttClient_ReturnCodeToString(rc), rc); if(rc != MQTT_CODE_SUCCESS) { - SYS_CONSOLE_MESSAGE("App: MQTT.Client_Init: Failed (catastrophic)\r\n"); - while(1); + appData.state = APP_FATAL_ERROR; + break; } APP_TIMER_Set(&appData.genericUseTimer); appData.state = APP_TCPIP_MQTT_NET_CONNECT; @@ -754,13 +726,10 @@ void APP_Tasks ( void ) case APP_TCPIP_MQTT_NET_CONNECT: { - SYS_CONSOLE_MESSAGE("App: MQTT.Net_Connect\r\n"); int rc = MqttClient_NetConnect(&appData.myClient, (const char *)&appData.host, AWS_IOT_PORT, MQTT_DEFAULT_CMD_TIMEOUT_MS, NULL, NULL); - SYS_CONSOLE_PRINT("App: MQTT.Net_Connect: %s (%d)\r\n", MqttClient_ReturnCodeToString(rc), rc); if(rc != MQTT_CODE_SUCCESS) - { - SYS_CONSOLE_PRINT("App: %s (%d)\r\n", APP_ReturnCodeToString(rc), rc); - SYS_CONSOLE_PRINT("App: Closing Socket %d\r\n\r\n", appData.socket); + { + appData.socket_connected = appData.mqtt_connected = false; NET_PRES_SocketClose(appData.socket); appData.lightShowVal = BSP_LED_SERVER_CONNECT_FAILED; xQueueSendToFront(app1Data.lightShowQueue, &appData.lightShowVal, 1); @@ -781,31 +750,23 @@ void APP_Tasks ( void ) XMEMSET(&connect, 0, sizeof(MqttConnect)); connect.keep_alive_sec = KEEP_ALIVE; connect.clean_session = 1; - char clientIdString[13]; - sprintf(clientIdString, appData.uuid, "%02x%02x%02x%02x%02x%02x\0", - appData.macAddress.v[0], appData.macAddress.v[1], appData.macAddress.v[2], - appData.macAddress.v[3], appData.macAddress.v[4], appData.macAddress.v[5]); - connect.client_id = clientIdString; + connect.client_id = appData.macAddress; XMEMSET(&lwt_msg, 0, sizeof(lwt_msg)); connect.lwt_msg = &lwt_msg; connect.enable_lwt = 0; /* Send Connect and wait for Connect Ack */ int rc = MqttClient_Connect(&appData.myClient, &connect); - SYS_CONSOLE_PRINT("App: MQTT.Client_Connect: %s (%d)\r\n", MqttClient_ReturnCodeToString(rc), rc); if(rc != MQTT_CODE_SUCCESS) { - SYS_CONSOLE_MESSAGE("App: MQTT.Client_Connect: failed\r\n"); + APP_TIMER_Set(&appData.genericUseTimer); while(!APP_TIMER_Expired(&appData.genericUseTimer, 5)); appData.state = APP_TCPIP_ERROR; break; } - /* Validate Connect Ack info */ - SYS_CONSOLE_PRINT("App: MQTT.Connect Ack: Return Code %u, Session Present %d, keep alive: %d\r\n", - connect.ack.return_code, - (connect.ack.flags & MQTT_CONNECT_ACK_FLAG_SESSION_PRESENT) ? - 1 : 0, connect.keep_alive_sec); + appData.mqtt_connected = true; + APP_DebugMessage(DEBUG_MQTT_CHANGE); APP_TIMER_Set(&appData.mqttKeepAlive); appData.state = APP_TCPIP_MQTT_SUBSCRIBE; break; @@ -814,9 +775,9 @@ void APP_Tasks ( void ) case APP_TCPIP_MQTT_SUBSCRIBE: { MqttSubscribe subscribe; - MqttTopic topics[1], *topic; + MqttTopic topics[1]; MqttPublish publish; - int i, rc; + int rc; /* Build list of topics */ topics[0].topic_filter = topic_awsUpdateDelta; @@ -827,23 +788,15 @@ void APP_Tasks ( void ) subscribe.packet_id = mqttclient_get_packetid(); subscribe.topic_count = sizeof(topics)/sizeof(MqttTopic); subscribe.topics = topics; + rc = MqttClient_Subscribe(&appData.myClient, &subscribe); - SYS_CONSOLE_PRINT("App: MQTT.Subscribe: %s (%d)\r\n", - MqttClient_ReturnCodeToString(rc), rc); if(rc != MQTT_CODE_SUCCESS) { - SYS_CONSOLE_MESSAGE("App: MQTT.Subscribe: failed\r\n"); APP_TIMER_Set(&appData.genericUseTimer); while(!APP_TIMER_Expired(&appData.genericUseTimer, 5)); appData.state = APP_TCPIP_ERROR; break; } - for (i = 0; i < subscribe.topic_count; i++) - { - topic = &subscribe.topics[i]; - SYS_CONSOLE_PRINT("App: MQTT.Topic List: %s, Qos %u, Return Code %u\r\n", - topic->topic_filter, topic->qos, topic->return_code); - } /* Publish Topic */ XMEMSET(&publish, 0, sizeof(MqttPublish)); @@ -862,11 +815,9 @@ void APP_Tasks ( void ) appData.led4val ? BSP_LEDOn(BSP_LED_4_CHANNEL, BSP_LED_4_PORT) : BSP_LEDOff(BSP_LED_4_CHANNEL, BSP_LED_4_PORT); publish.total_len = strlen((char *)publish.buffer); rc = MqttClient_Publish(&appData.myClient, &publish); - SYS_CONSOLE_PRINT("App: MQTT.Publish: Topic %s, %s (%d)\r\n Payload: %s\r\n", - publish.topic_name, MqttClient_ReturnCodeToString(rc), rc, publish.buffer); + if(rc != MQTT_CODE_SUCCESS) - { - SYS_CONSOLE_MESSAGE("App: MQTT.Publish: failed\r\n"); + { appData.state = APP_TCPIP_ERROR; break; } @@ -885,15 +836,11 @@ void APP_Tasks ( void ) APP_TIMER_Set(&appData.mqttKeepAlive); if (rc != MQTT_CODE_SUCCESS) { - SYS_CONSOLE_PRINT("App: MQTT.Ping: Keep Alive Error: %s (%d)\r\n", - MqttClient_ReturnCodeToString(rc), rc); appData.state = APP_TCPIP_ERROR; break; } else { - SYS_CONSOLE_PRINT("App: MQTT.Ping: %s (%d)\r\n", - MqttClient_ReturnCodeToString(rc), rc); appData.lightShowVal = BSP_LED_TX; xQueueSendToFront(app1Data.lightShowQueue, &appData.lightShowVal, 1); } @@ -908,16 +855,12 @@ void APP_Tasks ( void ) rc = MqttClient_Ping(&appData.myClient); if (rc != MQTT_CODE_SUCCESS) { - SYS_CONSOLE_PRINT("App: MQTT.Ping: Keep Alive Error: %s (%d)\r\n", - MqttClient_ReturnCodeToString(rc), rc); appData.state = APP_TCPIP_ERROR; break; } } else if (rc == MQTT_CODE_ERROR_NETWORK) { - SYS_CONSOLE_PRINT("App: MQTT.WaitMessage: Network Error: %s (%d)\r\n", - MqttClient_ReturnCodeToString(rc), rc); appData.state = APP_TCPIP_ERROR; break; } @@ -973,11 +916,8 @@ void APP_Tasks ( void ) publish.buffer = (byte *)reportedPayload; publish.total_len = strlen((char *)publish.buffer); rc = MqttClient_Publish(&appData.myClient, &publish); - SYS_CONSOLE_PRINT("App: MQTT.Publish: Topic %s, %s (%d)\r\n Payload: %s\r\n", - publish.topic_name, MqttClient_ReturnCodeToString(rc), rc, publish.buffer); if (rc != MQTT_CODE_SUCCESS) { - SYS_CONSOLE_MESSAGE("App: MQTT.Publish: failed, closing socket and reconnecting\r\n\r\n"); appData.state = APP_TCPIP_ERROR; } appData.lightShowVal = BSP_LED_TX; @@ -993,7 +933,6 @@ void APP_Tasks ( void ) { appData.lightShowVal = BSP_LED_SERVER_CONNECT_FAILED; xQueueSendToFront(app1Data.lightShowQueue, &appData.lightShowVal, 1); - SYS_CONSOLE_PRINT("App: MQTT.WaitMessage: Error: %s (%d)\r\n", MqttClient_ReturnCodeToString(rc), rc); appData.state = APP_TCPIP_ERROR; } break; @@ -1001,16 +940,25 @@ void APP_Tasks ( void ) case APP_TCPIP_ERROR: { - SYS_CONSOLE_PRINT("App: Closing Socket %d\r\n\r\n", appData.socket); NET_PRES_SocketClose(appData.socket); + appData.socket_connected = false; + appData.mqtt_connected = false; + APP_DebugMessage(DEBUG_ERROR_CLOSING_SOCKET); appData.state = APP_TCPIP_MQTT_NET_CONNECT; break; } + /* This error requires system reset or hardware debugging */ + case APP_FATAL_ERROR: + { + APP_DebugMessage(DEBUG_FATAL_ERROR); + break; + } + /* The default state should never be executed. */ default: { - /* TODO: Handle error in application's state machine. */ + APP_DebugMessage(DEBUG_FATAL_ERROR); break; } } diff --git a/software/aws-iot-ethernet/firmware/src/app.h b/software/aws-iot-ethernet/firmware/src/app.h index cfcba1a..e07056f 100644 --- a/software/aws-iot-ethernet/firmware/src/app.h +++ b/software/aws-iot-ethernet/firmware/src/app.h @@ -74,25 +74,34 @@ extern "C" { // Section: Type Definitions // ***************************************************************************** // ***************************************************************************** + +#define APP_HARDWARE "iot_ethernet_dm990004" +#define APP_TITLE "iot_ethernet" +#define APP_PART_NUMBER "dm990004" +#define APP_FIRMWARE_VERSION "2.0.0" + +// String literals for debugging + #define AWS_IOT_PORT 8883 -#define NVM_CLIENT_CERTIFICATE_SPACE (32 * 1024) -#define NVM_CLIENT_KEY_SPACE (16 * 1024) -#define NVM_HOST_ADDRESS_SPACE (64 * 1024) +#define NVM_CLIENT_CERTIFICATE_SPACE (64 * 1024) +#define NVM_CLIENT_KEY_SPACE (48 * 1024) +#define NVM_HOST_ADDRESS_SPACE (32 * 1024) /* Application Codes */ enum AppCodes { + APP_CODE_ERROR_BAD_ARG = -255, + APP_CODE_ERROR_OUT_OF_BUFFER, + APP_CODE_ERROR_SSL_FATAL, + APP_CODE_ERROR_INVALID_SOCKET, + APP_CODE_ERROR_FAILED_TO_BEGIN_DNS_RESOLUTION, + APP_CODE_ERROR_DNS_FAILED, + APP_CODE_ERROR_FAILED_SSL_NEGOTIATION, + APP_CODE_ERROR_TIMEOUT, + APP_CODE_ERROR_CMD_TIMEOUT, APP_CODE_SUCCESS = 0, - APP_CODE_ERROR_BAD_ARG = -1, - APP_CODE_ERROR_OUT_OF_BUFFER = -2, - APP_CODE_ERROR_SSL_FATAL = -3, - APP_CODE_ERROR_INVALID_SOCKET = -4, - APP_CODE_ERROR_FAILED_TO_BEGIN_DNS_RESOLUTION = -5, - APP_CODE_ERROR_DNS_FAILED = -6, - APP_CODE_ERROR_FAILED_SSL_NEGOTIATION = -7, - APP_CODE_ERROR_TIMEOUT = -8, - APP_CODE_ERROR_CMD_TIMEOUT = -9, }; + // ***************************************************************************** /* Application states @@ -108,9 +117,9 @@ typedef enum { /* Application's state machine's initial state. */ APP_STATE_INIT=0, - APP_NVM_MOUNT_DISK, APP_NVM_ERASE_CONFIGURATION, APP_NVM_LOAD_CONFIGURATION, + APP_NVM_WRITE_CONFIGURATION, APP_TCPIP_WAIT_INIT, APP_TCPIP_WAIT_FOR_IP, APP_TCPIP_WAIT_CONFIGURATION, @@ -120,6 +129,7 @@ typedef enum APP_TCPIP_MQTT_SUBSCRIBE, APP_TCPIP_MQTT_LOOP, APP_TCPIP_ERROR, + APP_FATAL_ERROR } APP_STATES; @@ -142,8 +152,8 @@ typedef struct /* The application's current state */ APP_STATES state; - // Last twelve characters of MAC address - char uuid[12 + 1]; + // MAC Address of board + char macAddress[12 + 1]; // Client certificate location __attribute__ ((aligned(4))) unsigned char clientCert[2048]; @@ -158,20 +168,30 @@ typedef struct void* ctx; void* ssl; + // Is board commissioned boolean flag + bool isCommissioned; + bool writeToNVM; + // The AWS endpoint to access the AWS IoT Service - unsigned char host[256]; + __attribute__ ((aligned(4))) unsigned char host[256]; // The AWS endpoint IP address location IP_MULTI_ADDRESS host_ipv4; - TCPIP_MAC_ADDR macAddress; - // NVM Driver DRV_HANDLE nvmHandle; - DRV_NVM_COMMAND_HANDLE nvmCommandHandle; + DRV_NVM_COMMAND_HANDLE nvmCommandHandle[10]; SYS_FS_MEDIA_GEOMETRY *gAppNVMMediaGeometry; DRV_NVM_COMMAND_STATUS nvmStatus; + /* Counter to track the number of successful command + complete events */ + uint8_t eventCount; + + /* Counter to track the number of unsuccessful command + complete events */ + uint8_t errorEventCount; + // Timers uint32_t genericUseTimer; uint32_t timerTCPIP; @@ -195,6 +215,12 @@ typedef struct bool led3val; bool led4val; + // Debug Variables + bool socket_connected; + bool mqtt_connected; + bool debugSet; + IP_MULTI_ADDRESS board_ipAddr; + } APP_DATA; @@ -281,6 +307,7 @@ void APP_Tasks( void ); bool APP_TIMER_Expired(uint32_t * timer, uint32_t seconds); bool APP_TIMER_Expired_ms(uint32_t * timer, uint32_t mseconds); bool APP_TIMER_Set(uint32_t * timer); +void APP_DebugMessage(int DebugMessage); #endif /* _APP_H */ diff --git a/software/aws-iot-ethernet/firmware/src/app1.c b/software/aws-iot-ethernet/firmware/src/app1.c index ab38a4d..d01d025 100644 --- a/software/aws-iot-ethernet/firmware/src/app1.c +++ b/software/aws-iot-ethernet/firmware/src/app1.c @@ -120,7 +120,7 @@ void APP1_Initialize ( void ) /* Place the App state machine in its initial state. */ app1Data.state = APP1_STATE_INIT; BSP_Initialize(); - BSP_LED_LightShowSet(BSP_LED_CONNECTING_TO_AP); + BSP_LED_LightShowSet(BSP_LED_EASY_CONFIGURATION); app1Data.newPotSamp = 0; app1Data.potTimer = 0; app1Data.newVoltageSamp = 0; @@ -138,7 +138,7 @@ void APP1_Initialize ( void ) ; // Handle this } // Queue for potentiometer data - // This will hold the latest potentionmeter data + // This will hold the latest potentiometer data app1Data.potentiometerQueue = xQueueCreate( 20, sizeof(app1Data.potValue) ); if(app1Data.potentiometerQueue == NULL) { ; // Handle this diff --git a/software/aws-iot-ethernet/firmware/src/app1.h b/software/aws-iot-ethernet/firmware/src/app1.h index af61a15..55fe1e6 100644 --- a/software/aws-iot-ethernet/firmware/src/app1.h +++ b/software/aws-iot-ethernet/firmware/src/app1.h @@ -118,21 +118,24 @@ typedef struct { /* The application's current state */ APP1_STATES state; - + + /* RTOS Queues */ QueueHandle_t switchQueue; QueueHandle_t lightShowQueue; QueueHandle_t potentiometerQueue; + /* Potentiometer variables */ uint32_t newPotSamp; uint32_t potValue; bool potChanged; + /* LVD variables */ uint32_t newVoltageSamp; uint32_t voltageValue; bool compTrip; bool currIsLVD; - + /* Timers */ uint32_t potTimer; } APP1_DATA; diff --git a/software/aws-iot-ethernet/firmware/src/app2.c b/software/aws-iot-ethernet/firmware/src/app2.c new file mode 100644 index 0000000..b61ed03 --- /dev/null +++ b/software/aws-iot-ethernet/firmware/src/app2.c @@ -0,0 +1,683 @@ +/******************************************************************************* + MPLAB Harmony Application Source File + + Company: + Microchip Technology Inc. + + File Name: + app2.c + + Summary: + This file contains the source code for the MPLAB Harmony application. + + Description: + This file contains the source code for the MPLAB Harmony application. It + implements the logic of the application's state machine and it may call + API routines of other MPLAB Harmony modules in the system, such as drivers, + system services, and middleware. However, it does not call any of the + system interfaces (such as the "Initialize" and "Tasks" functions) of any of + the modules in the system or make any assumptions about when those functions + are called. That is the responsibility of the configuration-specific system + files. + *******************************************************************************/ + +// DOM-IGNORE-BEGIN +/******************************************************************************* +Copyright (c) 2013-2014 released Microchip Technology Inc. All rights reserved. + +Microchip licenses to you the right to use, modify, copy and distribute +Software only when embedded on a Microchip microcontroller or digital signal +controller that is integrated into your product or third party product +(pursuant to the sublicense terms in the accompanying license agreement). + +You should refer to the license agreement accompanying this Software for +additional information regarding your rights and obligations. + +SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF +MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. +IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER +CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR +OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES +INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR +CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF +SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES +(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS. + *******************************************************************************/ +// DOM-IGNORE-END + + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** + +#include "app2.h" +#include "app_insight_support.h" +#include "parson.h" + +// ***************************************************************************** +// ***************************************************************************** +// Section: Global Data Definitions +// ***************************************************************************** +// ***************************************************************************** +extern APP_DATA appData; + +char APP_MAKE_BUFFER_DMA_READY readBuffer[APP_READ_BUFFER_SIZE]; +char APP_MAKE_BUFFER_DMA_READY writeBuffer[APP_WRITE_BUFFER_SIZE]; +char APP_MAKE_BUFFER_DMA_READY messageBuffer[APP_MESSAGE_BUFFER_SIZE]; + +// ***************************************************************************** +/* Application Data + + Summary: + Holds application data + + Description: + This structure holds the application's data. + + Remarks: + This structure should be initialized by the APP_Initialize function. + + Application strings and buffers are be defined outside this structure. +*/ + +APP2_DATA app2Data; + +// ***************************************************************************** +// ***************************************************************************** +// Section: Application Callback Functions +// ***************************************************************************** +// ***************************************************************************** + +/******************************************************* + * USB CDC Device Events - Application Event Handler + *******************************************************/ + +USB_DEVICE_CDC_EVENT_RESPONSE APP_USBDeviceCDCEventHandler +( + USB_DEVICE_CDC_INDEX index , + USB_DEVICE_CDC_EVENT event , + void * pData, + uintptr_t userData +) +{ + APP2_DATA * app2DataObject; + app2DataObject = (APP2_DATA *)userData; + USB_CDC_CONTROL_LINE_STATE * controlLineStateData; + + switch ( event ) + { + case USB_DEVICE_CDC_EVENT_GET_LINE_CODING: + + /* This means the host wants to know the current line + * coding. This is a control transfer request. Use the + * USB_DEVICE_ControlSend() function to send the data to + * host. */ + + USB_DEVICE_ControlSend(app2DataObject->deviceHandle, + &app2DataObject->getLineCodingData, sizeof(USB_CDC_LINE_CODING)); + + break; + + case USB_DEVICE_CDC_EVENT_SET_LINE_CODING: + + /* This means the host wants to set the line coding. + * This is a control transfer request. Use the + * USB_DEVICE_ControlReceive() function to receive the + * data from the host */ + + USB_DEVICE_ControlReceive(app2DataObject->deviceHandle, + &app2DataObject->setLineCodingData, sizeof(USB_CDC_LINE_CODING)); + + break; + + case USB_DEVICE_CDC_EVENT_SET_CONTROL_LINE_STATE: + + /* This means the host is setting the control line state. + * Read the control line state. We will accept this request + * for now. */ + + controlLineStateData = (USB_CDC_CONTROL_LINE_STATE *)pData; + app2DataObject->controlLineStateData.dtr = controlLineStateData->dtr; + app2DataObject->controlLineStateData.carrier = controlLineStateData->carrier; + + USB_DEVICE_ControlStatus(app2DataObject->deviceHandle, USB_DEVICE_CONTROL_STATUS_OK); + + break; + + case USB_DEVICE_CDC_EVENT_SEND_BREAK: + + /* This means that the host is requesting that a break of the + * specified duration be sent. Read the break duration */ + + app2DataObject->breakData = ((USB_DEVICE_CDC_EVENT_DATA_SEND_BREAK *)pData)->breakDuration; + + /* Complete the control transfer by sending a ZLP */ + USB_DEVICE_ControlStatus(app2DataObject->deviceHandle, USB_DEVICE_CONTROL_STATUS_OK); + + break; + + case USB_DEVICE_CDC_EVENT_READ_COMPLETE: + + /* This means that the host has sent some data*/ + //SYS_CONSOLE_MESSAGE("Read flag set\n"); + app2DataObject->isReadComplete = true; + break; + + case USB_DEVICE_CDC_EVENT_CONTROL_TRANSFER_DATA_RECEIVED: + + /* The data stage of the last control transfer is + * complete. For now we accept all the data */ + + USB_DEVICE_ControlStatus(app2DataObject->deviceHandle, USB_DEVICE_CONTROL_STATUS_OK); + break; + + case USB_DEVICE_CDC_EVENT_CONTROL_TRANSFER_DATA_SENT: + + /* This means the GET LINE CODING function data is valid. We dont + * do much with this data in this demo. */ + break; + + case USB_DEVICE_CDC_EVENT_WRITE_COMPLETE: + + /* This means that the data write got completed. We can schedule + * the next read. */ + + app2DataObject->isWriteComplete = true; + break; + + default: + break; + } + + return USB_DEVICE_CDC_EVENT_RESPONSE_NONE; +} + +/*********************************************** + * Application USB Device Layer Event Handler. + ***********************************************/ +void APP_USBDeviceEventHandler ( USB_DEVICE_EVENT event, void * eventData, uintptr_t context ) +{ + USB_DEVICE_EVENT_DATA_CONFIGURED *configuredEventData; + + static bool led; + + switch ( event ) + { + case USB_DEVICE_EVENT_SOF: + app2Data.sofEventHasOccurred = true; + break; + + case USB_DEVICE_EVENT_RESET: + + app2Data.isConfigured = false; + + break; + + case USB_DEVICE_EVENT_CONFIGURED: + + /* Set the USBID pin to output (LED control) after configuration is done */ + PLIB_PORTS_PinDirectionOutputSet(PORTS_ID_0, PORT_CHANNEL_F, PORTS_BIT_POS_3); + + (led) ? PLIB_PORTS_PinSet(PORTS_ID_0, PORT_CHANNEL_F, PORTS_BIT_POS_3) : PLIB_PORTS_PinClear(PORTS_ID_0, PORT_CHANNEL_F, PORTS_BIT_POS_3); + + /* Check the configuration. We only support configuration 1 */ + configuredEventData = (USB_DEVICE_EVENT_DATA_CONFIGURED*)eventData; + if ( configuredEventData->configurationValue == 1) + { + /* Register the CDC Device application event handler here. + * Note how the app2Data object pointer is passed as the + * user data */ + + USB_DEVICE_CDC_EventHandlerSet(USB_DEVICE_CDC_INDEX_0, APP_USBDeviceCDCEventHandler, (uintptr_t)&app2Data); + + /* Mark that the device is now configured */ + app2Data.isConfigured = true; + + } + break; + + case USB_DEVICE_EVENT_POWER_DETECTED: + + led = PLIB_PORTS_PinGetLatched(PORTS_ID_0, PORT_CHANNEL_F, PORTS_BIT_POS_3); + + /* Set the USBID pin to input (floating) so that it will be configured as DEVICE */ + PLIB_PORTS_PinDirectionInputSet(PORTS_ID_0, PORT_CHANNEL_F, PORTS_BIT_POS_3); + + /* VBUS was detected. We can attach the device */ + USB_DEVICE_Attach(app2Data.deviceHandle); + break; + + case USB_DEVICE_EVENT_POWER_REMOVED: + + /* VBUS is not available any more. Detach the device. */ + USB_DEVICE_Detach(app2Data.deviceHandle); + break; + + case USB_DEVICE_EVENT_SUSPENDED: + break; + + case USB_DEVICE_EVENT_RESUMED: + case USB_DEVICE_EVENT_ERROR: + default: + break; + } +} + +// ***************************************************************************** +// ***************************************************************************** +// Section: Application Local Functions +// ***************************************************************************** +// ***************************************************************************** + +bool APP_StateReset(void) +{ + /* This function returns true if the device + * was reset */ + + bool retVal; + + if(app2Data.isConfigured == false) + { + app2Data.state = APP2_STATE_WAIT_FOR_CONFIGURATION; + app2Data.readTransferHandle = USB_DEVICE_CDC_TRANSFER_HANDLE_INVALID; + app2Data.writeTransferHandle = USB_DEVICE_CDC_TRANSFER_HANDLE_INVALID; + app2Data.isReadComplete = false; + app2Data.isWriteComplete = false; + retVal = true; + } + else + { + retVal = false; + } + + return(retVal); +} + +// ***************************************************************************** +// ***************************************************************************** +// Section: Application Initialization and State Machine Functions +// ***************************************************************************** +// ***************************************************************************** + +/******************************************************************************* + Function: + void APP2_Initialize ( void ) + + Remarks: + See prototype in app2.h. + */ + +void APP2_Initialize ( void ) +{ + /* Place the App state machine in its initial state. */ + app2Data.state = APP2_STATE_INIT; + + /* Device Layer Handle */ + app2Data.deviceHandle = USB_DEVICE_HANDLE_INVALID ; + + /* Device configured status */ + app2Data.isConfigured = false; + + /* Initial get line coding state */ + app2Data.getLineCodingData.dwDTERate = 115200; + app2Data.getLineCodingData.bParityType = 0; + app2Data.getLineCodingData.bDataBits = 8; + + /* Read Transfer Handle */ + app2Data.readTransferHandle = USB_DEVICE_CDC_TRANSFER_HANDLE_INVALID; + + /* Write Transfer Handle */ + app2Data.writeTransferHandle = USB_DEVICE_CDC_TRANSFER_HANDLE_INVALID; + + /* Intialize the read complete flag */ + app2Data.isReadComplete = true; + + /*Initialize the write complete flag*/ + app2Data.isWriteComplete = true; + + /* Reset the switch debounce counter */ + app2Data.switchDebounceTimer = 0; + + /* Reset other flags */ + app2Data.sofEventHasOccurred = false; + + /* Set up the read buffer */ + app2Data.readBuffer = &readBuffer[0]; + + /* Set up the write buffer */ + app2Data.writeBuffer = &writeBuffer[0]; + + /* Initialize the timers */ + app2Data.messageTimeout = 0; + + /* Setup debug message queue */ + app2Data.debugQueue = xQueueCreate( 20, sizeof(int) ); + if(app2Data.debugQueue == NULL) { + ; // Handle this + } + xQueueReset(app2Data.debugQueue); +} + + +/****************************************************************************** + Function: + void APP2_Tasks ( void ) + + Remarks: + See prototype in app2.h. + */ + +void APP2_Tasks ( void ) +{ +/* Update the application state machine based + * on the current state */ + + switch(app2Data.state) + { + case APP2_STATE_INIT: + + /* Open the device layer */ + app2Data.deviceHandle = USB_DEVICE_Open( USB_DEVICE_INDEX_0, DRV_IO_INTENT_READWRITE ); + + if(app2Data.deviceHandle != USB_DEVICE_HANDLE_INVALID) + { + /* Register a callback with device layer to get event notification (for end point 0) */ + USB_DEVICE_EventHandlerSet(app2Data.deviceHandle, APP_USBDeviceEventHandler, 0); + + app2Data.state = APP2_STATE_WAIT_FOR_CONFIGURATION; + } + else + { + /* The Device Layer is not ready to be opened. We should try + * again later. */ + } + + break; + + case APP2_STATE_WAIT_FOR_CONFIGURATION: + + /* Check if the device was configured */ + if(app2Data.isConfigured) + { + app2Data.state = APP2_STATE_SCHEDULE_READ; + } + break; + + case APP2_STATE_SCHEDULE_READ: + if(APP_StateReset()) + { + break; + } + + /* If a read is complete, then schedule a read + * else wait for the current read to complete */ + + app2Data.state = APP2_STATE_WAIT_FOR_READ_COMPLETE; + if(app2Data.isReadComplete == true) + { + app2Data.isReadComplete = false; + app2Data.readTransferHandle = USB_DEVICE_CDC_TRANSFER_HANDLE_INVALID; + + USB_DEVICE_CDC_Read (USB_DEVICE_CDC_INDEX_0, + &app2Data.readTransferHandle, app2Data.readBuffer, + APP_READ_BUFFER_SIZE); + + if(app2Data.readTransferHandle == USB_DEVICE_CDC_TRANSFER_HANDLE_INVALID) + { + app2Data.state = APP2_STATE_ERROR; + break; + } + } + break; + + case APP2_STATE_WAIT_FOR_READ_COMPLETE: + + if(APP_StateReset()) + { + break; + } + + if(app2Data.isReadComplete == true) + { + // Check for delimiter + int res = APP_CheckForMessage(app2Data.readBuffer); + if(res == MESSAGE_BAD_POINTER) + { + // Do something + break; + } + else if(res == MESSAGE_NO_DELIMITER) + { + strcat(messageBuffer, app2Data.readBuffer); + memset(app2Data.readBuffer, '\0', APP_READ_BUFFER_SIZE); + app2Data.state = APP2_STATE_SCHEDULE_READ; + break; + } + + strcat(messageBuffer, app2Data.readBuffer); + // Parse for the command being sent so we can handle it + int command = APP_ParseCommand(messageBuffer); + + // Lets build our response message + // First initialize the JSON value and object from parson library + JSON_Value *rootValue = json_value_init_object(); + JSON_Object *rootObject = json_value_get_object(rootValue); + char *serializedString = NULL; + + // Build response and handle the command + switch(command) + { + // If hello command, respond with discovery packet + case COMMAND_HELLO: + json_object_dotset_string(rootObject, "message.command", "discovery"); + json_object_dotset_string(rootObject, "message.discovery_object.title", APP_TITLE); + json_object_dotset_string(rootObject, "message.discovery_object.part_number", APP_PART_NUMBER); + json_object_dotset_string(rootObject, "message.discovery_object.mac_address", appData.macAddress); + json_object_dotset_string(rootObject, "message.discovery_object.firmware_version", APP_FIRMWARE_VERSION); + json_object_dotset_string(rootObject, "message.discovery_object.harmony_version", SYS_VERSION_STR); + json_object_dotset_boolean(rootObject, "message.discovery_object.is_commissioned", appData.isCommissioned); + break; + + // If configuration command, respond with ACK/NACK + case COMMAND_CONFIGURE: + { + if(appData.isCommissioned == false) + { + JSON_Value *messageRoot = json_parse_string(messageBuffer); + if(json_value_get_type(messageRoot) != JSONObject) + { + BuildAckNackMessage(rootObject, "nack", "Invalid JSON Object"); + break; + } + else + { + JSON_Object *messageObject = json_value_get_object(messageRoot); + if( json_object_dotget_string(messageObject, "message.configuration_object.aws_iot_endpoint_address") != NULL && + json_object_dotget_string(messageObject, "message.configuration_object.aws_certificate") != NULL && + json_object_dotget_string(messageObject, "message.configuration_object.aws_certificate_private_key") != NULL ) + { + json_object_dotset_string(rootObject, "message.command", "ack"); + json_object_dotset_string(rootObject, "message.ack_nack_message", "Writing commission parameters to flash"); + sprintf((char *)appData.host, json_object_dotget_string(messageObject, "message.configuration_object.aws_iot_endpoint_address")); + sprintf((char *)appData.clientCert, json_object_dotget_string(messageObject, "message.configuration_object.aws_certificate")); + sprintf((char *)appData.clientKey, json_object_dotget_string(messageObject, "message.configuration_object.aws_certificate_private_key")); + appData.isCommissioned = true; + appData.writeToNVM = true; + } + else + { + BuildAckNackMessage(rootObject, "nack", "Invalid commission parameters"); + break; + } + } + } + else + { + BuildAckNackMessage(rootObject, "nack", "Already commissioned"); + } + break; + } + + case COMMAND_DEBUG_SET: + { + JSON_Value *messageRoot = json_parse_string(messageBuffer); + if(json_value_get_type(messageRoot) != JSONObject) + { + BuildAckNackMessage(rootObject, "nack", "Invalid JSON Object"); + break; + } + JSON_Object *messageObject = json_value_get_object(messageRoot); + if(messageObject == NULL) + { + BuildAckNackMessage(rootObject, "nack", "NULL Pointer"); + break; + } + BuildAckNackMessage(rootObject, "ack", "Received debug set"); + int DebugMessage = DEBUG_UPDATE; + xQueueSendToFront(app2Data.debugQueue, &DebugMessage, 1); + if(json_object_dotget_boolean(messageObject, "message.debug_set_object.set")) + appData.debugSet = true; + else + appData.debugSet = false; + break; + } + + case COMMAND_BAD_JSON: + BuildAckNackMessage(rootObject, "nack", "Bad JSON"); + break; + + case COMMAND_INVALID: + BuildAckNackMessage(rootObject, "nack", "Command Invalid"); + break; + + default: + BuildAckNackMessage(rootObject, "nack", "Something went wrong"); + break; + } + memset(app2Data.writeBuffer, '\0', APP_WRITE_BUFFER_SIZE); + // With our response built, serialize the response into a string + serializedString = json_serialize_to_string(rootValue); + strcpy(app2Data.writeBuffer, serializedString); + // Find length of string and add delimiter to end + app2Data.writeBuffer[strlen(app2Data.writeBuffer)] = '\r'; + + json_free_serialized_string(serializedString); + // Reset string buffers + memset(app2Data.readBuffer, '\0', APP_READ_BUFFER_SIZE); + memset(messageBuffer, '\0', APP_MESSAGE_BUFFER_SIZE); + app2Data.state = APP2_STATE_SCHEDULE_WRITE; + } + else + { + app2Data.state = APP2_STATE_WAIT_FOR_READ_COMPLETE; + if( uxQueueMessagesWaiting( app2Data.debugQueue ) > 0 ) + { + int debugMessageNumber; + xQueueReceive( app2Data.debugQueue, &debugMessageNumber, 1 ); + sprintf(app2Data.writeBuffer, + "{" + "\"message\":{" + "\"command\":\"debug\"," + "\"debug_object\":{" + "\"board_ip_address\":\"%d.%d.%d.%d\"," + "\"aws_iot_endpoint\":\"%s\"," + "\"mac_address\":\"%s\"," + "\"socket_connected\":%s," + "\"mqtt_connected\":%s," + "\"raw_message\":\"%s\"" + "}}}\r", + appData.board_ipAddr.v4Add.v[0], + appData.board_ipAddr.v4Add.v[1], + appData.board_ipAddr.v4Add.v[2], + appData.board_ipAddr.v4Add.v[3], + appData.host, + appData.macAddress, + (appData.socket_connected ? "true" : "false"), + (appData.mqtt_connected ? "true" : "false"), + APP_ReturnDebugCodeToString(debugMessageNumber)); + app2Data.state = APP2_STATE_SCHEDULE_DEBUG_WRITE; + } + } + break; + + + case APP2_STATE_SCHEDULE_WRITE: + + if(APP_StateReset()) + { + break; + } + + app2Data.writeTransferHandle = USB_DEVICE_CDC_TRANSFER_HANDLE_INVALID; + app2Data.isWriteComplete = false; + app2Data.state = APP2_STATE_WAIT_FOR_WRITE_COMPLETE; + + USB_DEVICE_CDC_Write(USB_DEVICE_CDC_INDEX_0, + &app2Data.writeTransferHandle, app2Data.writeBuffer, strlen(app2Data.writeBuffer), + USB_DEVICE_CDC_TRANSFER_FLAGS_DATA_COMPLETE); + + break; + + case APP2_STATE_WAIT_FOR_WRITE_COMPLETE: + + if(APP_StateReset()) + { + break; + } + + /* Check if message sent. The isWriteComplete + * flag gets updated in the CDC event handler */ + + if(app2Data.isWriteComplete == true) + { + app2Data.state = APP2_STATE_SCHEDULE_READ; + } + break; + + case APP2_STATE_SCHEDULE_DEBUG_WRITE: + if(APP_StateReset()) + { + break; + } + + app2Data.writeTransferHandle = USB_DEVICE_CDC_TRANSFER_HANDLE_INVALID; + app2Data.isWriteComplete = false; + app2Data.state = APP2_STATE_WAIT_FOR_DEBUG_WRITE_COMPLETE; + + USB_DEVICE_CDC_Write(USB_DEVICE_CDC_INDEX_0, + &app2Data.writeTransferHandle, app2Data.writeBuffer, strlen(app2Data.writeBuffer), + USB_DEVICE_CDC_TRANSFER_FLAGS_DATA_COMPLETE); + + break; + + case APP2_STATE_WAIT_FOR_DEBUG_WRITE_COMPLETE: + + if(APP_StateReset()) + { + break; + } + + /* Check if message sent. The isWriteComplete + * flag gets updated in the CDC event handler */ + + if(app2Data.isWriteComplete == true) + { + app2Data.state = APP2_STATE_WAIT_FOR_READ_COMPLETE; + } + break; + + case APP2_STATE_ERROR: + break; + default: + break; + } +} + + + +/******************************************************************************* + End of File + */ diff --git a/software/aws-iot-ethernet/firmware/src/app2.h b/software/aws-iot-ethernet/firmware/src/app2.h new file mode 100644 index 0000000..14e3cc4 --- /dev/null +++ b/software/aws-iot-ethernet/firmware/src/app2.h @@ -0,0 +1,293 @@ +/******************************************************************************* + MPLAB Harmony Application Header File + + Company: + Microchip Technology Inc. + + File Name: + app2.h + + Summary: + This header file provides prototypes and definitions for the application. + + Description: + This header file provides function prototypes and data type definitions for + the application. Some of these are required by the system (such as the + "APP_Initialize" and "APP_Tasks" prototypes) and some of them are only used + internally by the application (such as the "APP_STATES" definition). Both + are defined here for convenience. +*******************************************************************************/ + +//DOM-IGNORE-BEGIN +/******************************************************************************* +Copyright (c) 2013-2014 released Microchip Technology Inc. All rights reserved. + +Microchip licenses to you the right to use, modify, copy and distribute +Software only when embedded on a Microchip microcontroller or digital signal +controller that is integrated into your product or third party product +(pursuant to the sublicense terms in the accompanying license agreement). + +You should refer to the license agreement accompanying this Software for +additional information regarding your rights and obligations. + +SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF +MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. +IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER +CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR +OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES +INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR +CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF +SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES +(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS. + *******************************************************************************/ +//DOM-IGNORE-END + +#ifndef _APP2_H +#define _APP2_H + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** + +#include +#include +#include +#include +#include "system_config.h" +#include "system_definitions.h" + +// DOM-IGNORE-BEGIN +#ifdef __cplusplus // Provide C++ Compatibility + +extern "C" { + +#endif +// DOM-IGNORE-END + +// ***************************************************************************** +// ***************************************************************************** +// Section: Type Definitions +// ***************************************************************************** +// ***************************************************************************** +/* Application USB Device CDC Read Buffer Size. This should be a multiple of + * the CDC Bulk Endpoint size */ + +#define APP_READ_BUFFER_SIZE 4096 +#define APP_WRITE_BUFFER_SIZE 512 +#define APP_MESSAGE_BUFFER_SIZE 4096 + +/* Macro defines USB internal DMA Buffer criteria*/ + +#define APP_MAKE_BUFFER_DMA_READY __attribute__((coherent)) __attribute__((aligned(16))) + +// ***************************************************************************** +/* Application states + + Summary: + Application states enumeration + + Description: + This enumeration defines the valid application states. These states + determine the behavior of the application at various times. +*/ + +typedef enum +{ + /* Application's state machine's initial state. */ + APP2_STATE_INIT=0, + + /* Application waits for device configuration*/ + APP2_STATE_WAIT_FOR_CONFIGURATION, + + /* Check for data */ + APP2_STATE_SCHEDULE_READ, + + /* Wait for read complete */ + APP2_STATE_WAIT_FOR_READ_COMPLETE, + + /* Wait for the TX to get completed */ + APP2_STATE_SCHEDULE_WRITE, + + /* Wait for the write to complete */ + APP2_STATE_WAIT_FOR_WRITE_COMPLETE, + + /* Schedule a debug message */ + APP2_STATE_WAIT_FOR_DEBUG_WRITE_COMPLETE, + + /* Wait for debug write complete */ + APP2_STATE_SCHEDULE_DEBUG_WRITE, + + /* Application Error state*/ + APP2_STATE_ERROR + +} APP2_STATES; + + +// ***************************************************************************** +/* Application Data + + Summary: + Holds application data + + Description: + This structure holds the application's data. + + Remarks: + Application strings and buffers are be defined outside this structure. + */ + +typedef struct +{ +/* Device layer handle returned by device layer open function */ + USB_DEVICE_HANDLE deviceHandle; + + /* Application's current state*/ + APP2_STATES state; + + /* Set Line Coding Data */ + USB_CDC_LINE_CODING setLineCodingData; + + /* Device configured state */ + bool isConfigured; + + /* Get Line Coding Data */ + USB_CDC_LINE_CODING getLineCodingData; + + /* Control Line State */ + USB_CDC_CONTROL_LINE_STATE controlLineStateData; + + /* Read transfer handle */ + USB_DEVICE_CDC_TRANSFER_HANDLE readTransferHandle; + + /* Write transfer handle */ + USB_DEVICE_CDC_TRANSFER_HANDLE writeTransferHandle; + + /* True if a character was read */ + bool isReadComplete; + + /* True if a character was written*/ + bool isWriteComplete; + + + /* Flag determines SOF event occurrence */ + bool sofEventHasOccurred; + + /* Break data */ + uint16_t breakData; + + /* Switch debounce timer */ + unsigned int switchDebounceTimer; + + unsigned int debounceCount; + + /* Application CDC read buffer */ + char * readBuffer; + + /* Application CDC write buffer */ + char * writeBuffer; + + /* Application timers */ + uint32_t messageTimeout; + + /* Application handler */ + QueueHandle_t debugQueue; + +} APP2_DATA; + + +// ***************************************************************************** +// ***************************************************************************** +// Section: Application Callback Routines +// ***************************************************************************** +// ***************************************************************************** +/* These routines are called by drivers when certain events occur. +*/ + +// ***************************************************************************** +// ***************************************************************************** +// Section: Application Initialization and State Machine Functions +// ***************************************************************************** +// ***************************************************************************** + +/******************************************************************************* + Function: + void APP2_Initialize ( void ) + + Summary: + MPLAB Harmony application initialization routine. + + Description: + This function initializes the Harmony application. It places the + application in its initial state and prepares it to run so that its + APP_Tasks function can be called. + + Precondition: + All other system initialization routines should be called before calling + this routine (in "SYS_Initialize"). + + Parameters: + None. + + Returns: + None. + + Example: + + APP2_Initialize(); + + + Remarks: + This routine must be called from the SYS_Initialize function. +*/ + +void APP2_Initialize ( void ); + + +/******************************************************************************* + Function: + void APP2_Tasks ( void ) + + Summary: + MPLAB Harmony Demo application tasks function + + Description: + This routine is the Harmony Demo application's tasks function. It + defines the application's state machine and core logic. + + Precondition: + The system and application initialization ("SYS_Initialize") should be + called before calling this. + + Parameters: + None. + + Returns: + None. + + Example: + + APP2_Tasks(); + + + Remarks: + This routine must be called from SYS_Tasks() routine. + */ + +void APP2_Tasks( void ); + + +#endif /* _APP2_H */ + +//DOM-IGNORE-BEGIN +#ifdef __cplusplus +} +#endif +//DOM-IGNORE-END + +/******************************************************************************* + End of File + */ + diff --git a/software/aws-iot-ethernet/firmware/src/app_insight_support.c b/software/aws-iot-ethernet/firmware/src/app_insight_support.c new file mode 100644 index 0000000..2116175 --- /dev/null +++ b/software/aws-iot-ethernet/firmware/src/app_insight_support.c @@ -0,0 +1,167 @@ +/******************************************************************************* + MPLAB Harmony Application Header File + + Company: + Microchip Technology Inc. + + File Name: + app2.h + + Summary: + This header file provides prototypes and definitions for the application. + + Description: + This header file provides function prototypes and data type definitions for + the application. Some of these are required by the system (such as the + "APP_Initialize" and "APP_Tasks" prototypes) and some of them are only used + internally by the application (such as the "APP_STATES" definition). Both + are defined here for convenience. +*******************************************************************************/ + +//DOM-IGNORE-BEGIN +/******************************************************************************* +Copyright (c) 2013-2014 released Microchip Technology Inc. All rights reserved. + +Microchip licenses to you the right to use, modify, copy and distribute +Software only when embedded on a Microchip microcontroller or digital signal +controller that is integrated into your product or third party product +(pursuant to the sublicense terms in the accompanying license agreement). + +You should refer to the license agreement accompanying this Software for +additional information regarding your rights and obligations. + +SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF +MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. +IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER +CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR +OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES +INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR +CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF +SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES +(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS. +*******************************************************************************/ +//DOM-IGNORE-END + +/* ************************************************************************** */ +/* ************************************************************************** */ +/* Section: Included Files */ +/* ************************************************************************** */ +/* ************************************************************************** */ +#include "app_insight_support.h" +#include "stdlib.h" +#include "stdbool.h" +#include "string.h" + +/* ************************************************************************** */ +/* ************************************************************************** */ +/* Section: File Scope or Global Data */ +/* ************************************************************************** */ +/* ************************************************************************** */ + +/* ************************************************************************** */ +/* ************************************************************************** */ +// Section: Local Functions */ +/* ************************************************************************** */ +/* ************************************************************************** */ + +/* ************************************************************************** */ +/* ************************************************************************** */ +// Section: Interface Functions */ +/* ************************************************************************** */ +/* ************************************************************************** */ + +int APP_ParseCommand(char * pReadBuffer) +{ + if(pReadBuffer == NULL) + return COMMAND_BAD_POINTER; + JSON_Value *rootValue = json_parse_string(pReadBuffer); + if (json_value_get_type(rootValue) != JSONObject) + return COMMAND_BAD_JSON; + JSON_Object * tObject = json_value_get_object(rootValue); + + if(json_object_dotget_string(tObject, "message.command") != NULL) + { + if(strcmp(json_object_dotget_string(tObject, "message.command"), "hello") == 0) + { + return COMMAND_HELLO; + } + else if (strcmp(json_object_dotget_string(tObject, "message.command"), "configuration") == 0) + { + return COMMAND_CONFIGURE; + } + else if (strcmp(json_object_dotget_string(tObject, "message.command"), "debug_set") == 0) + { + return COMMAND_DEBUG_SET; + } + else + { + return COMMAND_INVALID; + } + } + else + { + return COMMAND_INVALID; + } + return COMMAND_INVALID; +} + +void BuildAckNackMessage(JSON_Object *rootObject, char * command, char * msg) +{ + json_object_dotset_string(rootObject, "message.command", command); + json_object_dotset_string(rootObject, "message.ack_nack_message", msg); +} + +int APP_CheckForMessage(char * pMessage) +{ + if(pMessage == NULL) + return MESSAGE_BAD_POINTER; + if(strchr(pMessage, DELIMITER)) + { + return MESSAGE_DELIMITER; + } + else + { + return MESSAGE_NO_DELIMITER; + } + +} + +void APP_BuildDebugString(char * messageBuffer, int sizeMessageBuffer, int command) +{ + if(messageBuffer == NULL) + return; + + +} + +const char* APP_ReturnDebugCodeToString(int debugCommand) +{ + switch(debugCommand) + { + case DEBUG_UPDATE: + return "Debug update"; + case DEBUG_NVM_WRITE_SUCCESS: + return "Configuration successfully written to NVM"; + case DEBUG_NVM_WRITE_FAILED: + return "Configuration failed to write to NVM, reset and try again"; + case DEBUG_NO_IP_ADDRESS: + return "Not getting an IP address, check connection"; + case DEBUG_SOCKET_CHANGE: + return "Change socket state"; + case DEBUG_MQTT_CHANGE: + return "Change mqtt state"; + case DEBUG_GOT_IP_ADDRESS: + return "Got IP address"; + case DEBUG_ERROR_CLOSING_SOCKET: + return "Error, closing socket and retrying"; + case DEBUG_FATAL_ERROR: + return "Fatal Error, requires board reset"; + + } + return "Unknown debug command"; +} + +/* ***************************************************************************** + End of File + */ diff --git a/software/aws-iot-ethernet/firmware/src/app_insight_support.h b/software/aws-iot-ethernet/firmware/src/app_insight_support.h new file mode 100644 index 0000000..01763dd --- /dev/null +++ b/software/aws-iot-ethernet/firmware/src/app_insight_support.h @@ -0,0 +1,97 @@ +/******************************************************************************* + MPLAB Harmony Application Header File + + Company: + Microchip Technology Inc. + + File Name: + app2.h + + Summary: + This header file provides prototypes and definitions for the application. + + Description: + This header file provides function prototypes and data type definitions for + the application. Some of these are required by the system (such as the + "APP_Initialize" and "APP_Tasks" prototypes) and some of them are only used + internally by the application (such as the "APP_STATES" definition). Both + are defined here for convenience. +*******************************************************************************/ + +//DOM-IGNORE-BEGIN +/******************************************************************************* +Copyright (c) 2013-2014 released Microchip Technology Inc. All rights reserved. + +Microchip licenses to you the right to use, modify, copy and distribute +Software only when embedded on a Microchip microcontroller or digital signal +controller that is integrated into your product or third party product +(pursuant to the sublicense terms in the accompanying license agreement). + +You should refer to the license agreement accompanying this Software for +additional information regarding your rights and obligations. + +SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF +MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. +IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER +CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR +OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES +INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR +CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF +SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES +(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS. + *******************************************************************************/ +//DOM-IGNORE-END + +#include "parson.h" + +#ifndef _APP_INSIGHT_SUPPORT_H /* Guard against multiple inclusion */ +#define _APP_INSIGHT_SUPPORT_H + +#define DELIMITER '\r' + +enum ErrorCodes +{ + MESSAGE_DELIMITER, + MESSAGE_NO_DELIMITER, + MESSAGE_BAD_POINTER +}; + +enum CommandCodes +{ + COMMAND_BAD_POINTER, + COMMAND_BAD_JSON, + COMMAND_INVALID, + COMMAND_HELLO, + COMMAND_CONFIGURE, + COMMAND_WIFI_CONFIGURE, + COMMAND_DEBUG_MSG, + COMMAND_DISCOVERY, + COMMAND_ACK, + COMMAND_NACK, + COMMAND_DEBUG_SET +}; + +enum DebugCodes +{ + DEBUG_UPDATE, + DEBUG_NVM_WRITE_FAILED, + DEBUG_NVM_WRITE_SUCCESS, + DEBUG_NO_IP_ADDRESS, + DEBUG_SOCKET_CHANGE, + DEBUG_MQTT_CHANGE, + DEBUG_GOT_IP_ADDRESS, + DEBUG_ERROR_CLOSING_SOCKET, + DEBUG_FATAL_ERROR +}; + +int APP_ParseCommand(char * pReadBuffer); +int APP_CheckForMessage(char * pMessage); +void BuildAckNackMessage(JSON_Object *rootObject, char * command, char * msg); +const char* APP_ReturnDebugCodeToString(int return_code); + +#endif /* _APP_INSIGHT_SUPPORT_H */ + +/* ***************************************************************************** + End of File + */ diff --git a/software/aws-iot-ethernet/firmware/src/app_nvm_support.c b/software/aws-iot-ethernet/firmware/src/app_nvm_support.c index 61924f6..984fe05 100644 --- a/software/aws-iot-ethernet/firmware/src/app_nvm_support.c +++ b/software/aws-iot-ethernet/firmware/src/app_nvm_support.c @@ -47,113 +47,47 @@ extern APP_DATA appData; bool APP_NVM_Erase(uint32_t nvm_dest_address) { int tmp; - - appData.nvmHandle = DRV_NVM_Open(0, DRV_IO_INTENT_READWRITE); - if(DRV_HANDLE_INVALID == appData.nvmHandle) - { - return false; - } - - appData.gAppNVMMediaGeometry = DRV_NVM_GeometryGet(appData.nvmHandle); - if(NULL ==appData. gAppNVMMediaGeometry) - { - return false; - } - tmp = nvm_dest_address * (appData.gAppNVMMediaGeometry->geometryTable[2].numBlocks) / (DRV_NVM_MEDIA_SIZE * 1024); - DRV_NVM_Erase(appData.nvmHandle, &appData.nvmCommandHandle, tmp, 1); + DRV_NVM_Erase(appData.nvmHandle, &appData.nvmCommandHandle[0], tmp, 1); if(appData.nvmCommandHandle == DRV_NVM_COMMAND_HANDLE_INVALID) { return false; } - while(DRV_NVM_COMMAND_COMPLETED != DRV_NVM_CommandStatus(appData.nvmHandle, appData.nvmCommandHandle)) + while(DRV_NVM_COMMAND_COMPLETED != DRV_NVM_CommandStatus(appData.nvmHandle, appData.nvmCommandHandle[0])) { ; } - DRV_NVM_Close(appData.nvmHandle); return true; } bool APP_NVM_Write(uint32_t nvm_dest_address, uint8_t * data) { - int i, tmp; - uint8_t NVM_DATA_READ_BUFF_local[DRV_NVM_ROW_SIZE]; - uint8_t NVM_DATA_BUFF_local[DRV_NVM_ROW_SIZE]; - - for (i = 0; i < DRV_NVM_ROW_SIZE; i++) - NVM_DATA_BUFF_local[i] = data[i]; - - appData.nvmHandle = DRV_NVM_Open(0, DRV_IO_INTENT_READWRITE); - if(DRV_HANDLE_INVALID == appData.nvmHandle){ - return false; - } - - appData.gAppNVMMediaGeometry = DRV_NVM_GeometryGet(appData.nvmHandle); - if(NULL == appData. gAppNVMMediaGeometry){ - return false; - } - - DRV_NVM_Read (appData.nvmHandle, &appData.nvmCommandHandle, NVM_DATA_READ_BUFF_local, nvm_dest_address, DRV_NVM_ROW_SIZE); - if (DRV_NVM_COMMAND_HANDLE_INVALID == appData.nvmCommandHandle) { - return false;; - } - - tmp = nvm_dest_address * (appData.gAppNVMMediaGeometry->geometryTable[2].numBlocks) / (DRV_NVM_MEDIA_SIZE * 1024); - DRV_NVM_Erase(appData.nvmHandle, &appData.nvmCommandHandle, tmp, 1); - if(appData.nvmCommandHandle == DRV_NVM_COMMAND_HANDLE_INVALID){ - return false; - } - - - while(DRV_NVM_COMMAND_COMPLETED != DRV_NVM_CommandStatus(appData.nvmHandle, appData.nvmCommandHandle)) - { - ; - } - + int tmp; tmp = nvm_dest_address * (appData.gAppNVMMediaGeometry->geometryTable[1].numBlocks) / (DRV_NVM_MEDIA_SIZE * 1024); - DRV_NVM_Write(appData.nvmHandle, &appData.nvmCommandHandle, (uint8_t *)NVM_DATA_BUFF_local, tmp, 1); - if(DRV_NVM_COMMAND_HANDLE_INVALID == appData.nvmCommandHandle) + DRV_NVM_EraseWrite(appData.nvmHandle, &appData.nvmCommandHandle[0], (uint8_t *)data, tmp, 1); + if(DRV_NVM_COMMAND_HANDLE_INVALID == appData.nvmCommandHandle[0]) { return false; } - while(DRV_NVM_COMMAND_COMPLETED != DRV_NVM_CommandStatus(appData.nvmHandle, appData.nvmCommandHandle)) - { - ; - } - DRV_NVM_Close(appData.nvmHandle); return true; } bool APP_NVM_Read(uint32_t nvm_dest_address, uint8_t * buffer, uint32_t bufferLength) { - appData.nvmHandle = DRV_NVM_Open(0, DRV_IO_INTENT_READWRITE); - if(DRV_HANDLE_INVALID == appData.nvmHandle) - { - return false; - } - - appData.gAppNVMMediaGeometry = DRV_NVM_GeometryGet(appData.nvmHandle); - if(NULL == appData.gAppNVMMediaGeometry) - { - return false; - } - - DRV_NVM_Read(appData.nvmHandle, &appData.nvmCommandHandle, buffer, nvm_dest_address, bufferLength); - if(DRV_NVM_COMMAND_HANDLE_INVALID == appData.nvmCommandHandle) + DRV_NVM_Read(appData.nvmHandle, &appData.nvmCommandHandle[0], buffer, nvm_dest_address, bufferLength); + if(DRV_NVM_COMMAND_HANDLE_INVALID == appData.nvmCommandHandle[0]) { return false; } - while(DRV_NVM_COMMAND_COMPLETED != DRV_NVM_CommandStatus(appData.nvmHandle, appData.nvmCommandHandle)) + while(DRV_NVM_COMMAND_COMPLETED != DRV_NVM_CommandStatus(appData.nvmHandle, appData.nvmCommandHandle[0])) { ; } - DRV_NVM_Close(appData.nvmHandle); return true; - -} \ No newline at end of file +} diff --git a/software/aws-iot-ethernet/firmware/src/ca-certs.h b/software/aws-iot-ethernet/firmware/src/ca-certs.h index 99dfd97..c7d4b21 100644 --- a/software/aws-iot-ethernet/firmware/src/ca-certs.h +++ b/software/aws-iot-ethernet/firmware/src/ca-certs.h @@ -4,6 +4,7 @@ #define CERTS_H #ifdef USE_CERT_BUFFERS_2048 + /* ./rootCA.der, 2048-bit */ static const unsigned char caCert[] = { diff --git a/software/aws-iot-ethernet/firmware/src/configuration_http.c b/software/aws-iot-ethernet/firmware/src/configuration_http.c deleted file mode 100644 index 60d917f..0000000 --- a/software/aws-iot-ethernet/firmware/src/configuration_http.c +++ /dev/null @@ -1,289 +0,0 @@ -/******************************************************************************* - Application to Demo HTTP Server - - Summary: - Support for HTTP module in Microchip TCP/IP Stack - - Description: - -Implements the application - -Reference: RFC 1002 -*******************************************************************************/ - -/******************************************************************************* -File Name: configuration_http.c -Copyright (C) 2012 released Microchip Technology Inc. All rights -reserved. - -Microchip licenses to you the right to use, modify, copy and distribute -Software only when embedded on a Microchip microcontroller or digital signal -controller that is integrated into your product or third party product -(pursuant to the sublicense terms in the accompanying license agreement). - -You should refer to the license agreement accompanying this Software for -additional information regarding your rights and obligations. - -SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, -EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF -MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. -IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER -CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR -OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES -INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR -CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF -SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES -(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS. -*******************************************************************************/ - -#define __CUSTOMHTTPAPP_C - -#include "system_config.h" - -#if defined(TCPIP_STACK_USE_HTTP_SERVER) - -#include "tcpip/tcpip.h" -#include "system/tmr/sys_tmr.h" -#include "system/random/sys_random.h" -#include "tcpip/src/common/helpers.h" -#include "tcpip/src/tcpip_private.h" - -#include "app.h" -#include "app_nvm_support.h" - - -/**************************************************************************** - Section: - Definitions - ***************************************************************************/ -extern APP_DATA appData; - -/**************************************************************************** - Section: - Function Prototypes and Memory Globalizers - ***************************************************************************/ -static HTTP_IO_RESULT HTTPPostConfig(HTTP_CONN_HANDLE connHandle); - -// Sticky status message variable. -// This is used to indicated whether or not the previous POST operation was -// successful. The application uses these to store status messages when a -// POST operation redirects. This lets the application provide status messages -// after a redirect, when connection instance data has already been lost. -//static bool lastSuccess = false; - -// Stick status message variable. See lastSuccess for details. -static bool lastFailure = false; - -/**************************************************************************** - Section: - GET Form Handlers - ***************************************************************************/ - -/***************************************************************************** - Function: - HTTP_IO_RESULT TCPIP_HTTP_GetExecute(HTTP_CONN_HANDLE connHandle) - - Internal: - See documentation in the TCP/IP Stack API or HTTP.h for details. - ***************************************************************************/ -HTTP_IO_RESULT TCPIP_HTTP_GetExecute(HTTP_CONN_HANDLE connHandle) -{ - uint8_t filename[20]; - //uint8_t* httpDataBuff; - - // Load the file name - // Make sure uint8_t filename[] above is large enough for your longest name - SYS_FS_FileNameGet(TCPIP_HTTP_CurrentConnectionFileGet(connHandle), filename, 20); - -TCPIP_HTTP_CurrentConnectionDataBufferGet(connHandle); - - // Example of how to process a GET request call - // If its the forms.htm page -// if(!memcmp(filename, "forms.htm", 9)) -// { -// -// } - return HTTP_IO_DONE; -} - -/**************************************************************************** - Section: - POST Form Handlers - ***************************************************************************/ -#if defined(TCPIP_HTTP_USE_POST) - -/***************************************************************************** - Function: - HTTP_IO_RESULT TCPIP_HTTP_PostExecute(HTTP_CONN_HANDLE connHandle) - - Internal: - See documentation in the TCP/IP Stack API or HTTP.h for details. - ***************************************************************************/ -HTTP_IO_RESULT TCPIP_HTTP_PostExecute(HTTP_CONN_HANDLE connHandle) -{ - // Resolve which function to use and pass along - uint8_t filename[20]; - - // Load the file name - // Make sure uint8_t filename[] above is large enough for your longest name - SYS_FS_FileNameGet(TCPIP_HTTP_CurrentConnectionFileGet(connHandle), filename, sizeof(filename)); - - if(!memcmp(filename, "index.htm", 9)) - return HTTPPostConfig(connHandle) /*HTTPPostConfig()*/; - - - return HTTP_IO_DONE; -} - - -/***************************************************************************** - Function: - static HTTP_IO_RESULT HTTPPostConfig(HTTP_CONN_HANDLE connHandle) - - Summary: - Processes the configuration form on index.htm - - Description: - Accepts configuration parameters from the form, saves them to a - temporary location in RAM, then eventually saves the data to EEPROM or - external Flash. - - When complete, this function redirects to reconnect.htm, which will - display information on the board connecting to the amazon server. - - If an error occurs, error.htm will be seen. - - Precondition: - None - - Parameters: - connHandle - HTTP connection handle - - Return Values: - HTTP_IO_DONE - all parameters have been processed - HTTP_IO_NEED_DATA - data needed by this function has not yet arrived - ***************************************************************************/ - -static HTTP_IO_RESULT HTTPPostConfig(HTTP_CONN_HANDLE connHandle) -{ - uint8_t i; - - uint8_t* httpDataBuff = 0; - bool bConfigFailure = false; - uint32_t byteCount; - TCP_SOCKET sktHTTP; - - byteCount = TCPIP_HTTP_CurrentConnectionByteCountGet(connHandle); - sktHTTP = TCPIP_HTTP_CurrentConnectionSocketGet(connHandle); - if(byteCount > TCPIP_TCP_GetIsReady(sktHTTP) + TCPIP_TCP_FifoRxFreeGet(sktHTTP)) - { // Configuration Failure - lastFailure = true; - TCPIP_HTTP_CurrentConnectionStatusSet(connHandle, HTTP_REDIRECT); - return HTTP_IO_DONE; - } - - // Ensure that all data is waiting to be parsed. If not, keep waiting for - // all of it to arrive. - if(TCPIP_TCP_GetIsReady(sktHTTP) < byteCount) - return HTTP_IO_NEED_DATA; - - // Use current config in non-volatile memory as defaults - httpDataBuff = TCPIP_HTTP_CurrentConnectionDataBufferGet(connHandle); - - // Read all browser POST data - while(TCPIP_HTTP_CurrentConnectionByteCountGet(connHandle)) - { - // Read a form field name - if(TCPIP_HTTP_PostNameRead(connHandle, httpDataBuff, 6) != HTTP_READ_OK) - { - bConfigFailure = true; - break; - } - - // Read a form field value - if(TCPIP_HTTP_PostValueRead(connHandle, httpDataBuff + 6, TCPIP_HTTP_MAX_DATA_LEN-6-2) != HTTP_READ_OK) - { - bConfigFailure = true; - break; - } - - // Parse the value that was read - if(!strcmp((char*)httpDataBuff, (const char*)"rs")) - { - memcpy((uint8_t *)appData.host, (void*)(httpDataBuff+6), strlen((char*)(httpDataBuff+6))); - appData.host[strlen((char*)(httpDataBuff+6))] = 0; /* Terminate string */ - } - else if(!strcmp((char*)httpDataBuff, (const char*)"cc")) - { - memcpy((uint8_t *)appData.clientCert, (void*)(httpDataBuff+6), strlen((char*)(httpDataBuff+6))); - appData.clientCert[strlen((char*)(httpDataBuff+6))] = 0; /* Terminate string */ - } - else if(!strcmp((char*)httpDataBuff, (const char*)"ck")) - { - memcpy((uint8_t *)appData.clientKey, (void*)(httpDataBuff+6), strlen((char*)(httpDataBuff+6))); - appData.clientKey[strlen((char*)(httpDataBuff+6))] = 0; /* Terminate string */ - } - - } - - if(bConfigFailure == false) - { - // All parsing complete! Save new settings and force an interface restart - // Set the interface to restart and display reconnecting information - strcpy((char*)httpDataBuff, "reconnect.htm?"); - httpDataBuff[20+16] = 0x00; // Force null termination - for(i = 20; i < 20u+16u; i++) - { - if(httpDataBuff[i] == ' ') - httpDataBuff[i] = 0x00; - } - - } - else - { // Configuration error - - lastFailure = true; - if(httpDataBuff) - { - strcpy((char*)httpDataBuff, "error.htm"); - } - } - - TCPIP_HTTP_CurrentConnectionStatusSet(connHandle, HTTP_REDIRECT); - - return HTTP_IO_DONE; -} - -#endif - - -/**************************************************************************** - Section: - Dynamic Variable Callback Functions - ***************************************************************************/ -/**************************************************************************** - Section: - Dynamic Variable Callback Functions - ***************************************************************************/ - -/***************************************************************************** - Function: - void TCPIP_HTTP_Print_varname(void) - - Internal: - See documentation in the TCP/IP Stack API or HTTP.h for details. - ***************************************************************************/ -void TCPIP_HTTP_Print_remoteServer(HTTP_CONN_HANDLE connHandle) -{ - TCP_SOCKET sktHTTP; - sktHTTP = TCPIP_HTTP_CurrentConnectionSocketGet(connHandle); - TCPIP_TCP_StringPut(sktHTTP, (const uint8_t*)appData.host); -} - -void TCPIP_HTTP_Print_uuid(HTTP_CONN_HANDLE connHandle) -{ - TCP_SOCKET sktHTTP; - sktHTTP = TCPIP_HTTP_CurrentConnectionSocketGet(connHandle); - TCPIP_TCP_StringPut(sktHTTP, (const uint8_t*)appData.uuid); //nextSSID -} - - -#endif diff --git a/software/aws-iot-ethernet/firmware/src/configuration_webpage/DynRcrd.bin b/software/aws-iot-ethernet/firmware/src/configuration_webpage/DynRcrd.bin deleted file mode 100644 index b797d3ffde3539a4387bf7e75cf7a9ab811db819..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 60 ocmWe*U|?VZVhE66VPIecGSz?>A!-Q}0`V$ - - - - Configuration Error - - -

- Future home of Mchp error notification. -

- - \ No newline at end of file diff --git a/software/aws-iot-ethernet/firmware/src/configuration_webpage/footer.inc b/software/aws-iot-ethernet/firmware/src/configuration_webpage/footer.inc deleted file mode 100644 index 016fac4..0000000 --- a/software/aws-iot-ethernet/firmware/src/configuration_webpage/footer.inc +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/software/aws-iot-ethernet/firmware/src/configuration_webpage/header.inc b/software/aws-iot-ethernet/firmware/src/configuration_webpage/header.inc deleted file mode 100644 index 11c2e0f..0000000 --- a/software/aws-iot-ethernet/firmware/src/configuration_webpage/header.inc +++ /dev/null @@ -1,11 +0,0 @@ - - - -Microchip IoT Ethernet Development Kit - - - -
-
Microchip
-
Embedded Configuration Webpage
 
\ No newline at end of file diff --git a/software/aws-iot-ethernet/firmware/src/configuration_webpage/images/mchp.gif b/software/aws-iot-ethernet/firmware/src/configuration_webpage/images/mchp.gif deleted file mode 100644 index 39dc36d4afcfdd531525c5f564f50ab5a50544f4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1263 zcmb`C=}(gf0EgcmlyVeWw9sjtf@L*p;j*488v$@usy%v^Rz&X@p^VhN34EYCmmkND@K;Gv5Zo=O+4_T3@Bx{}(=1yye4slZILUF6IL+jz+h2p4VYOdoL_3VSTEs9MP zbEVW^CWsxvP$sHVu+@_BWdmAaXEq}hkKYr;o}t~QN%p8|y8C3LZfs93W$VOqIXEb1 z!Ljs(cit=Ih=iC(%k^Z-wQkw16-SiN2cRp^Y(zv zxs0K}YXcL_5fX9WEPi3YzK90S2!>0xcW`a8c!R3;3#=q=`67zH{W3Cc=!ChFZx7RW zr03W%{4NTOEmZ3^dRkvE`CcPCydS8r&YB;Q}LfXvRw9y zbnlzEi~fjN#L`{WeC|S--%K(PWxR^RCGBoW-(%>hC`uu9j%Hi?O(ddSm$muC+t^GZ zl4eXP2R|QspCrN`U;fC4P_~UL|K0#qB2nE)Et9qmTMW6kUjWo{gvber7;fqpmr`O9G z2C9x)y7$p_US^3QI3G^g&3Ow@)i8BLlYlmuI$Z$*`Z0MkI%|W;S(1tBi2C*fX~A#FJgc*+kqHJ^$~&7zmKM5V@0 zskZ)=N^kt}il<@aey}kwTK)MJ@e<-pyd+=K(6-qb**ouMPFspP-N@zier#`#fVboC z*g9m^5A@J)O;r?K`Xs35;u1|eLPx$I7zx_EE`Mg)#jND{=0uLdVnmVopc_6t9Da6M z@lD%ax|1J2WOh;0!HwS^%SN19QAC6~Q8I$0oTuGW$D(&QYS*8=Ip#rVyz*g|m-hQC zEw5X^*HMfsJvj3`?*b~?9FZ|6+qM%q+^Hz&eSNY2XMZvrKnJ|72+Jr&+)FqYV6EA; tlUdbNd!X9A(@V&D*Vf?qgn$YV<}Y?kW!P`5^uD{fvHH_T&tNRD_a9%N3i|*6 diff --git a/software/aws-iot-ethernet/firmware/src/configuration_webpage/index.htm b/software/aws-iot-ethernet/firmware/src/configuration_webpage/index.htm deleted file mode 100644 index 0e739b1..0000000 --- a/software/aws-iot-ethernet/firmware/src/configuration_webpage/index.htm +++ /dev/null @@ -1,32 +0,0 @@ -~inc:header.inc~ -
-
-
-
-

AWS IoT Endpoint Address:

-

AWS Certificate:

-

AWS Certificate Private Key:

-
-
-

- - - - - -

- - -
-
- -
-
- - - -
-
- -~inc:footer.inc~ diff --git a/software/aws-iot-ethernet/firmware/src/configuration_webpage/javascript/mchp.js b/software/aws-iot-ethernet/firmware/src/configuration_webpage/javascript/mchp.js deleted file mode 100644 index de17cb8..0000000 --- a/software/aws-iot-ethernet/firmware/src/configuration_webpage/javascript/mchp.js +++ /dev/null @@ -1,198 +0,0 @@ - -/********************************************************************* - * Microchip TCP/IP Stack Javascript Library - ********************************************************************** - * - * Software License Agreement - * - * Copyright © 2002-2010 Microchip Technology Inc. All rights - * reserved. - * - * Microchip licenses to you the right to use, modify, copy, and - * distribute: - * (i) the Software when embedded on a Microchip microcontroller or - * digital signal controller product (“Device”) which is - * integrated into Licensee’s product; or - * (ii) ONLY the Software driver source files ENC28J60.c and - * ENC28J60.h ported to a non-Microchip device used in - * conjunction with a Microchip ethernet controller for the - * sole purpose of interfacing with the ethernet controller. - * - * You should refer to the license agreement accompanying this - * Software for additional information regarding your rights and - * obligations. - * - * THE SOFTWARE AND DOCUMENTATION ARE PROVIDED “AS IS” WITHOUT - * WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT - * LIMITATION, ANY WARRANTY OF MERCHANTABILITY, FITNESS FOR A - * PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * MICROCHIP BE LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF - * PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY OR SERVICES, ANY CLAIMS - * BY THIRD PARTIES (INCLUDING BUT NOT LIMITED TO ANY DEFENSE - * THEREOF), ANY CLAIMS FOR INDEMNITY OR CONTRIBUTION, OR OTHER - * SIMILAR COSTS, WHETHER ASSERTED ON THE BASIS OF CONTRACT, TORT - * (INCLUDING NEGLIGENCE), BREACH OF WARRANTY, OR OTHERWISE. - * - * - * Author Date Comment - *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * Elliott Wood 12/5/07 Updated newAJAXCommand - ********************************************************************/ - -// Determines when a request is considered "timed out" -var timeOutMS = 5000; //ms - -// Stores a queue of AJAX events to process -var ajaxList = new Array(); - -/** - * stores the number of dots current being shown in the rescan button - */ -var scanDots = 0; - -/** - * current iteration of the bss info read from WiFi module. - */ -var currBss = 0; - -/** - * whether to destroy or build other networks table - */ -var otherNetworkExpanded = 1; - -// Initiates a new AJAX command -// url: the url to access -// container: the document ID to fill, or a function to call with response XML (optional) -// repeat: true to repeat this call indefinitely (optional) -// data: an URL encoded string to be submitted as POST data (optional) -function newAJAXCommand(url, container, repeat, data) -{ - // Set up our object - var newAjax = new Object(); - var theTimer = new Date(); - newAjax.url = url; - newAjax.container = container; - newAjax.repeat = repeat; - newAjax.ajaxReq = null; - - // Create and send the request - if(window.XMLHttpRequest) { - newAjax.ajaxReq = new XMLHttpRequest(); - newAjax.ajaxReq.open((data==null)?"GET":"POST", newAjax.url, true); - newAjax.ajaxReq.send(data); - // If we're using IE6 style (maybe 5.5 compatible too) - } else if(window.ActiveXObject) { - newAjax.ajaxReq = new ActiveXObject("Microsoft.XMLHTTP"); - if(newAjax.ajaxReq) { - newAjax.ajaxReq.open((data==null)?"GET":"POST", newAjax.url, true); - newAjax.ajaxReq.send(data); - } - } - - newAjax.lastCalled = theTimer.getTime(); - - // Store in our array - ajaxList.push(newAjax); -} - -// Loops over all pending AJAX events to determine if any action is required -function pollAJAX() { - var curAjax = new Object(); - var theTimer = new Date(); - var elapsed; - - // Read off the ajaxList objects one by one - for(i = ajaxList.length; i > 0; i--) - { - curAjax = ajaxList.shift(); - if(!curAjax) - continue; - elapsed = theTimer.getTime() - curAjax.lastCalled; - - // If we succeeded - if(curAjax.ajaxReq.readyState == 4 && curAjax.ajaxReq.status == 200) { - // If it has a container, write the result - if(typeof(curAjax.container) == 'function'){ - curAjax.container(curAjax.ajaxReq.responseXML.documentElement); - } else if(typeof(curAjax.container) == 'string') { - document.getElementById(curAjax.container).innerHTML = curAjax.ajaxReq.responseText; - } // (otherwise do nothing for null values) - - curAjax.ajaxReq.abort(); - curAjax.ajaxReq = null; - - // If it's a repeatable request, then do so - if(curAjax.repeat) - newAJAXCommand(curAjax.url, curAjax.container, curAjax.repeat); - continue; - } - - // If we've waited over 1 second, then we timed out - if(elapsed > timeOutMS) { - // Invoke the user function with null input - if(typeof(curAjax.container) == 'function'){ - curAjax.container(null); - } else { - // Alert the user - alert("Command failed.\nConnection to development board was lost."); - } - - curAjax.ajaxReq.abort(); - curAjax.ajaxReq = null; - - // If it's a repeatable request, then do so - if(curAjax.repeat) - newAJAXCommand(curAjax.url, curAjax.container, curAjax.repeat); - continue; - } - - // Otherwise, just keep waiting - ajaxList.push(curAjax); - } - - // Call ourselves again in 10ms - setTimeout("pollAJAX()",10); - -} - -function joinNetwork() { - // copy elements from hidden form and submit them through - // the normal form - - var remoteServer; - remoteServer = document.getElementById('remote_server1').value; - - var cert; - cert = document.getElementById('cert').value; - - var key; - key = document.getElementById('pkey').value; - - var ValidIpAddressRegex = new RegExp("^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$"); - var ValidHostnameRegex = new RegExp("^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$"); - - var ipOrDns; - if(ValidIpAddressRegex.test(remoteServer) == true) - { - ipOrDns = "validIp"; - } - else if(ValidHostnameRegex.test(remoteServer)== true) - { - ipOrDns = "validHostname"; - } - else - { - alert('Please enter a valid URL (e.g. https://123.123.123.123 or https://yourdomain.com.'); - return; - } - - document.getElementById("rs").value = remoteServer; - document.getElementById("cc").value = cert; - document.getElementById("ck").value = key; - - document.kickoff.submit(); -} - -//kick off the AJAX Updater -setTimeout("pollAJAX()", 10); diff --git a/software/aws-iot-ethernet/firmware/src/configuration_webpage/reconnect.htm b/software/aws-iot-ethernet/firmware/src/configuration_webpage/reconnect.htm deleted file mode 100644 index 9212911..0000000 --- a/software/aws-iot-ethernet/firmware/src/configuration_webpage/reconnect.htm +++ /dev/null @@ -1,16 +0,0 @@ -~inc:header.inc~ -
-
-

Connecting to server...

- -

The IoT Ethernet board is now connecting to your AWS IoT Endpoint

- -

This is the server you entered and your board's AWS Thing Name (MAC Address):

-
    -
  • AWS IoT Endpoint Address: ~remoteServer~
  • -
  • AWS Thing Name (MAC Address): ~uuid~
  • -
-
-
- -~inc:footer.inc~ diff --git a/software/aws-iot-ethernet/firmware/src/custom_http_app.c b/software/aws-iot-ethernet/firmware/src/custom_http_app.c deleted file mode 100644 index 621082c..0000000 --- a/software/aws-iot-ethernet/firmware/src/custom_http_app.c +++ /dev/null @@ -1,1879 +0,0 @@ -/******************************************************************************* - Application to Demo HTTP Server - - Summary: - Support for HTTP module in Microchip TCP/IP Stack - - Description: - -Implements the application - -Reference: RFC 1002 - *******************************************************************************/ - -/******************************************************************************* -File Name: custom_http_app.c -Copyright (C) 2012 released Microchip Technology Inc. All rights -reserved. - -Microchip licenses to you the right to use, modify, copy and distribute -Software only when embedded on a Microchip microcontroller or digital signal -controller that is integrated into your product or third party product -(pursuant to the sublicense terms in the accompanying license agreement). - -You should refer to the license agreement accompanying this Software for -additional information regarding your rights and obligations. - -SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, -EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF -MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. -IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER -CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR -OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES -INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR -CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF -SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES -(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS. - *******************************************************************************/ - -#define __CUSTOMHTTPAPP_C - -#include "system_config.h" - -#if defined(TCPIP_STACK_USE_HTTP_SERVER) - -#include "tcpip/tcpip.h" -#include "system/tmr/sys_tmr.h" -#include "system/random/sys_random.h" -#include "tcpip/src/common/helpers.h" -#include "crypto/crypto.h" - -/**************************************************************************** - Section: - Definitions - ****************************************************************************/ -// Use the web page in the Demo App (~2.5kb ROM, ~0b RAM) -#define HTTP_APP_USE_RECONFIG - -#ifndef NO_MD5 -// Use the MD5 Demo web page (~5kb ROM, ~160b RAM) -#define HTTP_APP_USE_MD5 -#endif - -// Use the e-mail demo web page -#if defined (TCPIP_STACK_USE_SMTP_CLIENT) -#define HTTP_APP_USE_EMAIL -#endif - -#define HTTP_APP_IPV4_ADDRESS_BUFFER_SIZE 20 - -/**************************************************************************** - Section: - Function Prototypes - ****************************************************************************/ -#if defined(TCPIP_HTTP_USE_POST) - #if defined(SYS_OUT_ENABLE) - static HTTP_IO_RESULT HTTPPostLCD(HTTP_CONN_HANDLE connHandle); - #endif - #if defined(HTTP_APP_USE_MD5) - static HTTP_IO_RESULT HTTPPostMD5(HTTP_CONN_HANDLE connHandle); - #endif - #if defined(HTTP_APP_USE_RECONFIG) - static HTTP_IO_RESULT HTTPPostConfig(HTTP_CONN_HANDLE connHandle); - #if defined(TCPIP_STACK_USE_SNMP_SERVER) - static HTTP_IO_RESULT HTTPPostSNMPCommunity(HTTP_CONN_HANDLE connHandle); - #endif - #endif - #if defined(HTTP_APP_USE_EMAIL) || defined(TCPIP_STACK_USE_SMTP_CLIENT) - static HTTP_IO_RESULT HTTPPostEmail(HTTP_CONN_HANDLE connHandle); - #endif - #if defined(TCPIP_STACK_USE_DYNAMICDNS_CLIENT) - static HTTP_IO_RESULT HTTPPostDDNSConfig(HTTP_CONN_HANDLE connHandle); - #endif -#endif - -/**************************************************************************** - Section: - Variables - ****************************************************************************/ -static uint8_t s_buf_ipv4addr[HTTP_APP_IPV4_ADDRESS_BUFFER_SIZE]; - -extern const char * const ddnsServiceHosts[]; -// RAM allocated for DDNS parameters -#if defined(TCPIP_STACK_USE_DYNAMICDNS_CLIENT) - static uint8_t DDNSData[100]; -#endif - -// Sticky status message variable. -// This is used to indicated whether or not the previous POST operation was -// successful. The application uses these to store status messages when a -// POST operation redirects. This lets the application provide status messages -// after a redirect, when connection instance data has already been lost. -static bool lastSuccess = false; - -// Stick status message variable. See lastSuccess for details. -static bool lastFailure = false; - -/**************************************************************************** - Section: - Authorization Handlers - ****************************************************************************/ - -/**************************************************************************** - Function: - uint8_t TCPIP_HTTP_FileAuthenticate(HTTP_CONN_HANDLE connHandle, uint8_t *cFile) - - Internal: - See documentation in the TCP/IP Stack API or HTTP.h for details. - ****************************************************************************/ -#if defined(TCPIP_HTTP_USE_AUTHENTICATION) -uint8_t TCPIP_HTTP_FileAuthenticate(HTTP_CONN_HANDLE connHandle, uint8_t *cFile) -{ - // If the filename begins with the folder "protect", then require auth. - if(memcmp(cFile, (const void *)"protect", 7) == 0) - return 0x00; // Authentication will be needed later. - - // If the filename begins with the folder "snmp", then require auth. - if(memcmp(cFile, (const void *)"snmp", 4) == 0) - return 0x00; // Authentication will be needed later. - - #if defined(HTTP_MPFS_UPLOAD_REQUIRES_AUTH) - if(memcmp(cFile, (const void *)"mpfsupload", 10) == 0) - return 0x00; - #endif - // You can match additional strings here to password protect other files. - // You could switch this and exclude files from authentication. - // You could also always return 0x00 to require auth for all files. - // You can return different values (0x00 to 0x79) to track "realms" for below. - - return 0x80; // No authentication required. -} -#endif - -/**************************************************************************** - Function: - uint8_t TCPIP_HTTP_UserAuthenticate(uint8_t *cUser, uint8_t *cPass) - - Internal: - See documentation in the TCP/IP Stack API or HTTP.h for details. - ****************************************************************************/ -#if defined(TCPIP_HTTP_USE_AUTHENTICATION) -uint8_t TCPIP_HTTP_UserAuthenticate(HTTP_CONN_HANDLE connHandle, uint8_t *cUser, uint8_t *cPass) -{ - if(strcmp((char *)cUser,(const char *)"admin") == 0 - && strcmp((char *)cPass, (const char *)"microchip") == 0) - return 0x80; // We accept this combination - - // You can add additional user/pass combos here. - // If you return specific "realm" values above, you can base this - // decision on what specific file or folder is being accessed. - // You could return different values (0x80 to 0xff) to indicate - // various users or groups, and base future processing decisions - // in TCPIP_HTTP_GetExecute/Post or HTTPPrint callbacks on this value. - - return 0x00; // Provided user/pass is invalid -} -#endif - -/**************************************************************************** - Section: - GET Form Handlers - ****************************************************************************/ - -/**************************************************************************** - Function: - HTTP_IO_RESULT TCPIP_HTTP_GetExecute(HTTP_CONN_HANDLE connHandle) - - Internal: - See documentation in the TCP/IP Stack API or http.h for details. - ****************************************************************************/ -HTTP_IO_RESULT TCPIP_HTTP_GetExecute(HTTP_CONN_HANDLE connHandle) -{ - const uint8_t *ptr; - uint8_t filename[20]; - uint8_t *httpDataBuff; - - // Load the file name. - // Make sure uint8_t filename[] above is large enough for your longest name. - SYS_FS_FileNameGet(TCPIP_HTTP_CurrentConnectionFileGet(connHandle), filename, 20); - - httpDataBuff = TCPIP_HTTP_CurrentConnectionDataBufferGet(connHandle); - - // If its the forms.htm page. - if(!memcmp(filename, "forms.htm", 9)) - { - // Seek out each of the four LED strings, and if it exists set the LED states. - ptr = TCPIP_HTTP_ArgGet(httpDataBuff, (const uint8_t *)"led2"); - if(ptr) - BSP_LEDStateSet(APP_TCPIP_LED_3, (*ptr == '1')); - //LED2_IO = (*ptr == '1'); - - ptr = TCPIP_HTTP_ArgGet(httpDataBuff, (const uint8_t *)"led1"); - if(ptr) - BSP_LEDStateSet(APP_TCPIP_LED_2, (*ptr == '1')); - //LED1_IO = (*ptr == '1'); - } - - else if(!memcmp(filename, "cookies.htm", 11)) - { - // This is very simple. The names and values we want are already in - // the data array. We just set the hasArgs value to indicate how many - // name/value pairs we want stored as cookies. - // To add the second cookie, just increment this value. - // remember to also add a dynamic variable callback to control the printout. - TCPIP_HTTP_CurrentConnectionHasArgsSet(connHandle, 0x01); - } - - // If it's the LED updater file. - else if(!memcmp(filename, "leds.cgi", 8)) - { - // Determine which LED to toggle. - ptr = TCPIP_HTTP_ArgGet(httpDataBuff, (const uint8_t *)"led"); - - // Toggle the specified LED. - switch(*ptr) { - case '0': - BSP_LEDToggle(APP_TCPIP_LED_1); - //LED0_IO ^= 1; - break; - case '1': - BSP_LEDToggle(APP_TCPIP_LED_2); - //LED1_IO ^= 1; - break; - case '2': - BSP_LEDToggle(APP_TCPIP_LED_3); - //LED2_IO ^= 1; - break; - } - } - - return HTTP_IO_DONE; -} - -/**************************************************************************** - Section: - POST Form Handlers - ****************************************************************************/ -#if defined(TCPIP_HTTP_USE_POST) - -/**************************************************************************** - Function: - HTTP_IO_RESULT TCPIP_HTTP_PostExecute(HTTP_CONN_HANDLE connHandle) - - Internal: - See documentation in the TCP/IP Stack API or HTTP.h for details. - ****************************************************************************/ -HTTP_IO_RESULT TCPIP_HTTP_PostExecute(HTTP_CONN_HANDLE connHandle) -{ - // Resolve which function to use and pass along - uint8_t filename[20]; - - // Load the file name - // Make sure uint8_t filename[] above is large enough for your longest name - SYS_FS_FileNameGet(TCPIP_HTTP_CurrentConnectionFileGet(connHandle), filename, sizeof(filename)); - -#if defined(SYS_OUT_ENABLE) - if(!memcmp(filename, "forms.htm", 9)) - return HTTPPostLCD(connHandle); -#endif - -#if defined(HTTP_APP_USE_MD5) - if(!memcmp(filename, "upload.htm", 10)) - return HTTPPostMD5(connHandle); -#endif - -#if defined(HTTP_APP_USE_RECONFIG) - if(!memcmp(filename, "protect/config.htm", 18)) - return HTTPPostConfig(connHandle); - #if defined(TCPIP_STACK_USE_SNMP_SERVER) - else if(!memcmp(filename, "snmp/snmpconfig.htm", 19)) - return HTTPPostSNMPCommunity(connHandle); - #endif -#endif - -#if defined(TCPIP_STACK_USE_SMTP_CLIENT) - if(!strcmp((char *)filename, "email/index.htm")) - return HTTPPostEmail(connHandle); -#endif - -#if defined(TCPIP_STACK_USE_DYNAMICDNS_CLIENT) - if(!strcmp((char *)filename, "dyndns/index.htm")) - return HTTPPostDDNSConfig(connHandle); -#endif - - return HTTP_IO_DONE; -} - -/**************************************************************************** - Function: - static HTTP_IO_RESULT HTTPPostLCD(HTTP_CONN_HANDLE connHandle) - - Summary: - Processes the LCD form on forms.htm - - Description: - Locates the 'lcd' parameter and uses it to update the text displayed - on the board's LCD display. - - This function has four states. The first reads a name from the data - string returned as part of the POST request. If a name cannot - be found, it returns, asking for more data. Otherwise, if the name - is expected, it reads the associated value and writes it to the LCD. - If the name is not expected, the value is discarded and the next name - parameter is read. - - In the case where the expected string is never found, this function - will eventually return HTTP_IO_NEED_DATA when no data is left. In that - case, the HTTP server will automatically trap the error and issue an - Internal Server Error to the browser. - - Precondition: - None - - Parameters: - connHandle - HTTP connection handle - - Return Values: - HTTP_IO_DONE - the parameter has been found and saved - HTTP_IO_WAITING - the function is pausing to continue later - HTTP_IO_NEED_DATA - data needed by this function has not yet arrived - ****************************************************************************/ -#if defined(SYS_OUT_ENABLE) -static HTTP_IO_RESULT HTTPPostLCD(HTTP_CONN_HANDLE connHandle) -{ - uint8_t *cDest; - uint8_t *httpDataBuff; - - #define SM_POST_LCD_READ_NAME (0u) - #define SM_POST_LCD_READ_VALUE (1u) - - httpDataBuff = TCPIP_HTTP_CurrentConnectionDataBufferGet(connHandle); - switch(TCPIP_HTTP_CurrentConnectionPostSmGet(connHandle)) - { - // Find the name - case SM_POST_LCD_READ_NAME: - - // Read a name - if(TCPIP_HTTP_PostNameRead(connHandle, httpDataBuff, TCPIP_HTTP_MAX_DATA_LEN) == HTTP_READ_INCOMPLETE) - return HTTP_IO_NEED_DATA; - - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, SM_POST_LCD_READ_VALUE); - // No break...continue reading value - - // Found the value, so store the LCD and return - case SM_POST_LCD_READ_VALUE: - - // If value is expected, read it to data buffer, - // otherwise ignore it (by reading to NULL) - if(!strcmp((char *)httpDataBuff, (const char *)"lcd")) - cDest = httpDataBuff; - else - cDest = NULL; - - // Read a value string - if(TCPIP_HTTP_PostValueRead(connHandle, cDest, TCPIP_HTTP_MAX_DATA_LEN) == HTTP_READ_INCOMPLETE) - return HTTP_IO_NEED_DATA; - - // If this was an unexpected value, look for a new name - if(!cDest) - { - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, SM_POST_LCD_READ_NAME); - break; - } - - SYS_OUT_MESSAGE((char *)cDest); - - // This is the only expected value, so callback is done - strcpy((char *)httpDataBuff, "/forms.htm"); - TCPIP_HTTP_CurrentConnectionStatusSet(connHandle, HTTP_REDIRECT); - return HTTP_IO_DONE; - } - - // Default assumes that we're returning for state machine convenience. - // Function will be called again later. - return HTTP_IO_WAITING; -} -#endif - -/******************************************************************************* - Function: - static HTTP_IO_RESULT HTTPPostConfig(HTTP_CONN_HANDLE connHandle) - - Summary: - Processes the configuration form on config/index.htm. - - Description: - Accepts configuration parameters from the form, saves them to a - temporary location in RAM, then eventually saves the data to EEPROM or - external Flash. - - When complete, this function redirects to config/reboot.htm, which will - display information on reconnecting to the board. - - This function creates a shadow copy of a network info structure in - RAM and then overwrites incoming data there as it arrives. For each - name/value pair, the name is first read to cur connection data[0:5]. Next, the - value is read to newNetConfig. Once all data has been read, the new - network info structure is saved back to storage and the browser is redirected to - reboot.htm. That file includes an AJAX call to reboot.cgi, which - performs the actual reboot of the machine. - - If an IP address cannot be parsed, too much data is POSTed, or any other - parsing error occurs, the browser reloads config.htm and displays an error - message at the top. - - Precondition: - None. - - Parameters: - connHandle - HTTP connection handle - - Return Values: - HTTP_IO_DONE - all parameters have been processed - HTTP_IO_NEED_DATA - data needed by this function has not yet arrived - *******************************************************************************/ -#if defined(HTTP_APP_USE_RECONFIG) -// network configuration/information storage space -static struct -{ - TCPIP_NET_HANDLE currNet; // current working interface + valid flag - char ifName[10 + 1]; // interface name - char nbnsName[16 + 1]; // host name - char ifMacAddr[17 + 1]; // MAC address - char ipAddr[15 +1]; // IP address - char ipMask[15 + 1]; // mask - char gwIP[15 + 1]; // gateway IP address - char dns1IP[15 + 1]; // DNS IP address - char dns2IP[15 + 1]; // DNS IP address - - TCPIP_NETWORK_CONFIG netConfig; // configuration in the interface requested format -}httpNetData; - -static HTTP_IO_RESULT HTTPPostConfig(HTTP_CONN_HANDLE connHandle) -{ - uint8_t i; - IPV4_ADDR newIPAddress, newMask; - TCPIP_MAC_ADDR newMACAddr; - uint32_t byteCount; - TCP_SOCKET sktHTTP; - uint8_t *httpDataBuff = 0; - bool bConfigFailure = false; - - httpNetData.currNet = 0; // forget the old settings - - // Check to see if the browser is attempting to submit more data than we - // can parse at once. This function needs to receive all updated - // parameters and validate them all before committing them to memory so that - // orphaned configuration parameters do not get written (for example, if a - // static IP address is given, but the subnet mask fails parsing, we - // should not use the static IP address). Everything needs to be processed - // in a single transaction. If this is impossible, fail and notify the user. - // As a web devloper, if you add parameters to the network info and run into this - // problem, you could fix this by to splitting your update web page into two - // seperate web pages (causing two transactional writes). Alternatively, - // you could fix it by storing a static shadow copy of network info someplace - // in memory and using it when info is complete. - // Lastly, you could increase the TCP RX FIFO size for the HTTP server. - // This will allow more data to be POSTed by the web browser before hitting this limit. - byteCount = TCPIP_HTTP_CurrentConnectionByteCountGet(connHandle); - sktHTTP = TCPIP_HTTP_CurrentConnectionSocketGet(connHandle); - if(byteCount > TCPIP_TCP_GetIsReady(sktHTTP) + TCPIP_TCP_FifoRxFreeGet(sktHTTP)) - { // Configuration Failure - lastFailure = true; - TCPIP_HTTP_CurrentConnectionStatusSet(connHandle, HTTP_REDIRECT); - return HTTP_IO_DONE; - } - - // Ensure that all data is waiting to be parsed. If not, keep waiting for - // all of it to arrive. - if(TCPIP_TCP_GetIsReady(sktHTTP) < byteCount) - return HTTP_IO_NEED_DATA; - - // Use current config in non-volatile memory as defaults - httpDataBuff = TCPIP_HTTP_CurrentConnectionDataBufferGet(connHandle); - - // Read all browser POST data - while(TCPIP_HTTP_CurrentConnectionByteCountGet(connHandle)) - { - // Read a form field name - if(TCPIP_HTTP_PostNameRead(connHandle, httpDataBuff, 6) != HTTP_READ_OK) - { - bConfigFailure = true; - break; - } - - // Read a form field value - if(TCPIP_HTTP_PostValueRead(connHandle, httpDataBuff + 6, TCPIP_HTTP_MAX_DATA_LEN-6-2) != HTTP_READ_OK) - { - bConfigFailure = true; - break; - } - - // Parse the value that was read - if(!strcmp((char *)httpDataBuff, (const char *)"ip")) - { // Save new static IP Address - if(!TCPIP_Helper_StringToIPAddress((char *)(httpDataBuff+6), &newIPAddress)) - { - bConfigFailure = true; - break; - } - strncpy(httpNetData.ipAddr, (char *)httpDataBuff + 6, sizeof(httpNetData.ipAddr)); - } - else if(!strcmp((char *)httpDataBuff, (const char *)"gw")) - { // Read new gateway address - if(!TCPIP_Helper_StringToIPAddress((char *)(httpDataBuff+6), &newIPAddress)) - { - bConfigFailure = true; - break; - } - strncpy(httpNetData.gwIP, (char *)httpDataBuff + 6, sizeof(httpNetData.gwIP)); - } - else if(!strcmp((char *)httpDataBuff, (const char *)"sub")) - { // Read new static subnet - if(!TCPIP_Helper_StringToIPAddress((char *)(httpDataBuff+6), &newMask)) - { - bConfigFailure = true; - break; - } - strncpy(httpNetData.ipMask, (char *)httpDataBuff + 6, sizeof(httpNetData.ipMask)); - } - else if(!strcmp((char *)httpDataBuff, (const char *)"dns1")) - { // Read new primary DNS server - if(!TCPIP_Helper_StringToIPAddress((char *)(httpDataBuff+6), &newIPAddress)) - { - bConfigFailure = true; - break; - } - strncpy(httpNetData.dns1IP, (char *)httpDataBuff + 6, sizeof(httpNetData.dns1IP)); - } - else if(!strcmp((char *)httpDataBuff, (const char *)"dns2")) - { // Read new secondary DNS server - if(!TCPIP_Helper_StringToIPAddress((char *)(httpDataBuff+6), &newIPAddress)) - { - bConfigFailure = true; - break; - } - strncpy(httpNetData.dns2IP, (char *)httpDataBuff + 6, sizeof(httpNetData.dns2IP)); - } - else if(!strcmp((char *)httpDataBuff, (const char *)"mac")) - { // read the new MAC address - if(!TCPIP_Helper_StringToMACAddress((char *)(httpDataBuff+6), newMACAddr.v)) - { - bConfigFailure = true; - break; - } - strncpy(httpNetData.ifMacAddr, (char *)httpDataBuff + 6, sizeof(httpNetData.ifMacAddr)); - } - else if(!strcmp((char *)httpDataBuff, (const char *)"host")) - { // Read new hostname - strncpy(httpNetData.nbnsName, (char *)httpDataBuff + 6, sizeof(httpNetData.nbnsName)); - } - else if(!strcmp((char *)httpDataBuff, (const char *)"dhcp")) - { // Read new DHCP Enabled flag - httpNetData.netConfig.startFlags = httpDataBuff[6] == '1' ? TCPIP_NETWORK_CONFIG_DHCP_CLIENT_ON : 0; - } - } - - if(bConfigFailure == false) - { - // All parsing complete! Save new settings and force an interface restart - // Set the interface to restart and display reconnecting information - strcpy((char *)httpDataBuff, "/protect/reboot.htm?"); - TCPIP_Helper_FormatNetBIOSName((uint8_t *)httpNetData.nbnsName); - memcpy((void *)(httpDataBuff+20), httpNetData.nbnsName, 16); - httpDataBuff[20+16] = 0x00; // Force null termination - for(i = 20; i < 20u+16u; i++) - { - if(httpDataBuff[i] == ' ') - httpDataBuff[i] = 0x00; - } - httpNetData.currNet = TCPIP_TCP_SocketNetGet(sktHTTP); // save current interface and mark as valid - strncpy(httpNetData.ifName, TCPIP_STACK_NetNameGet(httpNetData.currNet), sizeof(httpNetData.ifName)); - } - else - { // Configuration error - - lastFailure = true; - if(httpDataBuff) - { - strcpy((char *)httpDataBuff, "/protect/config.htm"); - } - } - - TCPIP_HTTP_CurrentConnectionStatusSet(connHandle, HTTP_REDIRECT); - - return HTTP_IO_DONE; -} - -#if defined(TCPIP_STACK_USE_SNMP_SERVER) -static HTTP_IO_RESULT HTTPPostSNMPCommunity(HTTP_CONN_HANDLE connHandle) -{ - uint8_t vCommunityIndex; - uint8_t *httpDataBuff; - uint8_t len = 0; - - #define SM_CFG_SNMP_READ_NAME (0u) - #define SM_CFG_SNMP_READ_VALUE (1u) - - httpDataBuff = TCPIP_HTTP_CurrentConnectionDataBufferGet(connHandle); - switch(TCPIP_HTTP_CurrentConnectionPostSmGet(connHandle)) - { - case SM_CFG_SNMP_READ_NAME: - // If all parameters have been read, end - if(TCPIP_HTTP_CurrentConnectionByteCountGet(connHandle) == 0u) - { - return HTTP_IO_DONE; - } - - // Read a name - if(TCPIP_HTTP_PostNameRead(connHandle, httpDataBuff, TCPIP_HTTP_MAX_DATA_LEN) == HTTP_READ_INCOMPLETE) - return HTTP_IO_NEED_DATA; - - // Move to reading a value, but no break - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, SM_CFG_SNMP_READ_VALUE); - - case SM_CFG_SNMP_READ_VALUE: - // Read a value - if(TCPIP_HTTP_PostValueRead(connHandle, httpDataBuff + 6, TCPIP_HTTP_MAX_DATA_LEN) == HTTP_READ_INCOMPLETE) - return HTTP_IO_NEED_DATA; - - // Default action after this is to read the next name, unless there's an error - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, SM_CFG_SNMP_READ_NAME); - - // See if this is a known parameter and legal (must be null - // terminator in 4th field name byte, string must no greater than - // TCPIP_SNMP_COMMUNITY_MAX_LEN bytes long, and TCPIP_SNMP_MAX_COMMUNITY_SUPPORT - // must not be violated. - vCommunityIndex = httpDataBuff[3] - '0'; - if(vCommunityIndex >= TCPIP_SNMP_MAX_COMMUNITY_SUPPORT) - break; - if(httpDataBuff[4] != 0x00u) - break; - len = strlen((char *)httpDataBuff + 6); - if(len > TCPIP_SNMP_COMMUNITY_MAX_LEN) - { - break; - } - if(memcmp((void *)httpDataBuff, (const void *)"rcm", 3) == 0) - { - if(TCPIP_SNMP_ReadCommunitySet(vCommunityIndex,len,httpDataBuff+6)!=true) - break; - } - else if(memcmp((void *)httpDataBuff, (const void *)"wcm", 3) == 0) - { - if(TCPIP_SNMP_WriteCommunitySet(vCommunityIndex,len,httpDataBuff+6) != true) - break; - } - else - { - break; - } - - break; - } - - return HTTP_IO_WAITING; // Assume we're waiting to process more data -} -#endif // #if defined(TCPIP_STACK_USE_SNMP_SERVER) - -#endif // #if defined(HTTP_APP_USE_RECONFIG) - -/**************************************************************************** - Function: - static HTTP_IO_RESULT HTTPPostMD5(HTTP_CONN_HANDLE connHandle) - - Summary: - Processes the file upload form on upload.htm - - Description: - This function demonstrates the processing of file uploads. First, the - function locates the file data, skipping over any headers that arrive. - Second, it reads the file 64 bytes at a time and hashes that data. Once - all data has been received, the function calculates the MD5 sum and - stores it in current connection data buffer. - - After the headers, the first line from the form will be the MIME - separator. Following that is more headers about the file, which we - discard. After another CRLFCRLF, the file data begins, and we read - it 16 bytes at a time and add that to the MD5 calculation. The reading - terminates when the separator string is encountered again on its own - line. Notice that the actual file data is trashed in this process, - allowing us to accept files of arbitrary size, not limited by RAM. - Also notice that the data buffer is used as an arbitrary storage array - for the result. The ~uploadedmd5~ callback reads this data later to - send back to the client. - - Precondition: - None - - Parameters: - connHandle - HTTP connection handle - - Return Values: - HTTP_IO_DONE - all parameters have been processed - HTTP_IO_WAITING - the function is pausing to continue later - HTTP_IO_NEED_DATA - data needed by this function has not yet arrived - ****************************************************************************/ -#if defined(HTTP_APP_USE_MD5) -static HTTP_IO_RESULT HTTPPostMD5(HTTP_CONN_HANDLE connHandle) -{ - uint32_t lenA, lenB; - static CRYPT_MD5_CTX md5; - - TCP_SOCKET sktHTTP; - uint8_t *httpDataBuff; - - #define SM_MD5_READ_SEPARATOR (0u) - #define SM_MD5_SKIP_TO_DATA (1u) - #define SM_MD5_READ_DATA (2u) - #define SM_MD5_POST_COMPLETE (3u) - - sktHTTP = TCPIP_HTTP_CurrentConnectionSocketGet(connHandle); - switch(TCPIP_HTTP_CurrentConnectionPostSmGet(connHandle)) - { - // Just started, so try to find the separator string - case SM_MD5_READ_SEPARATOR: - // Reset the MD5 calculation - CRYPT_MD5_Initialize(&md5); - - // See if a CRLF is in the buffer - lenA = TCPIP_TCP_ArrayFind(sktHTTP, (const uint8_t *)"\r\n", 2, 0, 0, false); - if(lenA == 0xffff) - { //if not, ask for more data - return HTTP_IO_NEED_DATA; - } - - // If so, figure out where the last byte of data is - // Data ends at CRLFseparator--CRLF, so 6+len bytes - TCPIP_HTTP_CurrentConnectionByteCountDec(connHandle, lenA + 6); - - // Read past the CRLF - TCPIP_HTTP_CurrentConnectionByteCountDec(connHandle, TCPIP_TCP_ArrayGet(sktHTTP, NULL, lenA+2)); - - // Save the next state (skip to CRLFCRLF) - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, SM_MD5_SKIP_TO_DATA); - - // No break...continue reading the headers if possible - - // Skip the headers - case SM_MD5_SKIP_TO_DATA: - // Look for the CRLFCRLF - lenA = TCPIP_TCP_ArrayFind(sktHTTP, (const uint8_t *)"\r\n\r\n", 4, 0, 0, false); - - if(lenA != 0xffff) - { // Found it, so remove all data up to and including - lenA = TCPIP_TCP_ArrayGet(sktHTTP, NULL, lenA+4); - TCPIP_HTTP_CurrentConnectionByteCountDec(connHandle, lenA); - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, SM_MD5_READ_DATA); - } - else - { // Otherwise, remove as much as possible - lenA = TCPIP_TCP_ArrayGet(sktHTTP, NULL, TCPIP_TCP_GetIsReady(sktHTTP) - 4); - TCPIP_HTTP_CurrentConnectionByteCountDec(connHandle, lenA); - - // Return the need more data flag - return HTTP_IO_NEED_DATA; - } - - // No break if we found the header terminator - - // Read and hash file data - case SM_MD5_READ_DATA: - // Find out how many bytes are available to be read - httpDataBuff = TCPIP_HTTP_CurrentConnectionDataBufferGet(connHandle); - lenA = TCPIP_TCP_GetIsReady(sktHTTP); - lenB = TCPIP_HTTP_CurrentConnectionByteCountGet(connHandle); - if(lenA > lenB) - lenA = lenB; - - while(lenA > 0u) - { // Add up to 64 bytes at a time to the sum - lenB = TCPIP_TCP_ArrayGet(sktHTTP, httpDataBuff, (lenA < 64u)?lenA:64); - TCPIP_HTTP_CurrentConnectionByteCountDec(connHandle, lenB); - lenA -= lenB; - CRYPT_MD5_DataAdd(&md5,httpDataBuff, lenB); - } - - // If we've read all the data - if(TCPIP_HTTP_CurrentConnectionByteCountGet(connHandle) == 0u) - {// Calculate and copy result data buffer for printout - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, SM_MD5_POST_COMPLETE); - CRYPT_MD5_Finalize(&md5, httpDataBuff); - return HTTP_IO_DONE; - } - - // Ask for more data - return HTTP_IO_NEED_DATA; - } - - return HTTP_IO_DONE; -} -#endif // #if defined(HTTP_APP_USE_MD5) - -/**************************************************************************** - Function: - static HTTP_IO_RESULT HTTPPostEmail(void) - - Summary: - Processes the e-mail form on email/index.htm - - Description: - This function sends an e-mail message using the SMTP client and - optionally encrypts the connection to the SMTP server. It - demonstrates the use of the SMTP client, waiting for asynchronous - processes in an HTTP callback, and how to send e-mail attachments using - the stack. - - Messages with attachments are sent using multipart/mixed MIME encoding, - which has three sections. The first has no headers, and is only to be - displayed by old clients that cannot interpret the MIME format. (The - overwhelming majority of these clients have been obseleted, but the - so-called "ignored" section is still used.) The second has a few - headers to indicate that it is the main body of the message in plain- - text encoding. The third section has headers indicating an attached - file, along with its name and type. All sections are separated by a - boundary string, which cannot appear anywhere else in the message. - - Precondition: - None - - Parameters: - connHandle - HTTP connection handle - - Return Values: - HTTP_IO_DONE - the message has been sent - HTTP_IO_WAITING - the function is waiting for the SMTP process to complete - HTTP_IO_NEED_DATA - data needed by this function has not yet arrived - ****************************************************************************/ -#if defined(TCPIP_STACK_USE_SMTP_CLIENT) -static HTTP_IO_RESULT HTTPPostEmail(HTTP_CONN_HANDLE connHandle) -{ - static uint8_t *ptrData; - static uint8_t *szPort; - static TCPIP_SMTP_CLIENT_MESSAGE mySMTPClient; - uint16_t len, rem; - uint8_t cName[8]; - uint8_t *httpDataBuff; - TCP_SOCKET sktHTTP; - - #define SM_EMAIL_CLAIM_MODULE (0u) - #define SM_EMAIL_READ_PARAM_NAME (1u) - #define SM_EMAIL_READ_PARAM_VALUE (2u) - #define SM_EMAIL_PUT_IGNORED (3u) - #define SM_EMAIL_PUT_BODY (4u) - #define SM_EMAIL_PUT_ATTACHMENT_HEADER (5u) - #define SM_EMAIL_PUT_ATTACHMENT_DATA_BTNS (6u) - #define SM_EMAIL_PUT_ATTACHMENT_DATA_LEDS (7u) - #define SM_EMAIL_PUT_ATTACHMENT_DATA_POT (8u) - #define SM_EMAIL_PUT_TERMINATOR (9u) - #define SM_EMAIL_FINISHING (10u) - - httpDataBuff = TCPIP_HTTP_CurrentConnectionDataBufferGet(connHandle); - sktHTTP = TCPIP_HTTP_CurrentConnectionSocketGet(connHandle); - switch(TCPIP_HTTP_CurrentConnectionPostSmGet(connHandle)) - { - case SM_EMAIL_CLAIM_MODULE: - // Try to claim module - if(TCPIP_SMTP_UsageBegin()) - { // Module was claimed, so set up static parameters - memset(&mySMTPClient, 0, sizeof(mySMTPClient)); - mySMTPClient.Subject = "Microchip TCP/IP Stack Status Update"; - mySMTPClient.From = "\"SMTP Service\" "; - - // The following two lines indicate to the receiving client that - // this message has an attachment. The boundary field *must not* - // be included anywhere in the content of the message. In real - // applications it is typically a long random string. - mySMTPClient.OtherHeaders = "MIME-version: 1.0\r\nContent-type: multipart/mixed; boundary=\"frontier\"\r\n"; - - // Move our state machine forward - ptrData = httpDataBuff; - szPort = NULL; - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, SM_EMAIL_READ_PARAM_NAME); - } - return HTTP_IO_WAITING; - - case SM_EMAIL_READ_PARAM_NAME: - // Search for a parameter name in POST data - if(TCPIP_HTTP_PostNameRead(connHandle, cName, sizeof(cName)) == HTTP_READ_INCOMPLETE) - return HTTP_IO_NEED_DATA; - - // Try to match the name value - if(!strcmp((char *)cName, (const char *)"server")) - { // Read the server name - mySMTPClient.Server = (char *)ptrData; - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, SM_EMAIL_READ_PARAM_VALUE); - } - else if(!strcmp((char *)cName, (const char *)"port")) - { // Read the server port - szPort = ptrData; - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, SM_EMAIL_READ_PARAM_VALUE); - } - else if(!strcmp((char *)cName, (const char *)"user")) - { // Read the user name - mySMTPClient.Username = (char *)ptrData; - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, SM_EMAIL_READ_PARAM_VALUE); - } - else if(!strcmp((char *)cName, (const char *)"pass")) - { // Read the password - mySMTPClient.Password = (char *)ptrData; - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, SM_EMAIL_READ_PARAM_VALUE); - } - else if(!strcmp((char *)cName, (const char *)"to")) - { // Read the To string - mySMTPClient.To = (char *)ptrData; - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, SM_EMAIL_READ_PARAM_VALUE); - } - else if(!strcmp((char *)cName, (const char *)"msg")) - { // Done with headers, move on to the message - // Delete paramters that are just null strings (no data from user) or illegal (ex: password without username) - if(mySMTPClient.Server ) - if(*mySMTPClient.Server == 0x00u) - mySMTPClient.Server = NULL; - if(mySMTPClient.Username ) - if(*mySMTPClient.Username == 0x00u) - mySMTPClient.Username = NULL; - if(mySMTPClient.Password) - if((*mySMTPClient.Password == 0x00u) || (mySMTPClient.Username == NULL)) - mySMTPClient.Password = NULL; - - // Decode server port string if it exists - if(szPort) - if(*szPort) - mySMTPClient.ServerPort = (uint16_t)atol((char *)szPort); - - // Start sending the message - TCPIP_SMTP_MailSend(&mySMTPClient); - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, SM_EMAIL_PUT_IGNORED); - return HTTP_IO_WAITING; - } - else - { // Don't know what we're receiving - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, SM_EMAIL_READ_PARAM_VALUE); - } - - // No break...continue to try reading the value - - case SM_EMAIL_READ_PARAM_VALUE: - // Search for a parameter value in POST data - rem = TCPIP_HTTP_MAX_DATA_LEN - (ptrData - httpDataBuff); - if(TCPIP_HTTP_PostValueRead(connHandle, ptrData, rem) == HTTP_READ_INCOMPLETE) - return HTTP_IO_NEED_DATA; - - // Move past the data that was just read - ptrData += strlen((char *)ptrData); - if(ptrData < httpDataBuff + TCPIP_HTTP_MAX_DATA_LEN - 1) - ptrData += 1; - - // Try reading the next parameter - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, SM_EMAIL_READ_PARAM_NAME); - return HTTP_IO_WAITING; - - case SM_EMAIL_PUT_IGNORED: - // This section puts a message that is ignored by compatible clients. - // This text will not display unless the receiving client is obselete - // and does not understand the MIME structure. - // The "--frontier" indicates the start of a section, then any - // needed MIME headers follow, then two CRLF pairs, and then - // the actual content (which will be the body text in the next state). - - // Check to see if a failure occured - if(!TCPIP_SMTP_IsBusy()) - { - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, SM_EMAIL_FINISHING); - return HTTP_IO_WAITING; - } - - // See if we're ready to write data - if(TCPIP_SMTP_IsPutReady() < 90u) - return HTTP_IO_WAITING; - - // Write the ignored text - TCPIP_SMTP_StringPut("This is a multi-part message in MIME format.\r\n"); - TCPIP_SMTP_StringPut("--frontier\r\nContent-type: text/plain\r\n\r\n"); - TCPIP_SMTP_Flush(); - - // Move to the next state - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, SM_EMAIL_PUT_BODY); - - case SM_EMAIL_PUT_BODY: - // Write as much body text as is available from the TCP buffer - // return HTTP_IO_NEED_DATA or HTTP_IO_WAITING - // On completion, => PUT_ATTACHMENT_HEADER and continue - - // Check to see if a failure occurred - if(!TCPIP_SMTP_IsBusy()) - { - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, SM_EMAIL_FINISHING); - return HTTP_IO_WAITING; - } - - // Loop as long as data remains to be read - while(TCPIP_HTTP_CurrentConnectionByteCountGet(connHandle)) - { - // See if space is available to write - len = TCPIP_SMTP_IsPutReady(); - if(len == 0u) - return HTTP_IO_WAITING; - - // See if data is ready to be read - rem = TCPIP_TCP_GetIsReady(sktHTTP); - if(rem == 0u) - return HTTP_IO_NEED_DATA; - - // Only write as much as we can handle - if(len > rem) - len = rem; - if(len > TCPIP_HTTP_MAX_DATA_LEN - 2) - len = TCPIP_HTTP_MAX_DATA_LEN - 2; - - // Read the data from HTTP POST buffer and send it to SMTP - TCPIP_HTTP_CurrentConnectionByteCountDec(connHandle, TCPIP_TCP_ArrayGet(sktHTTP, httpDataBuff, len)); - httpDataBuff[len] = '\0'; - TCPIP_HTTP_URLDecode(httpDataBuff); - TCPIP_SMTP_StringPut((char *)httpDataBuff); - TCPIP_SMTP_Flush(); - } - - // We're done with the POST data, so continue - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, SM_EMAIL_PUT_ATTACHMENT_HEADER); - - case SM_EMAIL_PUT_ATTACHMENT_HEADER: - // This section writes the attachment to the message. - // This portion generally will not display in the reader, but - // will be downloadable to the local machine. Use caution - // when selecting the content-type and file name, as certain - // types and extensions are blocked by virus filters. - - // The same structure as the message body is used. - // Any attachment must not include high-bit ASCII characters or - // binary data. If binary data is to be sent, the data should - // be encoded using Base64 and a MIME header should be added: - // Content-transfer-encoding: base64 - - // Check to see if a failure occurred - if(!TCPIP_SMTP_IsBusy()) - { - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, SM_EMAIL_FINISHING); - return HTTP_IO_WAITING; - } - - // See if we're ready to write data - if(TCPIP_SMTP_IsPutReady() < 100u) - return HTTP_IO_WAITING; - - // Write the attachment header - TCPIP_SMTP_StringPut("\r\n--frontier\r\nContent-type: text/csv\r\nContent-Disposition: attachment; filename=\"status.csv\"\r\n\r\n"); - TCPIP_SMTP_Flush(); - - // Move to the next state - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, SM_EMAIL_PUT_ATTACHMENT_DATA_BTNS); - - case SM_EMAIL_PUT_ATTACHMENT_DATA_BTNS: - // The following states output the system status as a CSV file. - - // Check to see if a failure occurred - if(!TCPIP_SMTP_IsBusy()) - { - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, SM_EMAIL_FINISHING); - return HTTP_IO_WAITING; - } - - // See if we're ready to write data - if(TCPIP_SMTP_IsPutReady() < 36u) - return HTTP_IO_WAITING; - - // Write the header and button strings - TCPIP_SMTP_StringPut("SYSTEM STATUS\r\n"); - TCPIP_SMTP_StringPut("Buttons:,"); - TCPIP_SMTP_Put(BSP_SwitchStateGet(APP_TCPIP_SWITCH_1) + '0'); - TCPIP_SMTP_Put(','); - TCPIP_SMTP_Put(BSP_SwitchStateGet(APP_TCPIP_SWITCH_2) + '0'); - TCPIP_SMTP_Put(','); - TCPIP_SMTP_Put(BSP_SwitchStateGet(APP_TCPIP_SWITCH_3) + '0'); - TCPIP_SMTP_Put('\r'); - TCPIP_SMTP_Put('\n'); - TCPIP_SMTP_Flush(); - - // Move to the next state - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, SM_EMAIL_PUT_ATTACHMENT_DATA_LEDS); - - case SM_EMAIL_PUT_ATTACHMENT_DATA_LEDS: - // Check to see if a failure occurred - if(!TCPIP_SMTP_IsBusy()) - { - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, SM_EMAIL_FINISHING); - return HTTP_IO_WAITING; - } - - // See if we're ready to write data - if(TCPIP_SMTP_IsPutReady() < 30u) - return HTTP_IO_WAITING; - - // Write the header and button strings - TCPIP_SMTP_StringPut("LEDs:,"); - TCPIP_SMTP_Put(BSP_LEDStateGet(APP_TCPIP_LED_1) + '0'); - TCPIP_SMTP_Put(','); - TCPIP_SMTP_Put(BSP_LEDStateGet(APP_TCPIP_LED_2) + '0'); - TCPIP_SMTP_Put(','); - TCPIP_SMTP_Put(BSP_LEDStateGet(APP_TCPIP_LED_3) + '0'); - TCPIP_SMTP_Put('\r'); - TCPIP_SMTP_Put('\n'); - TCPIP_SMTP_Flush(); - - // Move to the next state - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, SM_EMAIL_PUT_ATTACHMENT_DATA_POT); - - case SM_EMAIL_PUT_ATTACHMENT_DATA_POT: - // Check to see if a failure occurred - if(!TCPIP_SMTP_IsBusy()) - { - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, SM_EMAIL_FINISHING); - return HTTP_IO_WAITING; - } - - // See if we're ready to write data - if(TCPIP_SMTP_IsPutReady() < 16u) - return HTTP_IO_WAITING; - - // Display Random Number - len = (uint16_t)SYS_RANDOM_PseudoGet(); - - uitoa(len, (uint8_t *)&httpDataBuff[1]); - - // Write the header and button strings - TCPIP_SMTP_StringPut("Pot:,"); - TCPIP_SMTP_StringPut((char *)(httpDataBuff+1)); - TCPIP_SMTP_Put('\r'); - TCPIP_SMTP_Put('\n'); - TCPIP_SMTP_Flush(); - - // Move to the next state - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, SM_EMAIL_PUT_TERMINATOR); - - case SM_EMAIL_PUT_TERMINATOR: - // This section finishes the message - // This consists of two dashes, the boundary, and two more dashes - // on a single line, followed by a CRLF pair to terminate the message. - - // Check to see if a failure occured - if(!TCPIP_SMTP_IsBusy()) - { - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, SM_EMAIL_FINISHING); - return HTTP_IO_WAITING; - } - - // See if we're ready to write data - if(TCPIP_SMTP_IsPutReady() < 16u) - return HTTP_IO_WAITING; - - // Write the ignored text - TCPIP_SMTP_StringPut("--frontier--\r\n"); - TCPIP_SMTP_PutIsDone(); - TCPIP_SMTP_Flush(); - - // Move to the next state - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, SM_EMAIL_FINISHING); - - case SM_EMAIL_FINISHING: - // Wait for status - if(!TCPIP_SMTP_IsBusy()) - { - // Release the module and check success - // Redirect the user based on the result - if(TCPIP_SMTP_UsageEnd() == SMTP_SUCCESS) - lastSuccess = true; - else - lastFailure = true; - - // Redirect to the page - strcpy((char *)httpDataBuff, "/email/index.htm"); - TCPIP_HTTP_CurrentConnectionStatusSet(connHandle, HTTP_REDIRECT); - return HTTP_IO_DONE; - } - - return HTTP_IO_WAITING; - } - - return HTTP_IO_DONE; -} -#endif // #if defined(TCPIP_STACK_USE_SMTP_CLIENT) - -/**************************************************************************** - Function: - HTTP_IO_RESULT HTTPPostDDNSConfig(HTTP_CONN_HANDLE connHandle) - - Summary: - Parsing and collecting http data received from http form. - - Description: - This routine will be excuted every time the Dynamic DNS Client - configuration form is submitted. The http data is received - as a string of the variables seperated by '&' characters in the TCP RX - buffer. This data is parsed to read the required configuration values, - and those values are populated to the global array (DDNSData) reserved - for this purpose. As the data is read, DDNSPointers is also populated - so that the dynamic DNS client can execute with the new parameters. - - Precondition: - cur HTTP connection is loaded. - - Parameters: - connHandle - HTTP connection handle - - Return Values: - HTTP_IO_DONE - Finished with procedure - HTTP_IO_NEED_DATA - More data needed to continue, call again later - HTTP_IO_WAITING - Waiting for asynchronous process to complete, - call again later - ****************************************************************************/ -#if defined(TCPIP_STACK_USE_DYNAMICDNS_CLIENT) -static HTTP_IO_RESULT HTTPPostDDNSConfig(HTTP_CONN_HANDLE connHandle) -{ - static uint8_t *ptrDDNS; - uint8_t *httpDataBuff; - uint8_t smPost; - - #define SM_DDNS_START (0u) - #define SM_DDNS_READ_NAME (1u) - #define SM_DDNS_READ_VALUE (2u) - #define SM_DDNS_READ_SERVICE (3u) - #define SM_DDNS_DONE (4u) - - #define DDNS_SPACE_REMAINING (sizeof(DDNSData) - (ptrDDNS - DDNSData)) - - httpDataBuff = TCPIP_HTTP_CurrentConnectionDataBufferGet(connHandle); - smPost = TCPIP_HTTP_CurrentConnectionPostSmGet(connHandle); - switch(smPost) - { - // Sets defaults for the system - case SM_DDNS_START: - ptrDDNS = DDNSData; - TCPIP_DDNS_ServiceSet(0); - DDNSClient.Host.szROM = NULL; - DDNSClient.Username.szROM = NULL; - DDNSClient.Password.szROM = NULL; - DDNSClient.ROMPointers.Host = 0; - DDNSClient.ROMPointers.Username = 0; - DDNSClient.ROMPointers.Password = 0; - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, ++smPost); - - // Searches out names and handles them as they arrive - case SM_DDNS_READ_NAME: - // If all parameters have been read, end - if(TCPIP_HTTP_CurrentConnectionByteCountGet(connHandle) == 0u) - { - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, SM_DDNS_DONE); - break; - } - - // Read a name - if(TCPIP_HTTP_PostNameRead(connHandle, httpDataBuff, TCPIP_HTTP_MAX_DATA_LEN) == HTTP_READ_INCOMPLETE) - return HTTP_IO_NEED_DATA; - - if(!strcmp((char *)httpDataBuff, (const char *)"service")) - { - // Reading the service (numeric) - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, SM_DDNS_READ_SERVICE); - break; - } - else if(!strcmp((char *)httpDataBuff, (const char *)"user")) - DDNSClient.Username.szRAM = ptrDDNS; - else if(!strcmp((char *)httpDataBuff, (const char *)"pass")) - DDNSClient.Password.szRAM = ptrDDNS; - else if(!strcmp((char *)httpDataBuff, (const char *)"host")) - DDNSClient.Host.szRAM = ptrDDNS; - - // Move to reading the value for user/pass/host - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, ++smPost); - - // Reads in values and assigns them to the DDNS RAM - case SM_DDNS_READ_VALUE: - // Read a name - if(TCPIP_HTTP_PostValueRead(connHandle, ptrDDNS, DDNS_SPACE_REMAINING) == HTTP_READ_INCOMPLETE) - return HTTP_IO_NEED_DATA; - - // Move past the data that was just read - ptrDDNS += strlen((char *)ptrDDNS); - if(ptrDDNS < DDNSData + sizeof(DDNSData) - 1) - ptrDDNS += 1; - - // Return to reading names - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, SM_DDNS_READ_NAME); - break; - - // Reads in a service ID - case SM_DDNS_READ_SERVICE: - // Read the integer id - if(TCPIP_HTTP_PostValueRead(connHandle, httpDataBuff, TCPIP_HTTP_MAX_DATA_LEN) == HTTP_READ_INCOMPLETE) - return HTTP_IO_NEED_DATA; - - // Convert to a service ID - TCPIP_DDNS_ServiceSet((uint8_t)atol((char *)httpDataBuff)); - - // Return to reading names - TCPIP_HTTP_CurrentConnectionPostSmSet(connHandle, SM_DDNS_READ_NAME); - break; - - // Sets up the DDNS client for an update - case SM_DDNS_DONE: - // Since user name and password changed, force an update immediately - TCPIP_DDNS_UpdateForce(); - - // Redirect to prevent POST errors - lastSuccess = true; - strcpy((char *)httpDataBuff, "/dyndns/index.htm"); - TCPIP_HTTP_CurrentConnectionStatusSet(connHandle, HTTP_REDIRECT); - return HTTP_IO_DONE; - } - - return HTTP_IO_WAITING; // Assume we're waiting to process more data -} -#endif // defined(TCPIP_STACK_USE_DYNAMICDNS_CLIENT) - -#endif // defined(TCPIP_HTTP_USE_POST) - -/**************************************************************************** - Section: - Dynamic Variable Callback Functions - ****************************************************************************/ - -/**************************************************************************** - Function: - void TCPIP_HTTP_Print_varname(void) - - Internal: - See documentation in the TCP/IP Stack API or HTTP.h for details. - ****************************************************************************/ -void TCPIP_HTTP_Print_builddate(HTTP_CONN_HANDLE connHandle) -{ - TCP_SOCKET sktHTTP; - sktHTTP = TCPIP_HTTP_CurrentConnectionSocketGet(connHandle); - - TCPIP_HTTP_CurrentConnectionCallbackPosSet(connHandle, 0x01); - if(TCPIP_TCP_PutIsReady(sktHTTP) < strlen((const char *)__DATE__" "__TIME__)) - return; - - TCPIP_HTTP_CurrentConnectionCallbackPosSet(connHandle, 0x00); - TCPIP_TCP_StringPut(sktHTTP, (const void *)__DATE__" "__TIME__); -} - -void TCPIP_HTTP_Print_version(HTTP_CONN_HANDLE connHandle) -{ - TCPIP_TCP_StringPut(TCPIP_HTTP_CurrentConnectionSocketGet(connHandle), (const void *)TCPIP_STACK_VERSION_STR); -} - -const uint8_t HTML_UP_ARROW[] = "up"; -const uint8_t HTML_DOWN_ARROW[] = "dn"; -void TCPIP_HTTP_Print_btn(HTTP_CONN_HANDLE connHandle, uint16_t num) -{ - // Determine which button - switch(num) - { - case 0: - num = BSP_SwitchStateGet(APP_TCPIP_SWITCH_1); - break; - case 1: - num = BSP_SwitchStateGet(APP_TCPIP_SWITCH_2); - break; - case 2: - num = BSP_SwitchStateGet(APP_TCPIP_SWITCH_3); - break; - default: - num = 0; - } - - // Print the output - TCPIP_TCP_StringPut(TCPIP_HTTP_CurrentConnectionSocketGet(connHandle), (num?HTML_UP_ARROW:HTML_DOWN_ARROW)); -} - -void TCPIP_HTTP_Print_led(HTTP_CONN_HANDLE connHandle, uint16_t num) -{ - // Determine which LED - switch(num) - { - case 0: - // This is a temporary work-around -#if defined(EX16) - num = BSP_LEDStateGet(APP_TCPIP_LED_1); -#else - num = BSP_LEDStateGet(APP_TCPIP_LED_3); -#endif - break; - case 1: - num = BSP_LEDStateGet(APP_TCPIP_LED_2); - break; - case 2: - num = BSP_LEDStateGet(APP_TCPIP_LED_3); - break; - default: - num = 0; - } - - // Print the output - TCPIP_TCP_Put(TCPIP_HTTP_CurrentConnectionSocketGet(connHandle), (num?'1':'0')); -} - -void TCPIP_HTTP_Print_ledSelected(HTTP_CONN_HANDLE connHandle, uint16_t num, uint16_t state) -{ - // Determine which LED to check - switch(num) - { - case 0: - num = BSP_LEDStateGet(APP_TCPIP_LED_1); - break; - case 1: - num = BSP_LEDStateGet(APP_TCPIP_LED_2); - break; - case 2: - num = BSP_LEDStateGet(APP_TCPIP_LED_3); - break; - default: - num = 0; - } - - // Print output if true and ON or if false and OFF - if((state && num) || (!state && !num)) - TCPIP_TCP_StringPut(TCPIP_HTTP_CurrentConnectionSocketGet(connHandle), (const uint8_t *)"SELECTED"); -} - -void TCPIP_HTTP_Print_pot(HTTP_CONN_HANDLE connHandle) -{ - uint8_t AN0String[8]; - uint16_t ADval; - - ADval = (uint16_t)SYS_RANDOM_PseudoGet(); - - uitoa(ADval, (uint8_t *)AN0String); - - TCPIP_TCP_StringPut(TCPIP_HTTP_CurrentConnectionSocketGet(connHandle), AN0String); -} - -void TCPIP_HTTP_Print_drive(HTTP_CONN_HANDLE connHandle) -{ - TCPIP_TCP_StringPut(TCPIP_HTTP_CurrentConnectionSocketGet(connHandle), (const void *)SYS_FS_DRIVE); -} - -void TCPIP_HTTP_Print_fstype(HTTP_CONN_HANDLE connHandle) -{ - TCPIP_TCP_StringPut(TCPIP_HTTP_CurrentConnectionSocketGet(connHandle), (const void *)SYS_FS_MPFS_STRING); -} - -void TCPIP_HTTP_Print_hellomsg(HTTP_CONN_HANDLE connHandle) -{ - const uint8_t *ptr; - TCP_SOCKET sktHTTP = TCPIP_HTTP_CurrentConnectionSocketGet(connHandle); - - ptr = TCPIP_HTTP_ArgGet(TCPIP_HTTP_CurrentConnectionDataBufferGet(connHandle), (const uint8_t *)"name"); - // We omit checking for space because this is the only data being written - if(ptr != NULL) - { - TCPIP_TCP_StringPut(sktHTTP, (const uint8_t *)"Hello, "); - TCPIP_TCP_StringPut(sktHTTP, ptr); - } -} - -void TCPIP_HTTP_Print_cookiename(HTTP_CONN_HANDLE connHandle) -{ - const uint8_t *ptr; - TCP_SOCKET sktHTTP = TCPIP_HTTP_CurrentConnectionSocketGet(connHandle); - - ptr = TCPIP_HTTP_ArgGet(TCPIP_HTTP_CurrentConnectionDataBufferGet(connHandle), (const uint8_t *)"name"); - if(ptr) - TCPIP_TCP_StringPut(sktHTTP, ptr); - else - TCPIP_TCP_StringPut(sktHTTP, (const uint8_t *)"not set"); -} - -void TCPIP_HTTP_Print_cookiefav(HTTP_CONN_HANDLE connHandle) -{ - const uint8_t *ptr; - TCP_SOCKET sktHTTP = TCPIP_HTTP_CurrentConnectionSocketGet(connHandle); - - ptr = TCPIP_HTTP_ArgGet(TCPIP_HTTP_CurrentConnectionDataBufferGet(connHandle), (const uint8_t *)"fav"); - if(ptr) - TCPIP_TCP_StringPut(sktHTTP, ptr); - else - TCPIP_TCP_StringPut(sktHTTP, (const uint8_t *)"not set"); -} - -void TCPIP_HTTP_Print_uploadedmd5(HTTP_CONN_HANDLE connHandle) -{ - uint8_t i; - uint8_t *httpDataBuff; - TCP_SOCKET sktHTTP = TCPIP_HTTP_CurrentConnectionSocketGet(connHandle); - - // Set a flag to indicate not finished - TCPIP_HTTP_CurrentConnectionCallbackPosSet(connHandle, 1); - - // Make sure there's enough output space - if(TCPIP_TCP_PutIsReady(sktHTTP) < 32u + 37u + 5u) - return; - - // Check for flag set in HTTPPostMD5 -#if defined(HTTP_APP_USE_MD5) - if(TCPIP_HTTP_CurrentConnectionPostSmGet(connHandle) != SM_MD5_POST_COMPLETE) -#endif - {// No file uploaded, so just return - TCPIP_TCP_StringPut(sktHTTP, (const uint8_t *)"Upload a File"); - TCPIP_HTTP_CurrentConnectionCallbackPosSet(connHandle, 0); - return; - } - - TCPIP_TCP_StringPut(sktHTTP, (const uint8_t *)"Uploaded File's MD5 was:
"); - httpDataBuff = TCPIP_HTTP_CurrentConnectionDataBufferGet(connHandle); - - // Write a byte of the md5 sum at a time - for(i = 0; i < 16u; i++) - { - TCPIP_TCP_Put(sktHTTP, btohexa_high(httpDataBuff[i])); - TCPIP_TCP_Put(sktHTTP, btohexa_low(httpDataBuff[i])); - if((i & 0x03) == 3u) - TCPIP_TCP_Put(sktHTTP, ' '); - } - - TCPIP_HTTP_CurrentConnectionCallbackPosSet(connHandle, 0x00); -} - -void TCPIP_HTTP_Print_config_hostname(HTTP_CONN_HANDLE connHandle) -{ - TCP_SOCKET sktHTTP = TCPIP_HTTP_CurrentConnectionSocketGet(connHandle); - - TCPIP_TCP_StringPut(sktHTTP, (uint8_t *)TCPIP_STACK_NetBIOSName(TCPIP_TCP_SocketNetGet(sktHTTP))); -} - -void TCPIP_HTTP_Print_config_dhcpchecked(HTTP_CONN_HANDLE connHandle) -{ - TCP_SOCKET sktHTTP = TCPIP_HTTP_CurrentConnectionSocketGet(connHandle); - - if(TCPIP_DHCP_IsEnabled(TCPIP_TCP_SocketNetGet(sktHTTP))) - { - TCPIP_TCP_StringPut(sktHTTP, (const uint8_t *)"checked"); - } -} - -void TCPIP_HTTP_Print_config_ip(HTTP_CONN_HANDLE connHandle) -{ - IPV4_ADDR ipAddress; - TCP_SOCKET sktHTTP = TCPIP_HTTP_CurrentConnectionSocketGet(connHandle); - TCPIP_NET_HANDLE netH = TCPIP_TCP_SocketNetGet(sktHTTP); - - ipAddress.Val = TCPIP_STACK_NetAddress(netH); - if (TCPIP_Helper_IPAddressToString(&ipAddress, (char *)s_buf_ipv4addr, HTTP_APP_IPV4_ADDRESS_BUFFER_SIZE)) - { - TCPIP_TCP_StringPut(sktHTTP, s_buf_ipv4addr); - } -} - -void TCPIP_HTTP_Print_config_gw(HTTP_CONN_HANDLE connHandle) // gateway -{ - IPV4_ADDR gwAddress; - TCP_SOCKET sktHTTP = TCPIP_HTTP_CurrentConnectionSocketGet(connHandle); - TCPIP_NET_HANDLE netH = TCPIP_TCP_SocketNetGet(sktHTTP); - - gwAddress.Val = TCPIP_STACK_NetAddressGateway(netH); - if (TCPIP_Helper_IPAddressToString(&gwAddress, (char *)s_buf_ipv4addr, HTTP_APP_IPV4_ADDRESS_BUFFER_SIZE)) - { - TCPIP_TCP_StringPut(sktHTTP, s_buf_ipv4addr); - } -} - -void TCPIP_HTTP_Print_config_subnet(HTTP_CONN_HANDLE connHandle) -{ - IPV4_ADDR ipMask; - TCP_SOCKET sktHTTP = TCPIP_HTTP_CurrentConnectionSocketGet(connHandle); - TCPIP_NET_HANDLE netH = TCPIP_TCP_SocketNetGet(sktHTTP); - - ipMask.Val = TCPIP_STACK_NetMask(netH); - if (TCPIP_Helper_IPAddressToString(&ipMask, (char *)s_buf_ipv4addr, HTTP_APP_IPV4_ADDRESS_BUFFER_SIZE)) - { - TCPIP_TCP_StringPut(sktHTTP, s_buf_ipv4addr); - } -} - -void TCPIP_HTTP_Print_config_dns1(HTTP_CONN_HANDLE connHandle) -{ - IPV4_ADDR priDnsAddr; - TCP_SOCKET sktHTTP = TCPIP_HTTP_CurrentConnectionSocketGet(connHandle); - TCPIP_NET_HANDLE netH = TCPIP_TCP_SocketNetGet(sktHTTP); - - priDnsAddr.Val = TCPIP_STACK_NetAddressDnsPrimary(netH); - if (TCPIP_Helper_IPAddressToString(&priDnsAddr, (char *)s_buf_ipv4addr, HTTP_APP_IPV4_ADDRESS_BUFFER_SIZE)) - { - TCPIP_TCP_StringPut(sktHTTP, s_buf_ipv4addr); - } -} - -void TCPIP_HTTP_Print_config_dns2(HTTP_CONN_HANDLE connHandle) -{ - IPV4_ADDR secondDnsAddr; - TCP_SOCKET sktHTTP = TCPIP_HTTP_CurrentConnectionSocketGet(connHandle); - TCPIP_NET_HANDLE netH = TCPIP_TCP_SocketNetGet(sktHTTP); - - secondDnsAddr.Val = TCPIP_STACK_NetAddressDnsSecond(netH); - if (TCPIP_Helper_IPAddressToString(&secondDnsAddr, (char *)s_buf_ipv4addr, HTTP_APP_IPV4_ADDRESS_BUFFER_SIZE)) - { - TCPIP_TCP_StringPut(sktHTTP, s_buf_ipv4addr); - } -} - -void TCPIP_HTTP_Print_config_mac(HTTP_CONN_HANDLE connHandle) -{ - uint8_t i; - TCP_SOCKET sktHTTP; - TCPIP_NET_HANDLE hNet; - const uint8_t *pMacAdd; - - sktHTTP = TCPIP_HTTP_CurrentConnectionSocketGet(connHandle); - - if(TCPIP_TCP_PutIsReady(sktHTTP) < 18u) - { // need 17 bytes to write a MAC - TCPIP_HTTP_CurrentConnectionCallbackPosSet(connHandle, 0x01); - return; - } - - hNet = TCPIP_TCP_SocketNetGet(sktHTTP); - pMacAdd = TCPIP_STACK_NetAddressMac(hNet); - // Write each byte - for(i = 0; i < 6u; i++) - { - if(i) - TCPIP_TCP_Put(sktHTTP, ':'); - TCPIP_TCP_Put(sktHTTP, btohexa_high(pMacAdd[i])); - TCPIP_TCP_Put(sktHTTP, btohexa_low(pMacAdd[i])); - } - - // Indicate that we're done - TCPIP_HTTP_CurrentConnectionCallbackPosSet(connHandle, 0x00); - return; -} - -// SNMP Read communities configuration page -void TCPIP_HTTP_Print_read_comm(HTTP_CONN_HANDLE connHandle, uint16_t num) -{ -#if defined(TCPIP_STACK_USE_SNMP_SERVER) - uint8_t dest[TCPIP_SNMP_COMMUNITY_MAX_LEN+1]; - TCP_SOCKET sktHTTP = TCPIP_HTTP_CurrentConnectionSocketGet(connHandle); - - // Ensure no one tries to read illegal memory addresses by specifying - // illegal num values. - if(num >= TCPIP_SNMP_MAX_COMMUNITY_SUPPORT) - return; - memset(dest,0,sizeof(dest)); - if(TCPIP_SNMP_ReadCommunityGet(num,TCPIP_SNMP_COMMUNITY_MAX_LEN,dest) != true) - return; - // Send proper string - TCPIP_TCP_StringPut(sktHTTP,dest); -#endif -} - -// SNMP Write communities configuration page -void TCPIP_HTTP_Print_write_comm(HTTP_CONN_HANDLE connHandle, uint16_t num) -{ -#if defined(TCPIP_STACK_USE_SNMP_SERVER) - uint8_t dest[TCPIP_SNMP_COMMUNITY_MAX_LEN+1]; - TCP_SOCKET sktHTTP = TCPIP_HTTP_CurrentConnectionSocketGet(connHandle); - - // Ensure no one tries to read illegal memory addresses by specifying - // illegal num values. - if(num >= TCPIP_SNMP_MAX_COMMUNITY_SUPPORT) - return; - memset(dest,0,sizeof(dest)); - // Send proper string - if(TCPIP_SNMP_WriteCommunityGet(num,TCPIP_SNMP_COMMUNITY_MAX_LEN,dest) != true) - return; - TCPIP_TCP_StringPut(sktHTTP,dest); -#endif -} - -void TCPIP_HTTP_Print_reboot(HTTP_CONN_HANDLE connHandle) -{ - // This is not so much a print function, but causes the interface to restart - // when the configuration is changed. If called via an AJAX call, this - // will gracefully restart the interface and bring it back online immediately - if(httpNetData.currNet != 0) - { // valid data - httpNetData.netConfig.interface = httpNetData.ifName; - httpNetData.netConfig.hostName = httpNetData.nbnsName; - httpNetData.netConfig.macAddr = httpNetData.ifMacAddr; - httpNetData.netConfig.ipAddr = httpNetData.ipAddr; - httpNetData.netConfig.ipMask = httpNetData.ipMask; - httpNetData.netConfig.gateway = httpNetData.gwIP; - httpNetData.netConfig.priDNS = httpNetData.dns1IP; - httpNetData.netConfig.secondDNS = httpNetData.dns2IP; - httpNetData.netConfig.powerMode = TCPIP_STACK_IF_POWER_FULL; - // httpNetData.netConfig.startFlags should be already set; - httpNetData.netConfig.pMacObject = TCPIP_STACK_MACObjectGet(httpNetData.currNet); - - TCPIP_STACK_NetDown(httpNetData.currNet); - TCPIP_STACK_NetUp(httpNetData.currNet, &httpNetData.netConfig); - } -} - -void TCPIP_HTTP_Print_rebootaddr(HTTP_CONN_HANDLE connHandle) -{ // This is the expected address of the board upon rebooting - TCPIP_TCP_StringPut(TCPIP_HTTP_CurrentConnectionSocketGet(connHandle), TCPIP_HTTP_CurrentConnectionDataBufferGet(connHandle)); -} - -void TCPIP_HTTP_Print_ddns_user(HTTP_CONN_HANDLE connHandle) -{ - #if defined(TCPIP_STACK_USE_DYNAMICDNS_CLIENT) - uint32_t callbackPos; - - if(DDNSClient.ROMPointers.Username || !DDNSClient.Username.szRAM) - return; - - callbackPos = TCPIP_HTTP_CurrentConnectionCallbackPosGet(connHandle); - if(callbackPos == 0x00u) - callbackPos = (uint32_t)DDNSClient.Username.szRAM; - callbackPos = (uint32_t)TCPIP_TCP_StringPut(TCPIP_HTTP_CurrentConnectionSocketGet(connHandle), (uint8_t *)callbackPos); - if(*(uint8_t *)callbackPos == '\0') - callbackPos = 0x00; - TCPIP_HTTP_CurrentConnectionCallbackPosSet(connHandle, callbackPos); - #endif -} - -void TCPIP_HTTP_Print_ddns_pass(HTTP_CONN_HANDLE connHandle) -{ - #if defined(TCPIP_STACK_USE_DYNAMICDNS_CLIENT) - uint32_t callbackPos; - - if(DDNSClient.ROMPointers.Password || !DDNSClient.Password.szRAM) - return; - - callbackPos = TCPIP_HTTP_CurrentConnectionCallbackPosGet(connHandle); - - if(callbackPos == 0x00u) - callbackPos = (uint32_t)DDNSClient.Password.szRAM; - callbackPos = (uint32_t)TCPIP_TCP_StringPut(TCPIP_HTTP_CurrentConnectionSocketGet(connHandle), (uint8_t *)callbackPos); - if(*(uint8_t *)callbackPos == '\0') - callbackPos = 0x00; - TCPIP_HTTP_CurrentConnectionCallbackPosSet(connHandle, callbackPos); - #endif -} - -void TCPIP_HTTP_Print_ddns_host(HTTP_CONN_HANDLE connHandle) -{ - #if defined(TCPIP_STACK_USE_DYNAMICDNS_CLIENT) - uint32_t callbackPos; - - if(DDNSClient.ROMPointers.Host || !DDNSClient.Host.szRAM) - return; - callbackPos = TCPIP_HTTP_CurrentConnectionCallbackPosGet(connHandle); - if(callbackPos == 0x00u) - callbackPos = (uint32_t)DDNSClient.Host.szRAM; - callbackPos = (uint32_t)TCPIP_TCP_StringPut(TCPIP_HTTP_CurrentConnectionSocketGet(connHandle), (uint8_t *)callbackPos); - if(*(uint8_t *)callbackPos == '\0') - callbackPos = 0x00; - TCPIP_HTTP_CurrentConnectionCallbackPosSet(connHandle, callbackPos); - #endif -} - -void TCPIP_HTTP_Print_ddns_service(HTTP_CONN_HANDLE connHandle, uint16_t i) -{ - #if defined(TCPIP_STACK_USE_DYNAMICDNS_CLIENT) - if(!DDNSClient.ROMPointers.UpdateServer || !DDNSClient.UpdateServer.szROM) - return; - if((const char *)DDNSClient.UpdateServer.szROM == ddnsServiceHosts[i]) - TCPIP_TCP_StringPut(TCPIP_HTTP_CurrentConnectionSocketGet(connHandle), (const uint8_t *)"selected"); - #endif -} - -void TCPIP_HTTP_Print_ddns_status(HTTP_CONN_HANDLE connHandle) -{ - TCP_SOCKET sktHTTP = TCPIP_HTTP_CurrentConnectionSocketGet(connHandle); - - #if defined(TCPIP_STACK_USE_DYNAMICDNS_CLIENT) - DDNS_STATUS s; - s = TCPIP_DDNS_LastStatusGet(); - if(s == DDNS_STATUS_GOOD || s == DDNS_STATUS_UNCHANGED || s == DDNS_STATUS_NOCHG) - TCPIP_TCP_StringPut(sktHTTP, (const uint8_t *)"ok"); - else if(s == DDNS_STATUS_UNKNOWN) - TCPIP_TCP_StringPut(sktHTTP, (const uint8_t *)"unk"); - else - TCPIP_TCP_StringPut(sktHTTP, (const uint8_t *)"fail"); - #else - TCPIP_TCP_StringPut(sktHTTP, (const uint8_t *)"fail"); - #endif -} - -void TCPIP_HTTP_Print_ddns_status_msg(HTTP_CONN_HANDLE connHandle) -{ - TCP_SOCKET sktHTTP = TCPIP_HTTP_CurrentConnectionSocketGet(connHandle); - - if(TCPIP_TCP_PutIsReady(sktHTTP) < 75u) - { - TCPIP_HTTP_CurrentConnectionCallbackPosSet(connHandle, 0x01); - return; - } - - #if defined(TCPIP_STACK_USE_DYNAMICDNS_CLIENT) - switch(TCPIP_DDNS_LastStatusGet()) - { - case DDNS_STATUS_GOOD: - case DDNS_STATUS_NOCHG: - TCPIP_TCP_StringPut(sktHTTP, (const uint8_t *)"The last update was successful."); - break; - case DDNS_STATUS_UNCHANGED: - TCPIP_TCP_StringPut(sktHTTP, (const uint8_t *)"The IP has not changed since the last update."); - break; - case DDNS_STATUS_UPDATE_ERROR: - case DDNS_STATUS_CHECKIP_ERROR: - TCPIP_TCP_StringPut(sktHTTP, (const uint8_t *)"Could not communicate with DDNS server."); - break; - case DDNS_STATUS_INVALID: - TCPIP_TCP_StringPut(sktHTTP, (const uint8_t *)"The current configuration is not valid."); - break; - case DDNS_STATUS_UNKNOWN: - TCPIP_TCP_StringPut(sktHTTP, (const uint8_t *)"The Dynamic DNS client is pending an update."); - break; - default: - TCPIP_TCP_StringPut(sktHTTP, (const uint8_t *)"An error occurred during the update.
The DDNS Client is suspended."); - break; - } - #else - TCPIP_TCP_StringPut(sktHTTP, (const uint8_t *)"The Dynamic DNS Client is not enabled."); - #endif - - TCPIP_HTTP_CurrentConnectionCallbackPosSet(connHandle, 0); -} - -void TCPIP_HTTP_Print_smtps_en(HTTP_CONN_HANDLE connHandle) -{ - TCP_SOCKET sktHTTP = TCPIP_HTTP_CurrentConnectionSocketGet(connHandle); - - TCPIP_TCP_StringPut(sktHTTP, (const uint8_t *)"none"); -} - -void TCPIP_HTTP_Print_snmp_en(HTTP_CONN_HANDLE connHandle) -{ - TCP_SOCKET sktHTTP = TCPIP_HTTP_CurrentConnectionSocketGet(connHandle); - - #if defined(TCPIP_STACK_USE_SNMP_SERVER) - TCPIP_TCP_StringPut(sktHTTP, (const uint8_t *)"none"); - #else - TCPIP_TCP_StringPut(sktHTTP, (const uint8_t *)"block"); - #endif -} - -void TCPIP_HTTP_Print_status_ok(HTTP_CONN_HANDLE connHandle) -{ - TCP_SOCKET sktHTTP = TCPIP_HTTP_CurrentConnectionSocketGet(connHandle); - - if(lastSuccess) - TCPIP_TCP_StringPut(sktHTTP, (const uint8_t *)"block"); - else - TCPIP_TCP_StringPut(sktHTTP, (const uint8_t *)"none"); - lastSuccess = false; -} - -void TCPIP_HTTP_Print_status_fail(HTTP_CONN_HANDLE connHandle) -{ - TCP_SOCKET sktHTTP = TCPIP_HTTP_CurrentConnectionSocketGet(connHandle); - - if(lastFailure) - TCPIP_TCP_StringPut(sktHTTP, (const uint8_t *)"block"); - else - TCPIP_TCP_StringPut(sktHTTP, (const uint8_t *)"none"); - lastFailure = false; -} - -#endif // #if defined(TCPIP_STACK_USE_HTTP_SERVER) diff --git a/software/aws-iot-ethernet/firmware/src/http_print.c b/software/aws-iot-ethernet/firmware/src/http_print.c deleted file mode 100644 index 3ab98c7..0000000 --- a/software/aws-iot-ethernet/firmware/src/http_print.c +++ /dev/null @@ -1,79 +0,0 @@ -/********************************************************************* - * File Name: http_print.c - * - * Provides callback headers and resolution for user's custom - * HTTP Application. - * - * This file is automatically generated by the MPFS Utility - * ALL MODIFICATIONS WILL BE OVERWRITTEN BY THE MPFS GENERATOR - * - * Software License Agreement - * - * Copyright (C) 2012 Microchip Technology Inc. All rights - * reserved. - * Microchip licenses to you the right to use, modify, copy, and distribute - * software only embedded on a Microchip microcontroller or digital signal - * controller that is integrated into your product or third party product - * (pursuant to the sublicense terms in the accompanying license agreement) - - * You should refer to the license agreement accompanying this - * Software for additional information regarding your rights and - * obligations. - * - * You should refer to the license agreement accompanying this - * Software for additional information regarding your rights and - * obligations. - * - * THE SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT - * WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT - * LIMITATION, ANY WARRANTY OF MERCHANTABILITY, FITNESS FOR A - * PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * MICROCHIP BE LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF - * PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY OR SERVICES, ANY CLAIMS - * BY THIRD PARTIES (INCLUDING BUT NOT LIMITED TO ANY DEFENSE - * THEREOF), ANY CLAIMS FOR INDEMNITY OR CONTRIBUTION, OR OTHER - * SIMILAR COSTS, WHETHER ASSERTED ON THE BASIS OF CONTRACT, TORT - * (INCLUDING NEGLIGENCE), BREACH OF WARRANTY, OR OTHERWISE. - * - *********************************************************************/ - -#include "tcpip/tcpip.h" - -void TCPIP_HTTP_Print(HTTP_CONN_HANDLE connHandle,uint32_t callbackID); -void TCPIP_HTTP_Print_remoteServer(HTTP_CONN_HANDLE connHandle); -void TCPIP_HTTP_Print_uuid(HTTP_CONN_HANDLE connHandle); - -void TCPIP_HTTP_Print(HTTP_CONN_HANDLE connHandle,uint32_t callbackID) -{ -TCP_SOCKET sktHTTP; - switch(callbackID) - { - case 0x00000000: - TCPIP_HTTP_FileInclude(connHandle,(const uint8_t*)"header.inc"); - break; - case 0x00000001: - TCPIP_HTTP_FileInclude(connHandle,(const uint8_t*)"footer.inc"); - break; - case 0x00000002: - TCPIP_HTTP_Print_remoteServer(connHandle); - break; - case 0x00000003: - TCPIP_HTTP_Print_uuid(connHandle); - break; - default: - // Output notification for undefined values - sktHTTP = TCPIP_HTTP_CurrentConnectionSocketGet(connHandle); - TCPIP_TCP_ArrayPut(sktHTTP, (const uint8_t*)"!DEF", 4); - } - - return; -} - -void TCPIP_HTTP_Print_(HTTP_CONN_HANDLE connHandle) -{ - TCP_SOCKET sktHTTP = TCPIP_HTTP_CurrentConnectionSocketGet(connHandle); - TCPIP_TCP_Put(sktHTTP, '~'); - return; -} - diff --git a/software/aws-iot-ethernet/firmware/src/http_print.idx b/software/aws-iot-ethernet/firmware/src/http_print.idx deleted file mode 100644 index b634476..0000000 --- a/software/aws-iot-ethernet/firmware/src/http_print.idx +++ /dev/null @@ -1,4 +0,0 @@ -+inc:header.inc -+inc:footer.inc -+remoteServer -+uuid diff --git a/software/aws-iot-ethernet/firmware/src/mpfs_img2.c b/software/aws-iot-ethernet/firmware/src/mpfs_img2.c deleted file mode 100644 index 3e3b56c..0000000 --- a/software/aws-iot-ethernet/firmware/src/mpfs_img2.c +++ /dev/null @@ -1,589 +0,0 @@ -/*************************************************************** - * File Name: mpfs_img2.c - * Description: Defines an MPFS2 image to be stored in program memory. - * Processor: PIC32 - * Compiler: Microchip C32,XC32 - * - * NOT FOR HAND MODIFICATION - * This file is automatically generated by the MPFS2 Utility - * ALL MODIFICATIONS WILL BE OVERWRITTEN BY THE MPFS2 GENERATOR - * Generated Wed Jun 15 2016 11:39:25 - * - * Software License Agreement - * - * Copyright (C) 2012 Microchip Technology Inc. All rights - * reserved. - * - * Microchip licenses to you the right to use, modify, copy, and distribute - * software only embedded on a Microchip microcontroller or digital signal - * controller that is integrated into your product or third party product - * (pursuant to the sublicense terms in the accompanying license agreement) - - * You should refer to the license agreement accompanying this - * Software for additional information regarding your rights and - * obligations. - * - * THE SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT - * WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT - * LIMITATION, ANY WARRANTY OF MERCHANTABILITY, FITNESS FOR A - * PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * MICROCHIP BE LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF - * PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY OR SERVICES, ANY CLAIMS - * BY THIRD PARTIES (INCLUDING BUT NOT LIMITED TO ANY DEFENSE - * THEREOF), ANY CLAIMS FOR INDEMNITY OR CONTRIBUTION, OR OTHER - * SIMILAR COSTS, WHETHER ASSERTED ON THE BASIS OF CONTRACT, TORT - * (INCLUDING NEGLIGENCE), BREACH OF WARRANTY, OR OTHERWISE. - * - ***************************************************************/ -#include -#include "system_config.h" - -/************************************** - * MPFS2 Image Data - **************************************/ - -const uint8_t __attribute__((space(prog),address(DRV_NVM_MEDIA_START_ADDRESS))) __attribute__ ((keep)) NVM_MEDIA_DATA[DRV_NVM_MEDIA_SIZE*1024] = { \ - 0x4d,0x50,0x46,0x53,0x02,0x01,0x0b,0x00,0xf0,0x94,0xca,0xa7,0xf0,0xd6,0x26,0x4f, /* MPFS..........&O */ \ - 0x26,0x2d,0x0a,0xa3,0x8a,0x10,0x3e,0x46,0x08,0x71,0x2a,0x1c,0x2a,0xc1,0x10,0x01, /* &-....>F.q...... */ \ - 0x00,0x00,0xa2,0x01,0x00,0x00,0x3c,0x00,0x00,0x00,0xdd,0xa0,0x61,0x57,0x00,0x00, /* ......<.....aW.. */ \ - 0x00,0x00,0x00,0x00,0x1c,0x01,0x00,0x00,0xde,0x01,0x00,0x00,0xfc,0x00,0x00,0x00, /* ................ */ \ - 0xe3,0x44,0x60,0x57,0x00,0x00,0x00,0x00,0x01,0x00,0x26,0x01,0x00,0x00,0xda,0x02, /* .D`W......&..... */ \ - 0x00,0x00,0x18,0x00,0x00,0x00,0xdd,0xa0,0x61,0x57,0x00,0x00,0x00,0x00,0x00,0x00, /* ........aW...... */ \ - 0x33,0x01,0x00,0x00,0xf2,0x02,0x00,0x00,0x6b,0x00,0x00,0x00,0x39,0x65,0x60,0x57, /* 3.......k...9e`W */ \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x01,0x00,0x00,0x5d,0x03,0x00,0x00,0x56,0x02, /* ......>...]...V. */ \ - 0x00,0x00,0xe3,0x44,0x60,0x57,0x00,0x00,0x00,0x00,0x00,0x00,0x49,0x01,0x00,0x00, /* ...D`W......I... */ \ - 0xb3,0x05,0x00,0x00,0x2a,0x04,0x00,0x00,0x6f,0x65,0x60,0x57,0x00,0x00,0x00,0x00, /* ........oe`W.... */ \ - 0x02,0x00,0x53,0x01,0x00,0x00,0xdd,0x09,0x00,0x00,0xb0,0x01,0x00,0x00,0x4f,0x9d, /* ..S...........O. */ \ - 0x61,0x57,0x00,0x00,0x00,0x00,0x02,0x00,0x61,0x01,0x00,0x00,0x8d,0x0b,0x00,0x00, /* aW......a....... */ \ - 0x74,0x0a,0x00,0x00,0xe3,0x44,0x60,0x57,0x00,0x00,0x00,0x00,0x01,0x00,0x74,0x01, /* t....D`W......t. */ \ - 0x00,0x00,0x01,0x16,0x00,0x00,0xe2,0x04,0x00,0x00,0xe3,0x44,0x60,0x57,0x00,0x00, /* ...........D`W.. */ \ - 0x00,0x00,0x01,0x00,0x84,0x01,0x00,0x00,0xe3,0x1a,0x00,0x00,0x6e,0x02,0x00,0x00, /* ............n... */ \ - 0xcc,0xa0,0x61,0x57,0x00,0x00,0x00,0x00,0x01,0x00,0x95,0x01,0x00,0x00,0x51,0x1d, /* ..aW..........Q. */ \ - 0x00,0x00,0xfa,0x02,0x00,0x00,0xb2,0xa0,0x61,0x57,0x00,0x00,0x00,0x00,0x01,0x00, /* ........aW...... */ \ - 0x44,0x79,0x6e,0x52,0x63,0x72,0x64,0x2e,0x62,0x69,0x6e,0x00,0x65,0x72,0x72,0x6f, /* DynRcrd.bin.erro */ \ - 0x72,0x2e,0x68,0x74,0x6d,0x00,0x46,0x69,0x6c,0x65,0x52,0x63,0x72,0x64,0x2e,0x62, /* r.htm.FileRcrd.b */ \ - 0x69,0x6e,0x00,0x66,0x6f,0x6f,0x74,0x65,0x72,0x2e,0x69,0x6e,0x63,0x00,0x68,0x65, /* in.footer.inc.he */ \ - 0x61,0x64,0x65,0x72,0x2e,0x69,0x6e,0x63,0x00,0x69,0x6e,0x64,0x65,0x78,0x2e,0x68, /* ader.inc.index.h */ \ - 0x74,0x6d,0x00,0x72,0x65,0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x2e,0x68,0x74,0x6d, /* tm.reconnect.htm */ \ - 0x00,0x6a,0x61,0x76,0x61,0x73,0x63,0x72,0x69,0x70,0x74,0x2f,0x6d,0x63,0x68,0x70, /* .javascript/mchp */ \ - 0x2e,0x6a,0x73,0x00,0x69,0x6d,0x61,0x67,0x65,0x73,0x2f,0x6d,0x63,0x68,0x70,0x2e, /* .js.images/mchp. */ \ - 0x67,0x69,0x66,0x00,0x63,0x73,0x73,0x2f,0x6d,0x63,0x68,0x70,0x2d,0x6d,0x69,0x6e, /* gif.css/mchp-min */ \ - 0x2e,0x63,0x73,0x73,0x00,0x63,0x73,0x73,0x2f,0x6d,0x63,0x68,0x70,0x2e,0x63,0x73, /* .css.css/mchp.cs */ \ - 0x73,0x00,0x16,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* s............... */ \ - 0x18,0x04,0x00,0x00,0x01,0x00,0x00,0x00,0x26,0x00,0x00,0x00,0x02,0x00,0x00,0x00, /* ........&....... */ \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x39,0x01,0x00,0x00,0x02,0x00,0x00,0x00,0x78,0x01, /* ......9.......x. */ \ - 0x00,0x00,0x03,0x00,0x00,0x00,0x9e,0x01,0x00,0x00,0x01,0x00,0x00,0x00,0x1f,0x8b, /* ................ */ \ - 0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x45,0x8e,0x41,0x4f,0x83,0x40,0x10,0x85, /* ........E.AO.@.. */ \ - 0xef,0x26,0xfe,0x87,0x71,0xef,0x30,0x36,0xad,0x49,0xd5,0x85,0x83,0x80,0xd1,0xa4, /* .&..q.06.I...... */ \ - 0xd5,0xa6,0xc1,0x18,0x8f,0x08,0x43,0x77,0x93,0xc2,0xe2,0x32,0x88,0xfd,0xf7,0x02, /* ......Cw...2.... */ \ - 0xab,0x65,0x2e,0x33,0x6f,0x5e,0xe6,0x9b,0x27,0xaf,0xe2,0xd7,0x28,0xfd,0xd8,0x25, /* .e.3o^..'...(..% */ \ - 0xf0,0x94,0x6e,0x37,0xb0,0x7b,0x7b,0xd8,0x3c,0x47,0x20,0x3c,0xc4,0xf7,0x65,0x84, /* ..n7.{{.Copyright &co */ \ - 0x70,0x79,0x3b,0x20,0x32,0x30,0x31,0x36,0x20,0x4d,0x69,0x63,0x72,0x6f,0x63,0x68, /* py; 2016 Microch */ \ - 0x69,0x70,0x20,0x54,0x65,0x63,0x68,0x6e,0x6f,0x6c,0x6f,0x67,0x79,0x2c,0x20,0x49, /* ip Technology, I */ \ - 0x6e,0x63,0x2e,0x20,0x56,0x65,0x72,0x20,0x31,0x2e,0x31,0x2e,0x30,0x3c,0x2f,0x64, /* nc. Ver 1.1.0..
..
....< */ \ - 0x68,0x74,0x6d,0x6c,0x20,0x78,0x6d,0x6c,0x6e,0x73,0x3d,0x22,0x68,0x74,0x74,0x70, /* html xmlns="http */ \ - 0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x77,0x33,0x2e,0x6f,0x72,0x67,0x2f,0x31,0x39, /* ://www.w3.org/19 */ \ - 0x39,0x39,0x2f,0x78,0x68,0x74,0x6d,0x6c,0x22,0x20,0x78,0x6d,0x6c,0x3a,0x6c,0x61, /* 99/xhtml" xml:la */ \ - 0x6e,0x67,0x3d,0x22,0x65,0x6e,0x22,0x20,0x6c,0x61,0x6e,0x67,0x3d,0x22,0x65,0x6e, /* ng="en" lang="en */ \ - 0x22,0x3e,0x0d,0x0a,0x3c,0x68,0x65,0x61,0x64,0x3e,0x0d,0x0a,0x3c,0x74,0x69,0x74, /* ">....Microchip IoT */ \ - 0x20,0x45,0x74,0x68,0x65,0x72,0x6e,0x65,0x74,0x20,0x44,0x65,0x76,0x65,0x6c,0x6f, /* Ethernet Develo */ \ - 0x70,0x6d,0x65,0x6e,0x74,0x20,0x4b,0x69,0x74,0x3c,0x2f,0x74,0x69,0x74,0x6c,0x65, /* pment Kit......~inc: */ \ - 0x66,0x6f,0x6f,0x74,0x65,0x72,0x2e,0x69,0x6e,0x63,0x7e,0x0d,0x0a,0x7e,0x69,0x6e, /* footer.inc~..~in */ \ - 0x63,0x3a,0x68,0x65,0x61,0x64,0x65,0x72,0x2e,0x69,0x6e,0x63,0x7e,0x0d,0x0a,0x3c, /* c:header.inc~..< */ \ - 0x64,0x69,0x76,0x20,0x69,0x64,0x3d,0x22,0x63,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x22, /* div id="content" */ \ - 0x3e,0x0d,0x0a,0x3c,0x64,0x69,0x76,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x72, /* >..
..

Connecti */ \ - 0x6e,0x67,0x20,0x74,0x6f,0x20,0x73,0x65,0x72,0x76,0x65,0x72,0x2e,0x2e,0x2e,0x3c, /* ng to server...< */ \ - 0x2f,0x68,0x32,0x3e,0x0d,0x0a,0x0d,0x0a,0x3c,0x70,0x3e,0x54,0x68,0x65,0x20,0x49, /* /h2>....

The I */ \ - 0x6f,0x54,0x20,0x45,0x74,0x68,0x65,0x72,0x6e,0x65,0x74,0x20,0x62,0x6f,0x61,0x72, /* oT Ethernet boar */ \ - 0x64,0x20,0x69,0x73,0x20,0x6e,0x6f,0x77,0x20,0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74, /* d is now connect */ \ - 0x69,0x6e,0x67,0x20,0x74,0x6f,0x20,0x79,0x6f,0x75,0x72,0x20,0x41,0x57,0x53,0x20, /* ing to your AWS */ \ - 0x49,0x6f,0x54,0x20,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74,0x3c,0x2f,0x70,0x3e, /* IoT Endpoint

*/ \ - 0x0d,0x0a,0x0d,0x0a,0x3c,0x70,0x3e,0x54,0x68,0x69,0x73,0x20,0x69,0x73,0x20,0x74, /* ....

This is t */ \ - 0x68,0x65,0x20,0x73,0x65,0x72,0x76,0x65,0x72,0x20,0x79,0x6f,0x75,0x20,0x65,0x6e, /* he server you en */ \ - 0x74,0x65,0x72,0x65,0x64,0x20,0x61,0x6e,0x64,0x20,0x79,0x6f,0x75,0x72,0x20,0x62, /* tered and your b */ \ - 0x6f,0x61,0x72,0x64,0x27,0x73,0x20,0x41,0x57,0x53,0x20,0x54,0x68,0x69,0x6e,0x67, /* oard's AWS Thing */ \ - 0x20,0x4e,0x61,0x6d,0x65,0x20,0x28,0x4d,0x41,0x43,0x20,0x41,0x64,0x64,0x72,0x65, /* Name (MAC Addre */ \ - 0x73,0x73,0x29,0x3a,0x3c,0x2f,0x70,0x3e,0x0d,0x0a,0x3c,0x75,0x6c,0x3e,0x0d,0x0a, /* ss):

..
    .. */ \ - 0x09,0x3c,0x6c,0x69,0x3e,0x3c,0x62,0x3e,0x41,0x57,0x53,0x20,0x49,0x6f,0x54,0x20, /* .
  • AWS IoT */ \ - 0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74,0x20,0x41,0x64,0x64,0x72,0x65,0x73,0x73, /* Endpoint Address */ \ - 0x3a,0x3c,0x2f,0x62,0x3e,0x20,0x7e,0x72,0x65,0x6d,0x6f,0x74,0x65,0x53,0x65,0x72, /* : ~remoteSer */ \ - 0x76,0x65,0x72,0x7e,0x3c,0x2f,0x6c,0x69,0x3e,0x0d,0x0a,0x09,0x3c,0x6c,0x69,0x3e, /* ver~
  • ...
  • */ \ - 0x3c,0x62,0x3e,0x41,0x57,0x53,0x20,0x54,0x68,0x69,0x6e,0x67,0x20,0x4e,0x61,0x6d, /* AWS Thing Nam */ \ - 0x65,0x20,0x28,0x4d,0x41,0x43,0x20,0x41,0x64,0x64,0x72,0x65,0x73,0x73,0x29,0x3a, /* e (MAC Address): */ \ - 0x3c,0x2f,0x62,0x3e,0x20,0x7e,0x75,0x75,0x69,0x64,0x7e,0x3c,0x2f,0x6c,0x69,0x3e, /* ~uuid~
  • */ \ - 0x0d,0x0a,0x3c,0x2f,0x75,0x6c,0x3e,0x0d,0x0a,0x3c,0x2f,0x64,0x69,0x76,0x3e,0x0d, /* ..
..

. */ \ - 0x0a,0x3c,0x2f,0x64,0x69,0x76,0x3e,0x0d,0x0a,0x0d,0x0a,0x7e,0x69,0x6e,0x63,0x3a, /* .....~inc: */ \ - 0x66,0x6f,0x6f,0x74,0x65,0x72,0x2e,0x69,0x6e,0x63,0x7e,0x0d,0x0a,0x1f,0x8b,0x08, /* footer.inc~..... */ \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd5,0x58,0xed,0x72,0xdb,0xc6,0x15,0xfd,0x4d, /* ........X.r....M */ \ - 0xcf,0xf8,0x1d,0x6e,0x39,0x9d,0x88,0xcc,0x50,0x24,0xa5,0xc4,0x69,0x6b,0x8d,0x92, /* ...n9...P$..ik.. */ \ - 0x81,0x48,0x48,0x82,0x4b,0x11,0x2a,0x09,0xd9,0x56,0x13,0xb7,0x03,0x02,0x4b,0x72, /* .HH.K....V....Kr */ \ - 0x2d,0x10,0x8b,0xe0,0x43,0x0a,0x9b,0xa8,0x0f,0xd1,0xe4,0x25,0xfa,0x96,0x3d,0x77, /* -...C......%..=w */ \ - 0x17,0x20,0x41,0x49,0x76,0x33,0xa9,0xff,0x54,0x33,0x02,0x40,0xec,0xde,0x73,0x3f, /* . AIv3..T3.@..s? */ \ - 0xf6,0xee,0xb9,0x77,0xf1,0xfc,0x59,0xef,0xf3,0x4f,0xf1,0xf7,0xfc,0x19,0x7d,0x4e, /* ...w..Y..O....}N */ \ - 0x17,0x32,0x48,0x55,0xb0,0x94,0x09,0x79,0x83,0xcb,0x9e,0x73,0x49,0xd3,0xdc,0x0f, /* .2HU...y...sI... */ \ - 0x6e,0xe8,0x95,0x7f,0xeb,0x67,0x41,0x2a,0x93,0x9c,0x46,0x72,0x96,0xfa,0xe9,0x9a, /* n....gA...Fr.... */ \ - 0x67,0x7f,0x32,0xb5,0x5a,0xf5,0x54,0xcd,0xf3,0x3b,0x3f,0x15,0xd0,0x10,0x88,0x38, /* g.2.Z.T..;?....8 */ \ - 0x13,0x64,0x2d,0x52,0x21,0x56,0x22,0xce,0x37,0x53,0x06,0x2a,0x59,0xa7,0x72,0xb1, /* .d-R!V".7S..Y.r. */ \ - 0xcc,0xe9,0xdf,0x74,0xd8,0xef,0x1f,0xee,0x1f,0xf6,0x0f,0xfa,0x75,0x9b,0x45,0xb0, /* ...t........u.E. */ \ - 0x8c,0x55,0xa4,0x16,0x6b,0x72,0xe2,0xa0,0x4b,0x64,0x45,0x11,0x69,0x81,0x8c,0x34, /* .U..kr..KdE.i..4 */ \ - 0x40,0x2a,0x32,0x91,0xde,0x8a,0xb0,0xbb,0x81,0xdc,0x0a,0x47,0x46,0x6d,0x46,0xb9, /* @.2........GFmF. */ \ - 0xa2,0xb5,0x2a,0x28,0x5f,0x0a,0x23,0xcb,0x2f,0x8a,0x4c,0x74,0x68,0xa5,0x42,0x39, /* ...(_.#./.Lth.B9 */ \ - 0x5f,0x77,0x28,0x80,0x19,0x1d,0xf2,0xe3,0xd0,0x80,0x86,0x32,0xcb,0x53,0x39,0x2b, /* _w(........2.S9+ */ \ - 0x72,0xf1,0xd2,0xbc,0x68,0xc9,0x36,0x69,0xf1,0x8d,0x4b,0x77,0x4b,0x11,0x93,0x58, /* r...h.6i..KwK..X */ \ - 0xcd,0x44,0x18,0x8a,0x90,0x54,0x4c,0x7e,0x4d,0xf1,0x4a,0x3f,0xa9,0x38,0x4f,0x55, /* .D...TL~M.J?.8OU */ \ - 0x14,0x89,0x94,0x54,0x6a,0x60,0xf4,0x5f,0x28,0x17,0x32,0xf7,0x23,0xca,0xe4,0x22, /* ...Tj`._(.2.#.." */ \ - 0xc6,0xad,0x36,0x2d,0x49,0x55,0x58,0x04,0x39,0xb5,0x7e,0x1e,0x8a,0x5b,0xd8,0xfe, /* ..6-IUX.9.~..[.. */ \ - 0x4b,0x1b,0x6a,0x64,0xb0,0x24,0x99,0xd5,0xe4,0x65,0x9c,0x8b,0x45,0xea,0xe7,0x50, /* K.jd.$...e..E..P */ \ - 0x8b,0x47,0x55,0x05,0x57,0xfc,0x2b,0xab,0x00,0x8e,0xa0,0xb0,0x34,0x1b,0x76,0xbb, /* .GU.W.+.....4.v. */ \ - 0xe3,0xd1,0xf5,0xae,0xed,0x61,0x2a,0x6f,0xa1,0x2e,0x53,0x45,0x1a,0x08,0x9a,0xcb, /* .....a.o..SE.... */ \ - 0x08,0x21,0xb2,0xc7,0x83,0xc3,0x3f,0xbe,0xfa,0xaa,0xdf,0x0d,0xb6,0x61,0xd0,0x7f, /* .!....?......a.. */ \ - 0x9b,0x81,0x25,0x25,0x2a,0x65,0xad,0xd0,0xe9,0x53,0xac,0xe2,0xfd,0xad,0xc3,0xa1, /* ..%%.e...S...... */ \ - 0xb6,0x97,0x63,0xca,0x46,0xd5,0xa4,0xe1,0xdd,0xfb,0x22,0x0e,0x72,0x89,0x08,0xdd, /* ..c.F.....".r... */ \ - 0xc9,0x7c,0xb9,0x13,0x26,0x01,0xab,0xd2,0x58,0xe4,0xf5,0x18,0xcc,0x11,0x2b,0x36, /* .|..&...X.....+6 */ \ - 0x76,0x0b,0x91,0xa9,0x48,0x50,0x52,0xa4,0x89,0x42,0x06,0xa9,0xb9,0xf6,0x3f,0x9d, /* v...HPR..B....?. */ \ - 0xfb,0x81,0x8c,0x17,0x06,0x92,0xa7,0x3f,0x01,0xd5,0xa5,0x4d,0x4a,0x5c,0x63,0xf1, /* .......?...MJ\c. */ \ - 0xb3,0xa5,0x2a,0xa2,0x10,0xf9,0x32,0x87,0x16,0xb8,0xc0,0x52,0x65,0x82,0x90,0x5f, /* ......2....Re.._ */ \ - 0xe5,0x25,0xf9,0x41,0xa0,0x56,0x89,0x1f,0xaf,0x19,0x3d,0x5f,0x56,0x81,0xdf,0x84, /* .%.A.V....=_V... */ \ - 0x8e,0xcd,0xf3,0xc3,0x50,0xb2,0x43,0x58,0x3c,0x19,0xe3,0xc5,0xca,0xd7,0xee,0xa5, /* ....P.CX<....... */ \ - 0x62,0xe1,0xa7,0x21,0xcb,0x21,0xd7,0xd2,0x2a,0x49,0x37,0xc1,0x54,0xb3,0x48,0x2e, /* b..!.!...I7.T.H. */ \ - 0xf4,0xcc,0x6c,0x9b,0xab,0xde,0xb9,0x4d,0x53,0xf7,0xd4,0x7b,0x63,0x4d,0x6c,0xb2, /* ..l....MS..{cMl. */ \ - 0xc6,0x43,0x1a,0xba,0x83,0xab,0x0b,0x7b,0xec,0x59,0x9e,0xe3,0x8e,0x89,0xdf,0x5e, /* .C.....{.Y.....^ */ \ - 0x4e,0xdc,0xd7,0xce,0xd0,0x1e,0xd2,0xcf,0xd6,0x94,0x9c,0xe9,0x2f,0xf4,0xc6,0xf1, /* N.........../... */ \ - 0xce,0xdd,0x2b,0xcf,0xa0,0x42,0x70,0x62,0x8d,0xbd,0x6b,0x72,0x4f,0x21,0x7f,0x4d, /* ..+..Bpb..krO!.M */ \ - 0x7f,0x76,0xc6,0xc3,0x0e,0xd9,0x98,0x62,0x4f,0xc8,0x7e,0x7b,0x39,0xb1,0xa7,0x53, /* .v.....bO.~{9..S */ \ - 0x72,0x27,0xe4,0x5c,0x5c,0x8e,0x1c,0x1b,0x43,0xce,0x78,0x30,0xba,0x1a,0x3a,0xe3, /* r'.\\...C.x0..:. */ \ - 0xb3,0x5d,0x9c,0x91,0x73,0xe1,0x18,0xa5,0x1d,0x8d,0x53,0xc7,0xbd,0xb0,0x27,0x83, /* .]..s.....S...'. */ \ - 0x73,0xfc,0xb0,0x4e,0x9c,0x91,0xe3,0x5d,0x77,0xe8,0xd4,0xf1,0xc6,0x8c,0x7b,0x0a, /* s..N...]w.....{. */ \ - 0x60,0xcb,0xc8,0x5f,0x5a,0x13,0xcf,0x19,0x5c,0x8d,0xac,0x09,0x5d,0x5e,0x4d,0x2e, /* `.._Z...\...]^M. */ \ - 0xdd,0xa9,0xdd,0x21,0xcf,0xf1,0x46,0xc6,0xab,0xb1,0x3b,0xde,0x77,0xc6,0xa7,0x13, /* ...!..F...;.w... */ \ - 0xa8,0xb5,0xd9,0xbb,0x2e,0xcc,0xc0,0x4b,0xb2,0x5f,0xe3,0x07,0x4d,0xcf,0xad,0xd1, /* .......K._..M... */ \ - 0xc8,0xc0,0x5c,0x38,0x83,0x89,0x3b,0x38,0x07,0x4b,0x9d,0xd8,0xb0,0xc9,0x3a,0x01, /* ..\8..;8.K....:. */ \ - 0x80,0xd6,0x02,0x93,0x60,0x39,0xe2,0x00,0x33,0x46,0x1d,0x9a,0x5e,0xda,0x03,0x87, /* ....`9..3F..^... */ \ - 0x1f,0xe0,0xae,0x33,0xb1,0x07,0x1e,0xfb,0x68,0x08,0xc5,0x1d,0x4f,0xed,0xbf,0x5c, /* ...3....h...O..\ */ \ - 0x61,0x1e,0xc6,0x69,0x68,0x5d,0x58,0x67,0xf6,0xb4,0x43,0x23,0x77,0xea,0x71,0x28, /* a..ih]Xg..C#w.q( */ \ - 0x61,0xba,0x8e,0x87,0xfe,0x3d,0xb4,0x3c,0xab,0x03,0x09,0x3c,0xc2,0x4d,0xe3,0x07, /* a....=.<...<.M.. */ \ - 0xd4,0x5f,0x4d,0xb4,0x91,0xfc,0x6e,0x7a,0x75,0x32,0x85,0x1b,0x57,0x9e,0x4d,0x67, /* ._M...nzu2..W.Mg */ \ - 0xae,0x3b,0x04,0x90,0x67,0x0f,0xce,0xc7,0xee,0xc8,0x3d,0xbb,0x66,0x98,0xa9,0x3d, /* .;..g.....=.f..= */ \ - 0x79,0xed,0x0c,0x58,0x01,0x5b,0x38,0x18,0x59,0xce,0xc5,0xd4,0x00,0x9d,0x5c,0x63, /* y..X.[8.Y.....\c */ \ - 0x71,0x9d,0xc9,0xd0,0x44,0xc6,0x9e,0x52,0x6b,0x1b,0xf9,0x13,0x44,0x7d,0xec,0x7a, /* q...D..Rk...D}.z */ \ - 0x26,0xe8,0x58,0x59,0xcf,0xd5,0xe2,0x43,0xfb,0xd4,0x86,0xf1,0x54,0x65,0xc6,0xc4, /* &.XY...C....Te.. */ \ - 0x76,0x4f,0xdb,0x3b,0xc8,0x1c,0x0a,0x78,0x6c,0x5f,0x8c,0x1d,0x4f,0xeb,0x87,0xb7, /* vO.;...xl_..O... */ \ - 0xde,0xc4,0x01,0x9e,0x5e,0x38,0xbc,0x70,0xf5,0xc2,0x9b,0x9c,0x05,0x3a,0xaf,0x07, /* ....^8.p.....:.. */ \ - 0xfb,0x07,0x03,0xdf,0x9c,0xdb,0x7a,0xcc,0x9a,0xc2,0x68,0xd6,0x8a,0xfc,0xe2,0xf4, /* ......z...h..... */ \ - 0x3b,0xb1,0xa6,0xce,0x94,0x7d,0xd5,0x58,0xd6,0xc0,0x83,0x8f,0xee,0xa4,0x4c,0x8b, /* ;....}.X......L. */ \ - 0x9a,0xd1,0x63,0xfb,0x6c,0xe4,0x9c,0x81,0x0d,0x6c,0xd8,0x74,0x32,0xb1,0xad,0xc1, /* ..c.l....l.t2... */ \ - 0x39,0x4b,0x55,0x89,0xb2,0xd5,0xfe,0xc6,0x99,0xda,0x9b,0x0c,0xd7,0x28,0x56,0x91, /* 9KU..........(V. */ \ - 0x2f,0xb1,0x6f,0x76,0xff,0x86,0x60,0xb0,0xea,0x79,0xa0,0x56,0x55,0x55,0xf8,0xe7, /* /.ov..`..y.VUU.. */ \ - 0x27,0xf8,0xd3,0x4a,0xed,0x28,0x92,0x2a,0xcf,0xe9,0x8d,0x52,0x61,0xa3,0xd1,0x38, /* '..J.(.....Ra..8 */ \ - 0x38,0xec,0xbd,0xe8,0xf5,0xff,0xd0,0x68,0x5c,0x25,0xa1,0xe6,0xce,0x58,0xdc,0x59, /* 8......h\%...X.Y */ \ - 0xaf,0xac,0xb7,0xac,0x1a,0x7b,0xf4,0x13,0x15,0xbf,0xde,0xf3,0x67,0xcf,0x9f,0xf5, /* .....{......g... */ \ - 0x7a,0x34,0x14,0xe0,0xa8,0x95,0x8c,0x41,0xac,0xba,0x50,0xf8,0x60,0x87,0xef,0x0b, /* z4.....A..P.`... */ \ - 0x91,0xe5,0x4c,0xe5,0xa0,0xa8,0x4c,0x86,0x22,0x85,0x11,0xcd,0x5c,0xae,0xb8,0x7c, /* ..L...L."...\..| */ \ - 0x14,0x79,0xf3,0xf9,0xb3,0x5b,0x1f,0xc4,0x84,0xdf,0x6e,0x91,0x63,0xad,0x8f,0xe9, /* .y...[....n.c... */ \ - 0x45,0xbf,0xdf,0x3f,0xa2,0x5e,0x6f,0x95,0xc1,0x3a,0x0d,0x3b,0xcd,0x15,0xea,0x1d, /* E..?.^o..:.;.... */ \ - 0xd0,0x80,0x55,0x68,0x32,0x64,0x17,0x48,0xdc,0x22,0x78,0xba,0xca,0xa1,0x00,0x04, /* ..Uh2d.H."x..... */ \ - 0x22,0xcb,0x0c,0x96,0xff,0xde,0xff,0x61,0x84,0x4a,0x06,0x28,0x38,0x4b,0x56,0x9a, /* "......a.J.(8KV. */ \ - 0xfa,0xeb,0x56,0xfb,0x48,0x9b,0x58,0x36,0x07,0x99,0x01,0x64,0x2e,0x8c,0x0b,0x14, /* ..V.H.X6...d.... */ \ - 0xb3,0x94,0x31,0x43,0x05,0xb0,0xa0,0x48,0x53,0x26,0xc4,0x99,0x60,0x46,0x03,0x79, /* ..1C...HS&..`F.y */ \ - 0xde,0xc5,0xcc,0xec,0xba,0x84,0x8a,0x2c,0xf0,0x63,0x42,0x79,0xcc,0x55,0xcc,0x30, /* .......,.cBy.U.0 */ \ - 0x3d,0xa3,0x8f,0xdf,0x0e,0x59,0xf6,0x98,0xfa,0x3b,0x5a,0x2a,0x2c,0x89,0xa0,0x18, /* =....Y...;Z.,... */ \ - 0xae,0x84,0x16,0x46,0x9a,0x65,0x99,0xa6,0x50,0x40,0xfa,0x21,0xcd,0x53,0xb5,0xa2, /* ...F.e..P@.!.S.. */ \ - 0x37,0xf2,0x54,0x72,0x59,0x2e,0x22,0xd1,0xad,0x61,0x33,0xc4,0x49,0xf6,0x18,0x1a, /* 7.TrY."..a3.I... */ \ - 0xd1,0x65,0xe6,0x67,0xdf,0x43,0x84,0x37,0x55,0x6b,0x2e,0xb6,0xb3,0x42,0x82,0xea, /* .e.g.C.7Uk...B.. */ \ - 0x95,0x1e,0x41,0x51,0xb8,0x53,0xe9,0x0d,0x9c,0xf4,0x67,0x91,0xa8,0x41,0xea,0xe1, /* ..AQ.S....g..A.. */ \ - 0xb1,0x19,0xb5,0x7f,0x00,0xe7,0x73,0x21,0x3f,0xa6,0x83,0xa3,0x72,0x0d,0x9d,0x18, /* ......s!?...r... */ \ - 0x2c,0x8f,0x54,0xe1,0x78,0xeb,0xf8,0x71,0xa8,0x83,0x2a,0x5d,0x7a,0xbd,0x46,0x91, /* ,.T.x..q...]z.F. */ \ - 0x46,0x2f,0xb5,0x1b,0x78,0xd0,0x45,0x31,0x30,0xb1,0xc7,0x10,0x57,0x21,0x1f,0xcb, /* F/..x.E10...W!.. */ \ - 0x9f,0x9a,0x09,0xa1,0x0a,0x0a,0x5d,0x5e,0x9c,0x21,0x4f,0x44,0xc5,0x8d,0x3a,0x6c, /* ......]^.!OD..:l */ \ - 0xa7,0x4f,0xf3,0xaa,0x38,0xe2,0x75,0xe0,0xa3,0xb7,0xd1,0x15,0x0d,0x11,0x4e,0x14, /* .O..8.u.......N. */ \ - 0x17,0xa6,0xb7,0x17,0x23,0x6a,0xa9,0xc4,0x54,0x9b,0xb6,0x86,0x4e,0x45,0x22,0xfc, /* ....#j..T...NE". */ \ - 0x1c,0xb8,0x29,0x32,0x20,0xe7,0xd0,0xf1,0x6f,0x53,0xab,0x34,0x82,0x84,0x23,0x73, /* ..)2 ...oS.4..#s */ \ - 0x09,0xe3,0x45,0xb4,0x7e,0x28,0x8c,0xd4,0xf7,0x5f,0xa2,0x26,0xd1,0xd5,0x64,0x44, /* ..E.~(..._.&..dD */ \ - 0x22,0x0e,0x14,0xfb,0xcc,0xbd,0x0e,0x57,0x3b,0x85,0xc5,0xa6,0xac,0x98,0xad,0x64, /* "......W;......d */ \ - 0xce,0x1b,0xc4,0xcf,0xe8,0x92,0xa9,0x91,0x65,0x76,0x70,0x36,0x36,0xef,0x6e,0xa1, /* ........evp66.n. */ \ - 0x16,0xc2,0xd0,0xa1,0x8d,0xe7,0x9d,0xd2,0xb2,0x8e,0x06,0x80,0xd8,0x8f,0xcf,0x9f, /* ................ */ \ - 0x35,0x38,0x87,0x51,0xa4,0x8b,0x84,0xb8,0x44,0xaa,0xd9,0x7b,0x11,0x60,0xd7,0x37, /* 58.Q....D..{.`.7 */ \ - 0x78,0x39,0x18,0x0c,0x09,0x5b,0x26,0xab,0xab,0x87,0x74,0xb6,0xea,0x51,0x44,0xd1, /* x9...[&...t..QD. */ \ - 0xc3,0xd6,0x48,0xcb,0x61,0x26,0x0f,0x33,0x58,0x8a,0x75,0x79,0x0d,0x8e,0x79,0x25, /* ..H.a&.3X.uy..y% */ \ - 0xea,0x2f,0x37,0xc6,0x60,0x68,0xf3,0x5c,0x9f,0x50,0x06,0xef,0xb8,0xb4,0xb5,0x3e, /* ./7.`h.\.P.....> */ \ - 0xc4,0xbb,0x67,0x22,0xbe,0x67,0x85,0x45,0xa4,0x51,0x8d,0xfd,0x03,0xe4,0x2a,0x98, /* ..g".g.E.Q...... */ \ - 0x8b,0xeb,0x7a,0x26,0x70,0x31,0x3b,0x42,0x6f,0x6e,0x4c,0x90,0xf3,0xd6,0x1d,0x16, /* ..z&p1;BonL..... */ \ - 0x40,0xdd,0x75,0xb1,0x74,0xe7,0x79,0x9e,0x4c,0xcc,0x50,0x9b,0xe0,0x7e,0x45,0x77, /* @.u.t.y.L.P..~Ew */ \ - 0x4f,0xa8,0x80,0x4f,0xbb,0x02,0xda,0xbb,0x0f,0x08,0x74,0x55,0x22,0xe2,0x56,0x8b, /* O..O......tU".V. */ \ - 0xe3,0x7a,0x7c,0xcc,0xd6,0xb5,0xbf,0x69,0x9e,0xd9,0x5e,0xf3,0x65,0x93,0x17,0xac, /* .z|....i..^.e... */ \ - 0xd9,0xa1,0x5a,0x50,0x3a,0x3a,0x51,0x3e,0x06,0xc6,0x5e,0x68,0xac,0x6a,0x12,0xe7, /* ..ZP::Q>..^h.j.. */ \ - 0xfe,0x9c,0xee,0xc4,0x5e,0xca,0x1d,0x1d,0xa7,0x86,0x63,0x7f,0x85,0x2c,0x59,0xa3, /* ....^.....c..,Y. */ \ - 0x0f,0x6b,0xad,0xfc,0x35,0xb2,0xe4,0x45,0xf7,0x05,0xe9,0x46,0x29,0x97,0xd8,0x54, /* .k..5..E...F)..T */ \ - 0x48,0x1d,0xd5,0x36,0xb2,0xf7,0x24,0x22,0xe4,0xed,0x36,0x0c,0x16,0x52,0xe5,0x56, /* H..6..$"..6..R.V */ \ - 0xbc,0x35,0xeb,0xf9,0x2b,0xa2,0xb0,0x33,0xbf,0xd5,0xd4,0xcd,0x62,0x86,0xee,0x4b, /* .5..+..3....b..K */ \ - 0xc7,0xd3,0xf3,0x2e,0x9b,0x75,0x57,0xa0,0xe6,0x01,0xca,0x8e,0x86,0x4f,0x1e,0xba, /* .....uW......O.. */ \ - 0x5f,0x15,0x3e,0x1d,0x86,0x32,0x1a,0xe6,0x66,0xae,0x95,0x60,0xe4,0x67,0xf9,0x00, /* _.>..2..f..`.g.. */ \ - 0x1b,0x55,0xb3,0x4d,0x95,0xd7,0xdd,0x85,0xc8,0xf9,0x61,0xb3,0xec,0x9b,0xa5,0xd0, /* .U.M......a..... */ \ - 0x9c,0xcf,0xd4,0xcb,0x3b,0xc6,0x67,0x0e,0x37,0x43,0x15,0xbb,0x77,0x93,0x22,0x5b, /* ....;.g.7C..w."[ */ \ - 0x56,0x61,0x60,0xe9,0xfb,0x92,0xbf,0x46,0x4a,0x25,0x19,0x29,0xee,0xf4,0x99,0x16, /* Va`....FJ%.).... */ \ - 0xe0,0xb7,0x6e,0x4e,0x1f,0x54,0x8c,0xb0,0xaa,0x54,0x08,0x26,0x92,0x7a,0x0d,0x16, /* ..nN.T...T.&.z.. */ \ - 0xd3,0x7b,0x1b,0x6c,0xc2,0x59,0x2d,0x51,0xa5,0x6a,0x3b,0x3e,0x41,0x67,0xcd,0x00, /* .{.l.Y-Q.j;>Ag.. */ \ - 0x2d,0xc4,0xb9,0x51,0x6e,0x4d,0x50,0xf3,0x6f,0xd9,0xb8,0x3c,0x28,0x22,0x3f,0xc1, /* -..QnMP.o..<("?. */ \ - 0x91,0x61,0xbb,0xb9,0x26,0x5c,0x07,0xd4,0xdc,0x54,0x87,0x4d,0xfd,0x32,0x3c,0x01, /* .a..&\...T.M.2<. */ \ - 0x5f,0x60,0xe5,0x6c,0xcd,0x37,0xcc,0x46,0xe3,0xdd,0x92,0x40,0xdd,0xc4,0x21,0x12, /* _`.l.7.F...@..!. */ \ - 0xf1,0x22,0x5f,0x1e,0x91,0xa4,0xaf,0x51,0x24,0x48,0xee,0xef,0x23,0x27,0x1b,0xcc, /* ."_....Q$H..#'.. */ \ - 0x3a,0x8d,0xad,0x89,0x9b,0xd9,0xd9,0x52,0xce,0x4b,0x33,0x79,0xd3,0xfe,0xae,0x9c, /* :......R.K3y.... */ \ - 0xc2,0x22,0x0d,0x4d,0xdf,0x32,0x2e,0x84,0x1e,0x2d,0x8d,0x7c,0x72,0xb1,0x68,0xbf, /* .".M.2...-.|r.h. */ \ - 0x72,0xbf,0xb6,0xac,0x5a,0xaa,0xc1,0x1e,0x35,0xaa,0xad,0x04,0x5a,0x45,0x71,0x10, /* r...Z...5...ZEq. */ \ - 0x21,0x07,0x53,0xeb,0xab,0xa4,0xaa,0x2c,0xe2,0x02,0xb8,0xc6,0xc9,0x1c,0xcc,0x72, /* !.S....,.......r */ \ - 0x7c,0x4c,0x5f,0xd2,0x67,0x9f,0xd1,0xc3,0x29,0x19,0x46,0x8b,0x8c,0x87,0x71,0x50, /* |L_.g...).F...qP */ \ - 0xd6,0x79,0xde,0xa8,0x14,0xc8,0x9c,0x96,0x3e,0xd7,0xa9,0x1a,0xfb,0xde,0xa5,0xa8, /* .y......>....... */ \ - 0x00,0x55,0xbd,0x2e,0xa2,0x5c,0x4f,0x87,0xe6,0x7c,0x9d,0x08,0xb5,0x35,0x60,0x23, /* .U...\O..|...5`# */ \ - 0xd1,0x66,0xe4,0xbd,0x6a,0xa5,0xf7,0xda,0x06,0xbf,0xf1,0x68,0xde,0x13,0xa6,0x9b, /* .f..j......h.... */ \ - 0x62,0x85,0x0d,0xda,0xad,0x0a,0x9d,0x1d,0xe9,0xe3,0x94,0x09,0x6f,0x63,0x4b,0x0a, /* b...........ocK. */ \ - 0x1f,0x57,0x6e,0x0a,0xd1,0x5e,0xe5,0x5b,0xa3,0x42,0xe3,0x78,0x97,0x88,0x27,0x6b, /* .Wn..^.[.B.x..'k */ \ - 0x27,0x7c,0x42,0xbc,0x2b,0x63,0xdc,0xce,0x3d,0x94,0xcb,0xe3,0x47,0x81,0xab,0x0c, /* '|B.+c..=...G... */ \ - 0xf4,0xc4,0x0f,0x79,0x65,0x10,0xe2,0xd6,0xd2,0x0d,0xc0,0x9d,0xcc,0xb8,0x3e,0xe3, /* ...ye.........>. */ \ - 0x3c,0x8b,0x0a,0x8a,0xed,0xc1,0x07,0x3c,0xe6,0x05,0xba,0xf5,0x23,0xf0,0xb0,0xc9, /* <......<....#... */ \ - 0x07,0x5c,0x78,0xcb,0x35,0x1e,0x22,0xfb,0x33,0x9c,0x88,0x4d,0x12,0x3d,0x35,0xbe, /* .\x.5.".3..M.=5. */ \ - 0xad,0x1d,0x3b,0x6b,0xb5,0x97,0xe9,0x7e,0x90,0x0b,0x0e,0xb7,0x24,0x55,0xf5,0xe8, /* ..;k...~....$U.. */ \ - 0xf0,0x62,0xc5,0x6c,0x4b,0xa6,0xaa,0xc5,0xaa,0x00,0xcd,0x6c,0x63,0x4c,0xe3,0x41, /* .b.lK......lcL.A */ \ - 0xd9,0xad,0xe6,0x98,0xf2,0xfb,0x30,0x34,0xdb,0x57,0x25,0xc6,0xd1,0xe3,0x0c,0xbf, /* ......04.W%..... */ \ - 0xe7,0x4b,0x3d,0x5d,0xf7,0x6e,0x05,0xdd,0xf9,0x92,0xbb,0x00,0xcd,0x1f,0x07,0x28, /* .K=].n.........( */ \ - 0x75,0x90,0x08,0x4b,0x13,0x91,0xcf,0x9b,0xbe,0xb5,0xcc,0xe7,0x6a,0x93,0x7c,0xbd, /* u..K........j.|. */ \ - 0xed,0x60,0xeb,0x29,0x1a,0xdf,0xaa,0x1b,0x93,0x8c,0x45,0xc6,0x87,0xfc,0x9d,0x4f, /* .`.)......E....O */ \ - 0x02,0x3a,0xdc,0x32,0x4e,0x8a,0x4f,0x97,0xa3,0x9a,0xd9,0x77,0x92,0xaf,0x9c,0x0a, /* .:.2N.O....w.... */ \ - 0x63,0xac,0x48,0xa4,0xf9,0xc6,0x16,0xf3,0xda,0xe7,0x77,0xad,0x66,0x19,0x52,0x9a, /* c.H.......w.f.R. */ \ - 0xfb,0x12,0xfb,0xb8,0xfb,0x5d,0x3c,0x50,0xc8,0xab,0x4d,0x83,0x16,0x82,0x36,0x23, /* .....].F.7h< */ \ - 0xbb,0x86,0x03,0x5a,0xb5,0x46,0x9a,0x47,0x36,0x3d,0xa9,0xee,0x9e,0xcd,0x27,0x24, /* ...Z.F.G6=....'$ */ \ - 0x94,0x8e,0x0f,0x31,0x13,0x19,0x6a,0xfa,0x0f,0x83,0x42,0xb9,0xc4,0xc8,0x19,0x00, /* ...1..j...B..... */ \ - 0x00,0x1f,0x8b,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xad,0x8f,0xf9,0x4f,0x93, /* ..............O. */ \ - 0x07,0x00,0x40,0xbf,0x1e,0x94,0x72,0x14,0x5a,0xb4,0xd0,0x72,0xd9,0x53,0x59,0x45, /* ..@...r.Z..r.SYE */ \ - 0x43,0x98,0x28,0xe0,0xd5,0xd2,0xd2,0x43,0x18,0xf9,0xc8,0x40,0x04,0x06,0x16,0x42, /* C.(....C...@...B */ \ - 0x8b,0x32,0xc0,0x82,0x58,0x04,0xa7,0x2d,0x50,0x11,0xb9,0x2a,0x47,0x05,0x0a,0x52, /* .2..X..-P...G..R */ \ - 0x50,0xca,0x74,0x14,0x8b,0x12,0x04,0x65,0x0a,0xca,0xa1,0x96,0xab,0xae,0x20,0x90, /* P.t....e...... . */ \ - 0x62,0x00,0x15,0x5c,0x16,0xae,0xb9,0x45,0xdd,0x70,0xfd,0x16,0xb3,0x7f,0x61,0xef, /* b..\...E.p....a. */ \ - 0x87,0x97,0xbc,0x1f,0x1f,0x4f,0xc0,0xf5,0x0f,0x48,0xa8,0x05,0x18,0xc0,0x14,0x0d, /* .....O...H...... */ \ - 0x90,0xc9,0x64,0x7d,0x7d,0x7d,0x16,0xac,0x1b,0xb4,0xbe,0x01,0x4d,0xbc,0x58,0x5f, /* ..d}}}......M.X_ */ \ - 0x5f,0x97,0x48,0x24,0x13,0x13,0x13,0xd0,0xfc,0x22,0x16,0x8b,0xb5,0x90,0x18,0x16, /* _.H$....."...... */ \ - 0x9f,0x40,0x8d,0x46,0x03,0x82,0xa0,0x85,0x29,0x10,0x0a,0x85,0x24,0x12,0x49,0xa9, /* .@.F....)...$.I. */ \ - 0x54,0xce,0xcf,0xcf,0x43,0xf2,0x42,0xbd,0x5e,0xef,0xe3,0xe3,0x63,0x91,0x5d,0x84, /* T...C.B.^...c.]. */ \ - 0x34,0x2d,0x50,0xdf,0x13,0x0b,0x78,0xcc,0x22,0x91,0x5a,0x84,0xc9,0x90,0xb2,0x1a, /* 4-P...x.".Z..... */ \ - 0x52,0xaa,0x20,0x7d,0xa7,0x45,0x92,0xcd,0x64,0x32,0x2d,0x80,0x3d,0x04,0x41,0x00, /* R. }.E..d2-.=.A. */ \ - 0x00,0xfc,0xe7,0xff,0x17,0xf2,0x5f,0x48,0x18,0x00,0xd0,0x00,0xef,0x2f,0xf1,0xe5, /* ......_H...../.. */ \ - 0x09,0x40,0x41,0xcc,0x4a,0x09,0xdf,0xdb,0x55,0xf9,0xac,0x25,0xf3,0x79,0x6a,0xa0, /* .@A.J...U..%.yj. */ \ - 0xc6,0x78,0x33,0xeb,0x48,0x7b,0x8c,0x7e,0x46,0x27,0x1d,0x59,0xcd,0xbd,0x84,0x2c, /* .x3.H{.~F'.Y..., */ \ - 0x61,0x63,0x19,0x35,0x56,0x0e,0x0e,0xaf,0x47,0xd2,0x7b,0xcb,0x10,0x25,0x4f,0x42, /* ac.5V...G.{..%OB */ \ - 0xf5,0x97,0xdc,0x91,0x64,0x20,0xf1,0xec,0x26,0x14,0xe1,0x9c,0x24,0x55,0x88,0x6c, /* ....d ..&...$U.l */ \ - 0x11,0x34,0x94,0x0d,0x46,0x5e,0x56,0x2e,0x40,0xdb,0x5d,0xac,0x12,0x39,0xd3,0x30, /* .4..F^V.@.]..9.0 */ \ - 0x78,0x92,0xb2,0xbe,0x1e,0x59,0x50,0x5d,0x95,0x03,0xb3,0x6a,0xd0,0xca,0x1a,0x9b, /* x....YP]...j.... */ \ - 0x9a,0xec,0x5a,0x75,0xa7,0x6e,0xde,0x6a,0x72,0xff,0xc6,0x8a,0x44,0x25,0x59,0xf3, /* ..Zu.n.jr...D%Y. */ \ - 0xac,0x30,0xf7,0x5a,0xda,0x75,0x88,0xd3,0x52,0x17,0x8a,0x5b,0x95,0x1d,0x5a,0x0f, /* .0.Z.u..R..[..Z. */ \ - 0xff,0x3e,0x04,0x47,0x1d,0x57,0x73,0x1d,0xc7,0xa9,0xe7,0x1f,0xb5,0x6e,0x53,0x6c, /* .>.G.Ws......nSl */ \ - 0xa1,0x98,0x2b,0xa5,0x06,0x33,0x41,0xec,0x10,0x8a,0x32,0x51,0x9d,0x82,0xad,0x96, /* ..+..3A...2Q.... */ \ - 0x8d,0x2f,0xeb,0xd1,0x0a,0x3b,0xb3,0x19,0xa9,0x18,0x78,0x4f,0x14,0x7b,0x86,0x74, /* ./...;....xO.{.t */ \ - 0x99,0xa6,0xd8,0x63,0xa6,0x99,0xae,0xd3,0x11,0xba,0xf1,0x7d,0x39,0x94,0xed,0x93, /* ...c.......}9... */ \ - 0xcf,0xe5,0xe0,0xa0,0x9c,0x05,0xc7,0xd2,0x17,0xdf,0x79,0xb3,0x70,0xe8,0x65,0x2e, /* ..........y.p.e. */ \ - 0x3a,0x00,0xb8,0xfe,0xa6,0xaf,0x9c,0xc4,0x3a,0x44,0xc2,0xdf,0x4d,0x42,0xa0,0xd8, /* :.......:D..MB.. */ \ - 0xb6,0x04,0xaf,0xd9,0x3b,0x2c,0x79,0xf5,0xce,0xe8,0xfc,0x22,0x66,0x3e,0x15,0x2d, /* ....;,y...."f>.- */ \ - 0x0b,0x22,0x64,0x71,0x88,0x5b,0xb4,0xa3,0x50,0xb9,0xa3,0xd7,0x15,0x02,0xa8,0x6f, /* ."dq.[..P......o */ \ - 0x1e,0x10,0x92,0x29,0xae,0x0f,0x85,0xe2,0x82,0xca,0x52,0x2a,0x68,0x6b,0x03,0x9c, /* ...)......R.hk.. */ \ - 0xf9,0x6d,0x0f,0xb9,0xb7,0x29,0x8c,0x7d,0x6b,0xca,0xdd,0x00,0xc7,0x3f,0x08,0x3c, /* .m...).}k....?.< */ \ - 0x17,0x0d,0xdc,0x98,0x81,0x47,0xa4,0xe1,0x61,0x0b,0xf6,0x80,0xcd,0x85,0xf4,0xa1, /* .....G..a....... */ \ - 0xc0,0x1b,0xfd,0x93,0x4d,0xe1,0x12,0x71,0xe0,0x1c,0x7e,0xb1,0xdf,0xbe,0x90,0x06, /* ....M..q..~..... */ \ - 0xce,0x0a,0x46,0x8a,0x76,0xb6,0x73,0x6d,0x32,0x79,0x83,0xaa,0xb6,0xcb,0xac,0x44, /* ..F.v.sm2y.....D */ \ - 0x6e,0xf9,0x12,0x8a,0xbf,0xf3,0x0a,0x32,0x76,0xe8,0x94,0xb9,0x92,0x6f,0x0f,0xd3, /* n......2v....o.. */ \ - 0x78,0xa4,0x65,0xdb,0x31,0xfc,0x8a,0x85,0xc6,0x66,0xaa,0x75,0x2b,0xbd,0xb6,0x30, /* x.e.1....f.u+..0 */ \ - 0xec,0xda,0xd7,0x9d,0xd4,0x78,0xd7,0xed,0x2c,0xf2,0xef,0x89,0xb1,0xe4,0xc8,0xd8, /* .....x..,....... */ \ - 0xa3,0x18,0xdf,0x95,0xa9,0xc7,0x89,0x3b,0x0e,0xc7,0xb6,0x11,0xd7,0x96,0x93,0xef, /* .......;........ */ \ - 0xff,0x48,0x6e,0x67,0x2f,0xac,0x0d,0xf8,0xda,0xaf,0x33,0x74,0x59,0x83,0x3e,0xcc, /* .Hng/.....3tY.>. */ \ - 0x14,0xda,0xed,0xe3,0x2e,0x81,0x9b,0x99,0xf0,0x2c,0xfe,0x6d,0x27,0xd6,0x8a,0x77, /* .........,.m'..w */ \ - 0x67,0x0c,0x65,0x7a,0xac,0xe0,0x57,0x91,0xc2,0x37,0x63,0x74,0x78,0xc8,0x91,0x7c, /* g.ez..W..7ctx..| */ \ - 0xf8,0xfa,0xb8,0xe2,0x51,0xf6,0x87,0xdc,0x8d,0xde,0xee,0xd8,0xa2,0x03,0xc1,0x93, /* ....Q........... */ \ - 0x47,0x1b,0xa3,0x9d,0x1f,0xa3,0xae,0x8a,0x5f,0x61,0xac,0x8f,0xe5,0x04,0x7f,0x27, /* G......._a.....' */ \ - 0x9a,0x3b,0xeb,0x90,0x52,0xa8,0x48,0x88,0xbb,0x8f,0xdf,0x56,0xc0,0x09,0x65,0xf3, /* .;..R.H....V..e. */ \ - 0x0e,0x68,0x55,0xcd,0xd0,0x74,0xdc,0x27,0x8f,0x4c,0x97,0x83,0x22,0xdd,0xfb,0x46, /* .hU..t.'.L.."..F */ \ - 0xee,0x92,0x3f,0x62,0x0e,0xb1,0x7c,0x5f,0xb5,0x90,0xb3,0x58,0xe6,0x37,0x9b,0x04, /* ..?b..|_...X.7.. */ \ - 0x44,0x1a,0xaf,0xe3,0x70,0x89,0x7b,0x9b,0xd3,0xf6,0x19,0xba,0x2b,0x0a,0x93,0x49, /* D...p.{.....+..I */ \ - 0x1d,0x63,0x59,0xd6,0x7e,0x93,0x09,0x68,0xd7,0x15,0x6d,0x1e,0xf1,0x2e,0x36,0x83, /* .cY.~..h..m...6. */ \ - 0x88,0xa4,0x19,0x93,0xcb,0xc1,0xcf,0x27,0xde,0x27,0x8a,0x30,0x86,0xa1,0xd7,0x05, /* .......'.'.0.... */ \ - 0xc4,0xab,0x4f,0x45,0xe7,0x0e,0xc4,0x7b,0xd5,0x10,0x3f,0x48,0x10,0xaf,0xe2,0x3d, /* ..OE...{..?H...= */ \ - 0x6a,0x5f,0x34,0x84,0xf7,0x23,0x05,0x1c,0x55,0x10,0xf8,0xa7,0x1a,0xfb,0x55,0x4c, /* j_4..#..U.....UL */ \ - 0xce,0x94,0xe8,0x98,0x74,0x76,0x2a,0x7b,0x9f,0xd3,0xa2,0x9a,0x7b,0xdc,0xb9,0xe2, /* ....tv.{....{... */ \ - 0x28,0x9c,0x5e,0x27,0x6a,0x16,0x5f,0x8e,0x04,0x87,0x51,0x98,0x0a,0x42,0xbe,0xf5, /* (.^'j._...Q..B.. */ \ - 0x3f,0xaa,0x9e,0x28,0x7f,0xd1,0x67,0x3f,0x64,0x03,0x8d,0xb3,0xb7,0x2c,0xb6,0xb7, /* ?..(..g?d....,.. */ \ - 0x4c,0xf8,0xa2,0x04,0xdc,0xed,0xf5,0xf2,0x2a,0x03,0x55,0x4b,0x2d,0xd9,0xff,0xe4, /* L.........UK-... */ \ - 0x26,0x2f,0xa3,0xc8,0x10,0x9c,0x07,0xa7,0xec,0xe5,0xbc,0x05,0xa8,0x6a,0x98,0x3a, /* &/...........j.: */ \ - 0xbc,0x51,0x40,0x1b,0x4c,0x99,0xa9,0x00,0x01,0xfd,0xb8,0x3c,0xbb,0x8e,0xdb,0x79, /* .Q@.L......<...y */ \ - 0x52,0x6d,0x13,0x72,0x3e,0xd5,0xb6,0xff,0x2e,0x90,0xa4,0x15,0x14,0x53,0xdd,0xcd, /* Rm.r>........S.. */ \ - 0xb8,0x8e,0x1a,0x24,0xcd,0x04,0x5b,0x0b,0x78,0xce,0x10,0x1b,0x7c,0x7b,0x57,0x42, /* ...$..[.x...|{WB */ \ - 0x88,0xba,0x93,0x2d,0x44,0xc1,0x11,0x97,0x96,0xd3,0x70,0xaf,0x2b,0x90,0xb6,0x9c, /* ...-D.....p.+... */ \ - 0x06,0x3c,0xe5,0x87,0x99,0x9a,0xce,0x44,0xa6,0x64,0xd2,0x4b,0x9a,0x23,0x53,0xe2, /* .<.....D.d.K.#S. */ \ - 0xa6,0x55,0xdb,0xff,0x4e,0xa1,0x37,0xfc,0x74,0xcd,0xd3,0xb0,0xfa,0x30,0xd8,0x98, /* .U..N.7.t....0.. */ \ - 0x1b,0xa5,0xfe,0x7c,0x87,0x58,0x8a,0x38,0x17,0x27,0xc9,0xd3,0xd4,0xb7,0x6e,0x75, /* ...|.X.8.'....nu */ \ - 0x46,0xf6,0x2c,0xb8,0x99,0x53,0x97,0x23,0xcf,0x36,0x70,0x39,0x3d,0x1f,0xdb,0xda, /* F.,..S.#.6p9=... */ \ - 0xc2,0xe1,0x6d,0xf8,0x7b,0xb6,0x0e,0x19,0x75,0xfd,0xdd,0xf4,0x3b,0xd3,0x15,0x85, /* ..m.{...u...;... */ \ - 0xa5,0x9f,0x04,0x75,0x5c,0x5c,0x82,0x69,0x57,0xc8,0xe8,0x0f,0xfd,0xa3,0x41,0x5b, /* ...u\\.iW.....A[ */ \ - 0x37,0xe4,0xcf,0x4c,0x7b,0x98,0x95,0x3c,0xdf,0xec,0x88,0x31,0x58,0xb4,0x28,0x22, /* 7..L{..<...1X.(" */ \ - 0x0f,0x74,0xc3,0xa7,0x85,0xc1,0xcf,0xcf,0x28,0xbe,0x6d,0xdd,0x4f,0x77,0xf2,0xe3, /* .t......(.m.Ow.. */ \ - 0x1f,0x99,0x5b,0xd2,0xb4,0x73,0xe3,0x0e,0xc6,0xb0,0x11,0x67,0x56,0x15,0xe1,0x21, /* ..[..s.....gV..! */ \ - 0x4e,0x94,0xf4,0x20,0x29,0xe7,0x69,0xd7,0xf4,0x89,0xa8,0x5d,0x8e,0xda,0x8d,0x67, /* N.. ).i....]...g */ \ - 0x6f,0x4e,0x78,0x10,0x1a,0xae,0x7d,0x98,0xe3,0xa5,0xfe,0x31,0x47,0xcb,0xed,0x12, /* oNx...}....1G... */ \ - 0xf0,0x75,0x14,0xe3,0x6a,0x37,0xce,0xbc,0xc0,0xbb,0x8c,0x8a,0x32,0x87,0xa7,0xcf, /* .u..j7......2... */ \ - 0xcb,0x76,0xec,0x46,0x8e,0x74,0x28,0xf2,0x7b,0x5e,0x17,0xf7,0xfd,0xe2,0x4f,0x86, /* .v.F.t(.{^....O. */ \ - 0x03,0xe8,0x80,0xb7,0x15,0xa1,0xe9,0x97,0x10,0x0f,0xe2,0x2f,0x04,0x58,0x6b,0xf6, /* .........../.Xk. */ \ - 0xec,0x66,0x56,0x35,0xd6,0x1c,0xaa,0x76,0xef,0xf0,0x12,0xb2,0xde,0xb5,0xd6,0x7b, /* .fV5...v.......{ */ \ - 0x0e,0x13,0x50,0x01,0xc2,0xbc,0xa5,0xf6,0xe9,0x74,0xfb,0xcd,0xd5,0x9e,0x77,0xb7, /* ..P......t....w. */ \ - 0x37,0xd7,0x7e,0xfe,0xe8,0x19,0x8c,0x05,0xf6,0xff,0x0b,0xa6,0x2b,0xee,0xb4,0xef, /* 7.~.........+... */ \ - 0x04,0x00,0x00,0x1f,0x8b,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6d,0x54,0xdb, /* .............mT. */ \ - 0x6e,0xe3,0x20,0x10,0xfd,0x15,0x4b,0x51,0xdf,0xea,0xc8,0x97,0x3a,0x8d,0xf0,0x53, /* n. ...KQ....:..S */ \ - 0x7f,0x62,0x5f,0x2b,0x6c,0xc6,0x09,0x5b,0x0c,0x16,0xe0,0xb4,0x59,0x94,0x7f,0xdf, /* .b_+l..[....Y... */ \ - 0x01,0x63,0x87,0x28,0x7d,0xb1,0xf0,0x30,0x67,0x2e,0xe7,0xcc,0xd0,0x29,0x76,0x75, /* .c.(}..0g....)vu */ \ - 0x83,0x92,0x36,0x1f,0xe8,0xc8,0xc5,0x95,0xfc,0x01,0xcd,0xa8,0xa4,0xaf,0x1f,0x9a, /* ..6............. */ \ - 0x53,0xf1,0x6a,0xa8,0x34,0xb9,0x01,0xcd,0x87,0x76,0xa4,0xfa,0xc4,0x25,0x29,0x32, /* S.j.4....v...%)2 */ \ - 0x3a,0x5b,0xd5,0x4e,0x94,0x31,0x2e,0x4f,0xf8,0x5b,0x64,0x55,0x31,0xfd,0xb4,0xdf, /* :[.N.1.O.[dU1... */ \ - 0x9c,0xd9,0x33,0x79,0x2f,0xf0,0x7c,0xdb,0x4d,0xf4,0x04,0xae,0xa3,0xfd,0xd7,0x49, /* ..3y/.|.M......I */ \ - 0xab,0x59,0x32,0xb2,0x1b,0x86,0x61,0x83,0x04,0xf7,0x90,0xd2,0xf0,0x7f,0x40,0xca, /* .Y2...a.......@. */ \ - 0x6a,0xb2,0x0b,0x22,0xb3,0xcc,0x25,0xf6,0xc2,0xdb,0x2d,0xb7,0x02,0xdc,0x0a,0x7d, /* j.."..%...-....} */ \ - 0x5b,0x91,0xdf,0xc0,0x4f,0x67,0xeb,0xd3,0xb5,0xbd,0x12,0x4a,0x93,0x5d,0x81,0xc7, /* [...Og.....J.].. */ \ - 0xa5,0xc4,0xbc,0x53,0xd6,0xaa,0x91,0x94,0x0d,0x7a,0x9f,0x17,0xc7,0xf2,0xe0,0xcb, /* ...S.....z...... */ \ - 0x0a,0xc1,0xb2,0xbd,0x80,0xc1,0xba,0x41,0x28,0x6a,0x89,0x3f,0xb6,0x16,0x7e,0x6c, /* .......A(j.?..~l */ \ - 0x4e,0x05,0x3f,0xc9,0xf0,0x7f,0xdb,0x0d,0x4a,0x59,0xd0,0x2e,0xc1,0xae,0xc5,0xe7, /* N.?.....JY...... */ \ - 0x56,0x4d,0xa4,0x4e,0xfe,0x3d,0x80,0x34,0x89,0x41,0x07,0x8c,0xb7,0xc4,0xc2,0x8e, /* VM.N.=.4.A...... */ \ - 0xc7,0x63,0xd2,0xed,0xfe,0xbd,0x81,0xf1,0xb6,0x1b,0x41,0xce,0x69,0x09,0x0b,0x7b, /* .c........A.i..{ */ \ - 0x65,0x53,0x3c,0x45,0xaa,0x02,0xa1,0x3d,0x06,0x00,0x69,0xdd,0xe2,0x77,0x38,0xa4, /* eS_.k.1r. */ \ - 0x90,0xb5,0xf3,0x3b,0x07,0x97,0xe2,0x31,0xde,0xc0,0x67,0xd8,0x71,0xda,0x1b,0x57, /* ...;...1..g.q..W */ \ - 0x05,0x97,0x18,0xf4,0xf6,0x11,0xcc,0x0d,0x7d,0x33,0x19,0xe6,0xec,0x24,0xa2,0xc8, /* ........}3...$.. */ \ - 0xba,0xf4,0x52,0x1a,0xaa,0x3e,0x36,0x08,0x4e,0x0c,0x18,0x8e,0x8b,0xeb,0x7e,0xed, /* ..R..>6.N.....~. */ \ - 0xef,0xd0,0x6f,0x69,0x30,0x47,0x67,0x6b,0x80,0x98,0x06,0x1c,0x20,0x86,0xd6,0x50, /* ..oi0Ggk.... ..P */ \ - 0xae,0x22,0x54,0x21,0x2c,0x08,0x0a,0xb7,0xba,0xdb,0xbb,0x58,0xe1,0x29,0x33,0x72, /* ."T!,......X.)3r */ \ - 0xb4,0x01,0x2b,0x5b,0x62,0x2a,0xb7,0x15,0x80,0xa2,0x5e,0xcb,0x95,0x2f,0x61,0x96, /* ..+[b.....^../a. */ \ - 0x07,0x20,0xe2,0xd9,0x1e,0xdc,0xf1,0xba,0x04,0x65,0x7b,0xf2,0xdd,0x53,0x9d,0xd3, /* . .......e{..S.. */ \ - 0xc1,0xde,0x6b,0x3b,0x50,0x31,0x5d,0x43,0x10,0x7a,0x5e,0xd4,0xbe,0x8b,0xab,0x9c, /* ..k;P1]C.z^..... */ \ - 0xe5,0xcc,0x84,0x0e,0x02,0x53,0xe1,0x30,0x0c,0x2e,0x8f,0x8f,0x57,0x4a,0x6c,0xd5, /* .....S.0....WJl. */ \ - 0xb1,0x4f,0x9d,0xeb,0x93,0x83,0x98,0xd0,0x4e,0x2a,0x6c,0x98,0x04,0x9c,0x85,0x14, /* .O......N.l..... */ \ - 0x74,0xe5,0xd5,0x9c,0xe5,0x05,0x10,0x4b,0x7c,0x49,0x55,0x7d,0xe7,0x0b,0xfc,0xa3, /* t......K|IU}.... */ \ - 0x8a,0xb3,0x75,0x80,0x73,0x61,0x7d,0x03,0x23,0x1c,0xba,0xb1,0xb2,0x9e,0x51,0x4e, /* ..u.sa}.#.....QN */ \ - 0x34,0x35,0x5f,0xfa,0xa6,0xb0,0x6c,0x7f,0xb0,0x7f,0xe6,0x5f,0x29,0x9b,0x0f,0xee, /* 45_...l...._)... */ \ - 0xd1,0xf7,0x10,0x60,0x01,0x0b,0x02,0x14,0xa3,0x04,0x6d,0x2b,0x57,0x53,0x32,0x09, /* ...`......m+WS2. */ \ - 0x5b,0x42,0xc8,0x32,0x0b,0x61,0x97,0x05,0x99,0x4b,0x3b,0x58,0xf0,0xb5,0xff,0x03, /* [B.2.a...K;X.... */ \ - 0xc2,0x6b,0x73,0x8e,0x5b,0xca,0x93,0xf2,0x3d,0x09,0xb2,0x62,0x59,0x97,0xbf,0x55, /* .ks.[...=..bY..U */ \ - 0xe9,0x44,0xb1,0x63,0x55,0xfd,0xe3,0xa8,0x8c,0x52,0x33,0x8f,0x18,0x6e,0xb5,0xe4, /* .D.cU....R3..n.. */ \ - 0x93,0xa1,0xcb,0xc4,0x4c,0x8c,0x53,0xda,0xca,0xf2,0xba,0x36,0x67,0xb2,0xd3,0x43, /* ....L.S....6g..C */ \ - 0x62,0xe5,0x77,0x47,0x6a,0x64,0x1b,0x84,0x15,0xc5,0xdf,0x86,0xda,0x39,0x94,0x28, /* b.wGjd.......9.( */ \ - 0x79,0xb6,0x6d,0xc2,0xd0,0xb4,0x30,0x52,0xfb,0xbb,0x79,0x4a,0x0f,0xd6,0x36,0x4c, /* y.m...0R..yJ..6L */ \ - 0x07,0x61,0x7a,0xe4,0x18,0x76,0x59,0xcb,0x65,0xf7,0x12,0x26,0x60,0xbe,0x87,0xa2, /* .az..vY.e..&`... */ \ - 0x1c,0x38,0x70,0xa1,0x5e,0xee,0xdb,0x93,0xc5,0x94,0x71,0x30,0x82,0x58,0x9b,0x77, /* .8p.^.....q0.X.w */ \ - 0x0e,0xfc,0x87,0x8b,0x33,0xb2,0x50,0x2c,0x36,0x48,0x22,0x57,0x98,0xb0,0x49,0xc7, /* ....3.P,6H"W..I. */ \ - 0x25,0x62,0x15,0x71,0x65,0x96,0xdf,0xcf,0x68,0x91,0xff,0x30,0xa3,0xd7,0x0a,0xd7, /* %b.qe...h..0.... */ \ - 0xb8,0x6b,0x71,0xdc,0x5b,0x73,0xc6,0xab,0xf5,0x69,0x85,0xd0,0xd7,0xf6,0x85,0x99, /* .kq.[s...i...... */ \ - 0xcc,0x28,0xd8,0xe7,0x01,0x09,0x0f,0x1e,0xda,0xd5,0x3a,0x0e,0x01,0x9f,0x06,0xf1, /* .(........:..... */ \ - 0xfc,0xaa,0xf0,0xe8,0xf1,0x5d,0xcc,0xb7,0x15,0x44,0xc2,0xe4,0xf9,0xad,0x5b,0x04, /* .....]...D....[. */ \ - 0xde,0xa3,0xf8,0x48,0x0b,0x4a,0x6b,0x5c,0x30,0xb1,0x9a,0xc5,0x8b,0xb8,0x73,0x98, /* ...H.Jk\0.....s. */ \ - 0xf2,0xc7,0x30,0xc1,0xde,0x21,0xb3,0x28,0xe4,0xa1,0xbe,0xf5,0x04,0xf9,0x2b,0x99, /* ..0..!.(......+. */ \ - 0x78,0x6e,0x27,0x40,0x42,0x58,0x06,0xb9,0x71,0x67,0x40,0x19,0x61,0x9a,0xfc,0xb8, /* xn'@BX..qg@.a... */ \ - 0x7c,0xc3,0xb9,0xf7,0xda,0xfc,0x96,0x71,0x0d,0x16,0x52,0x0d,0x4e,0x96,0x6c,0xf1, /* |......q..R.N.l. */ \ - 0x0e,0x7c,0xa9,0x3a,0xae,0xa6,0xa9,0x3c,0xf8,0x61,0x5a,0xbd,0x33,0xea,0x48,0xd4, /* .|.:...<.aZ.3.H. */ \ - 0xa4,0x8e,0x06,0x77,0x96,0x66,0x6e,0x8a,0x23,0xf9,0xbe,0xb8,0x77,0x63,0xbb,0x59, /* ...w.fn.#...wc.Y */ \ - 0x44,0x37,0xad,0x19,0x29,0x52,0xea,0x17,0xd5,0xac,0xa2,0xdd,0x42,0x53,0x3a,0x22, /* D7..)R......BS:" */ \ - 0x7d,0xfe,0x07,0x99,0x00,0xc1,0x7c,0xbc,0x07,0x00,0x00 /* }.....|.... */ - - -}; - -/************************************** - * MPFS2 C linkable symbols - **************************************/ -// The entire data array is defined as a single variable to -// ensure that the linker does not reorder the data chunks in Flash when compiler -// optimizations are turned on. -struct MEDIA_STORAGE_PARTITION_INFO -{ - const char* partName; // name that identifies the partition - // valid names: "mpfs2", "tcpip_storage"; - unsigned long partStartOffset; // the absolute starting offset on that media - unsigned long partSize; // size of the partition, in bytes -} MPFS_IMAGE_PARTITION_INFO = -{ - "mpfs2", - (unsigned long)NVM_MEDIA_DATA, - sizeof(NVM_MEDIA_DATA), -}; - -/************************************************************** - * End of MPFS - **************************************************************/ diff --git a/software/aws-iot-ethernet/firmware/src/parson.c b/software/aws-iot-ethernet/firmware/src/parson.c index d2cc1af..e6c2cc6 100755 --- a/software/aws-iot-ethernet/firmware/src/parson.c +++ b/software/aws-iot-ethernet/firmware/src/parson.c @@ -1,6 +1,6 @@ /* Parson ( http://kgabis.github.com/parson/ ) - Copyright (c) 2012 - 2015 Krzysztof Gabis + Copyright (c) 2012 - 2016 Krzysztof Gabis Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -21,8 +21,10 @@ THE SOFTWARE. */ #ifdef _MSC_VER +#ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS -#endif +#endif /* _CRT_SECURE_NO_WARNINGS */ +#endif /* _MSC_VER */ #include "parson.h" @@ -107,7 +109,7 @@ static void json_array_free(JSON_Array *array); static JSON_Value * json_value_init_string_no_copy(char *string); /* Parser */ -static void skip_quotes(const char **string); +static JSON_Status skip_quotes(const char **string); static int parse_utf_16(const char **unprocessed, char **processed); static char * process_string(const char *input, size_t len); static char * get_quoted_string(const char **string); @@ -128,8 +130,9 @@ static int append_string(char *buf, const char *string); /* Various */ static char * parson_strndup(const char *string, size_t n) { char *output_string = (char*)parson_malloc(n + 1); - if (!output_string) + if (!output_string) { return NULL; + } output_string[n] = '\0'; strncpy(output_string, string, n); return output_string; @@ -161,7 +164,7 @@ static int num_bytes_in_utf8_sequence(unsigned char c) { static int verify_utf8_sequence(const unsigned char *string, int *len) { unsigned int cp = 0; *len = num_bytes_in_utf8_sequence(string[0]); - + if (*len == 1) { cp = string[0]; } else if (*len == 2 && IS_CONT(string[1])) { @@ -179,24 +182,24 @@ static int verify_utf8_sequence(const unsigned char *string, int *len) { } else { return 0; } - + /* overlong encodings */ if ((cp < 0x80 && *len > 1) || (cp < 0x800 && *len > 2) || (cp < 0x10000 && *len > 3)) { return 0; } - + /* invalid unicode */ if (cp > 0x10FFFF) { return 0; } - + /* surrogate halves */ if (cp >= 0xD800 && cp <= 0xDFFF) { return 0; } - + return 1; } @@ -213,13 +216,16 @@ static int is_valid_utf8(const char *string, size_t string_len) { } static int is_decimal(const char *string, size_t length) { - if (length > 1 && string[0] == '0' && string[1] != '.') + if (length > 1 && string[0] == '0' && string[1] != '.') { return 0; - if (length > 2 && !strncmp(string, "-0", 2) && string[2] != '.') + } + if (length > 2 && !strncmp(string, "-0", 2) && string[2] != '.') { return 0; + } while (length--) - if (strchr("xX", string[length])) + if (strchr("xX", string[length])) { return 0; + } return 1; } @@ -228,8 +234,9 @@ static char * read_file(const char * filename) { size_t file_size; long pos; char *file_contents; - if (!fp) + if (!fp) { return NULL; + } fseek(fp, 0L, SEEK_END); pos = ftell(fp); if (pos < 0) { @@ -261,8 +268,9 @@ static void remove_comments(char *string, const char *start_token, const char *e char *ptr = NULL, current_char; size_t start_token_len = strlen(start_token); size_t end_token_len = strlen(end_token); - if (start_token_len == 0 || end_token_len == 0) - return; + if (start_token_len == 0 || end_token_len == 0) { + return; + } while ((current_char = *string) != '\0') { if (current_char == '\\' && !escaped) { escaped = 1; @@ -271,15 +279,18 @@ static void remove_comments(char *string, const char *start_token, const char *e } else if (current_char == '\"' && !escaped) { in_string = !in_string; } else if (!in_string && strncmp(string, start_token, start_token_len) == 0) { - for(i = 0; i < start_token_len; i++) + for(i = 0; i < start_token_len; i++) { string[i] = ' '; - string = string + start_token_len; + } + string = string + start_token_len; ptr = strstr(string, end_token); - if (!ptr) + if (!ptr) { return; - for (i = 0; i < (ptr - string) + end_token_len; i++) + } + for (i = 0; i < (ptr - string) + end_token_len; i++) { string[i] = ' '; - string = ptr + end_token_len - 1; + } + string = ptr + end_token_len - 1; } escaped = 0; string++; @@ -289,8 +300,9 @@ static void remove_comments(char *string, const char *start_token, const char *e /* JSON Object */ static JSON_Object * json_object_init(void) { JSON_Object *new_obj = (JSON_Object*)parson_malloc(sizeof(JSON_Object)); - if (!new_obj) + if (!new_obj) { return NULL; + } new_obj->names = (char**)NULL; new_obj->values = (JSON_Value**)NULL; new_obj->capacity = 0; @@ -303,19 +315,23 @@ static JSON_Status json_object_add(JSON_Object *object, const char *name, JSON_V if (object == NULL || name == NULL || value == NULL) { return JSONFailure; } + if (json_object_get_value(object, name) != NULL) { + return JSONFailure; + } if (object->count >= object->capacity) { size_t new_capacity = MAX(object->capacity * 2, STARTING_CAPACITY); - if (new_capacity > OBJECT_MAX_CAPACITY) + if (new_capacity > OBJECT_MAX_CAPACITY) { return JSONFailure; - if (json_object_resize(object, new_capacity) == JSONFailure) + } + if (json_object_resize(object, new_capacity) == JSONFailure) { return JSONFailure; + } } - if (json_object_get_value(object, name) != NULL) - return JSONFailure; index = object->count; object->names[index] = parson_strdup(name); - if (object->names[index] == NULL) + if (object->names[index] == NULL) { return JSONFailure; + } object->values[index] = value; object->count++; return JSONSuccess; @@ -330,17 +346,18 @@ static JSON_Status json_object_resize(JSON_Object *object, size_t new_capacity) new_capacity == 0) { return JSONFailure; /* Shouldn't happen */ } - + temp_names = (char**)parson_malloc(new_capacity * sizeof(char*)); - if (temp_names == NULL) + if (temp_names == NULL) { return JSONFailure; - + } + temp_values = (JSON_Value**)parson_malloc(new_capacity * sizeof(JSON_Value*)); - if (temp_names == NULL) { + if (temp_values == NULL) { parson_free(temp_names); return JSONFailure; } - + if (object->names != NULL && object->values != NULL && object->count > 0) { memcpy(temp_names, object->names, object->count * sizeof(char*)); memcpy(temp_values, object->values, object->count * sizeof(JSON_Value*)); @@ -357,10 +374,12 @@ static JSON_Value * json_object_nget_value(const JSON_Object *object, const char size_t i, name_length; for (i = 0; i < json_object_get_count(object); i++) { name_length = strlen(object->names[i]); - if (name_length != n) + if (name_length != n) { continue; - if (strncmp(object->names[i], name, n) == 0) + } + if (strncmp(object->names[i], name, n) == 0) { return object->values[i]; + } } return NULL; } @@ -378,8 +397,9 @@ static void json_object_free(JSON_Object *object) { /* JSON Array */ static JSON_Array * json_array_init(void) { JSON_Array *new_array = (JSON_Array*)parson_malloc(sizeof(JSON_Array)); - if (!new_array) + if (!new_array) { return NULL; + } new_array->items = (JSON_Value**)NULL; new_array->capacity = 0; new_array->count = 0; @@ -389,10 +409,12 @@ static JSON_Array * json_array_init(void) { static JSON_Status json_array_add(JSON_Array *array, JSON_Value *value) { if (array->count >= array->capacity) { size_t new_capacity = MAX(array->capacity * 2, STARTING_CAPACITY); - if (new_capacity > ARRAY_MAX_CAPACITY) + if (new_capacity > ARRAY_MAX_CAPACITY) { return JSONFailure; - if (json_array_resize(array, new_capacity) == JSONFailure) + } + if (json_array_resize(array, new_capacity) == JSONFailure) { return JSONFailure; + } } array->items[array->count] = value; array->count++; @@ -404,7 +426,7 @@ static JSON_Status json_array_resize(JSON_Array *array, size_t new_capacity) { if (new_capacity == 0) { return JSONFailure; } - new_items = parson_malloc(new_capacity * sizeof(JSON_Value*)); + new_items = (JSON_Value**)parson_malloc(new_capacity * sizeof(JSON_Value*)); if (new_items == NULL) { return JSONFailure; } @@ -427,27 +449,33 @@ static void json_array_free(JSON_Array *array) { /* JSON Value */ static JSON_Value * json_value_init_string_no_copy(char *string) { JSON_Value *new_value = (JSON_Value*)parson_malloc(sizeof(JSON_Value)); - if (!new_value) + if (!new_value) { return NULL; + } new_value->type = JSONString; new_value->value.string = string; return new_value; } /* Parser */ -static void skip_quotes(const char **string) { +static JSON_Status skip_quotes(const char **string) { + if (**string != '\"') { + return JSONFailure; + } SKIP_CHAR(string); while (**string != '\"') { - if (**string == '\0') - return; - if (**string == '\\') { + if (**string == '\0') { + return JSONFailure; + } else if (**string == '\\') { SKIP_CHAR(string); - if (**string == '\0') - return; + if (**string == '\0') { + return JSONFailure; + } } SKIP_CHAR(string); } SKIP_CHAR(string); + return JSONSuccess; } static int parse_utf_16(const char **unprocessed, char **processed) { @@ -455,8 +483,9 @@ static int parse_utf_16(const char **unprocessed, char **processed) { char *processed_ptr = *processed; const char *unprocessed_ptr = *unprocessed; unprocessed_ptr++; /* skips u */ - if (!is_utf16_hex((const unsigned char*)unprocessed_ptr) || sscanf(unprocessed_ptr, "%4x", &cp) == EOF) - return JSONFailure; + if (!is_utf16_hex((const unsigned char*)unprocessed_ptr) || sscanf(unprocessed_ptr, "%4x", &cp) == EOF) { + return JSONFailure; + } if (cp < 0x80) { *processed_ptr = cp; /* 0xxxxxxx */ } else if (cp < 0x800) { @@ -470,7 +499,7 @@ static int parse_utf_16(const char **unprocessed, char **processed) { lead = cp; unprocessed_ptr += 4; /* should always be within the buffer, otherwise previous sscanf would fail */ if (*unprocessed_ptr++ != '\\' || *unprocessed_ptr++ != 'u' || /* starts with \u? */ - !is_utf16_hex((const unsigned char*)unprocessed_ptr) || + !is_utf16_hex((const unsigned char*)unprocessed_ptr) || sscanf(unprocessed_ptr, "%4x", &trail) == EOF || trail < 0xDC00 || trail > 0xDFFF) { /* valid trail surrogate? (0xDC00..0xDFFF) */ return JSONFailure; @@ -512,8 +541,9 @@ static char* process_string(const char *input, size_t len) { case 'r': *output_ptr = '\r'; break; case 't': *output_ptr = '\t'; break; case 'u': - if (parse_utf_16(&input_ptr, &output_ptr) == JSONFailure) + if (parse_utf_16(&input_ptr, &output_ptr) == JSONFailure) { goto error; + } break; default: goto error; @@ -529,9 +559,11 @@ static char* process_string(const char *input, size_t len) { *output_ptr = '\0'; /* resize to new length */ final_size = (size_t)(output_ptr-output) + 1; + /* todo: don't resize if final_size == initial_size */ resized_output = (char*)parson_malloc(final_size); - if (resized_output == NULL) + if (resized_output == NULL) { goto error; + } memcpy(resized_output, output, final_size); parson_free(output); return resized_output; @@ -545,16 +577,18 @@ static char* process_string(const char *input, size_t len) { static char * get_quoted_string(const char **string) { const char *string_start = *string; size_t string_len = 0; - skip_quotes(string); - if (**string == '\0') + JSON_Status status = skip_quotes(string); + if (status != JSONSuccess) { return NULL; + } string_len = *string - string_start - 2; /* length without quotes */ return process_string(string_start + 1, string_len); } static JSON_Value * parse_value(const char **string, size_t nesting) { - if (nesting > MAX_NESTING) + if (nesting > MAX_NESTING) { return NULL; + } SKIP_WHITESPACES(string); switch (**string) { case '{': @@ -580,8 +614,9 @@ static JSON_Value * parse_object_value(const char **string, size_t nesting) { JSON_Value *output_value = json_value_init_object(), *new_value = NULL; JSON_Object *output_object = json_value_get_object(output_value); char *new_key = NULL; - if (output_value == NULL) + if (output_value == NULL || **string != '{') { return NULL; + } SKIP_CHAR(string); SKIP_WHITESPACES(string); if (**string == '}') { /* empty object */ @@ -610,8 +645,9 @@ static JSON_Value * parse_object_value(const char **string, size_t nesting) { } parson_free(new_key); SKIP_WHITESPACES(string); - if (**string != ',') + if (**string != ',') { break; + } SKIP_CHAR(string); SKIP_WHITESPACES(string); } @@ -628,8 +664,9 @@ static JSON_Value * parse_object_value(const char **string, size_t nesting) { static JSON_Value * parse_array_value(const char **string, size_t nesting) { JSON_Value *output_value = json_value_init_array(), *new_array_value = NULL; JSON_Array *output_array = json_value_get_array(output_value); - if (!output_value) + if (!output_value || **string != '[') { return NULL; + } SKIP_CHAR(string); SKIP_WHITESPACES(string); if (**string == ']') { /* empty array */ @@ -642,14 +679,15 @@ static JSON_Value * parse_array_value(const char **string, size_t nesting) { json_value_free(output_value); return NULL; } - if(json_array_add(output_array, new_array_value) == JSONFailure) { + if (json_array_add(output_array, new_array_value) == JSONFailure) { parson_free(new_array_value); json_value_free(output_value); return NULL; } SKIP_WHITESPACES(string); - if (**string != ',') + if (**string != ',') { break; + } SKIP_CHAR(string); SKIP_WHITESPACES(string); } @@ -666,8 +704,9 @@ static JSON_Value * parse_array_value(const char **string, size_t nesting) { static JSON_Value * parse_string_value(const char **string) { JSON_Value *value = NULL; char *new_string = get_quoted_string(string); - if (new_string == NULL) + if (new_string == NULL) { return NULL; + } value = json_value_init_string_no_copy(new_string); if (value == NULL) { parson_free(new_string); @@ -712,14 +751,14 @@ static JSON_Value * parse_null_value(const char **string) { } /* Serialization */ -#define APPEND_STRING(str) do { written = append_string(buf, (str)); \ - if (written < 0) { return -1; } \ - if (buf != NULL) { buf += written; } \ +#define APPEND_STRING(str) do { written = append_string(buf, (str));\ + if (written < 0) { return -1; }\ + if (buf != NULL) { buf += written; }\ written_total += written; } while(0) -#define APPEND_INDENT(level) do { written = append_indent(buf, (level)); \ - if (written < 0) { return -1; } \ - if (buf != NULL) { buf += written; } \ +#define APPEND_INDENT(level) do { written = append_indent(buf, (level));\ + if (written < 0) { return -1; }\ + if (buf != NULL) { buf += written; }\ written_total += written; } while(0) static int json_serialize_to_buffer_r(const JSON_Value *value, char *buf, int level, int is_pretty, char *num_buf) @@ -731,95 +770,121 @@ static int json_serialize_to_buffer_r(const JSON_Value *value, char *buf, int le size_t i = 0, count = 0; double num = 0.0; int written = -1, written_total = 0; - + switch (json_value_get_type(value)) { case JSONArray: array = json_value_get_array(value); count = json_array_get_count(array); APPEND_STRING("["); - if (count > 0 && is_pretty) + if (count > 0 && is_pretty) { APPEND_STRING("\n"); + } for (i = 0; i < count; i++) { - if (is_pretty) + if (is_pretty) { APPEND_INDENT(level+1); + } temp_value = json_array_get_value(array, i); written = json_serialize_to_buffer_r(temp_value, buf, level+1, is_pretty, num_buf); - if (written < 0) + if (written < 0) { return -1; - if (buf != NULL) + } + if (buf != NULL) { buf += written; + } written_total += written; - if (i < (count - 1)) + if (i < (count - 1)) { APPEND_STRING(","); - if (is_pretty) + } + if (is_pretty) { APPEND_STRING("\n"); + } } - if (count > 0 && is_pretty) + if (count > 0 && is_pretty) { APPEND_INDENT(level); + } APPEND_STRING("]"); return written_total; case JSONObject: object = json_value_get_object(value); count = json_object_get_count(object); APPEND_STRING("{"); - if (count > 0 && is_pretty) + if (count > 0 && is_pretty) { APPEND_STRING("\n"); + } for (i = 0; i < count; i++) { key = json_object_get_name(object, i); - if (is_pretty) + if (is_pretty) { APPEND_INDENT(level+1); + } written = json_serialize_string(key, buf); - if (written < 0) + if (written < 0) { return -1; - if (buf != NULL) + } + if (buf != NULL) { buf += written; + } written_total += written; APPEND_STRING(":"); - if (is_pretty) + if (is_pretty) { APPEND_STRING(" "); + } temp_value = json_object_get_value(object, key); written = json_serialize_to_buffer_r(temp_value, buf, level+1, is_pretty, num_buf); - if (written < 0) + if (written < 0) { return -1; - if (buf != NULL) + } + if (buf != NULL) { buf += written; + } written_total += written; - if (i < (count - 1)) + if (i < (count - 1)) { APPEND_STRING(","); - if (is_pretty) + } + if (is_pretty) { APPEND_STRING("\n"); + } } - if (count > 0 && is_pretty) + if (count > 0 && is_pretty) { APPEND_INDENT(level); + } APPEND_STRING("}"); return written_total; case JSONString: string = json_value_get_string(value); written = json_serialize_string(string, buf); - if (written < 0) + if (written < 0) { return -1; - if (buf != NULL) + } + if (buf != NULL) { buf += written; + } written_total += written; return written_total; case JSONBoolean: - if (json_value_get_boolean(value)) + if (json_value_get_boolean(value)) { APPEND_STRING("true"); - else + } else { APPEND_STRING("false"); + } return written_total; case JSONNumber: num = json_value_get_number(value); - if (buf != NULL) + if (buf != NULL) { num_buf = buf; - if (num == ((double)(int)num)) /* check if num is integer */ + } + if (num == ((double)(int)num)) { /* check if num is integer */ written = sprintf(num_buf, "%d", (int)num); - else + } else if (num == ((double)(unsigned int)num)) { + written = sprintf(num_buf, "%u", (unsigned int)num); + } else { written = sprintf(num_buf, DOUBLE_SERIALIZATION_FORMAT, num); - if (written < 0) + } + if (written < 0) { return -1; - if (buf != NULL) + } + if (buf != NULL) { buf += written; + } written_total += written; return written_total; case JSONNull: @@ -842,11 +907,44 @@ static int json_serialize_string(const char *string, char *buf) { switch (c) { case '\"': APPEND_STRING("\\\""); break; case '\\': APPEND_STRING("\\\\"); break; + case '/': APPEND_STRING("\\/"); break; /* to make json embeddable in xml\/html */ case '\b': APPEND_STRING("\\b"); break; case '\f': APPEND_STRING("\\f"); break; case '\n': APPEND_STRING("\\n"); break; case '\r': APPEND_STRING("\\r"); break; case '\t': APPEND_STRING("\\t"); break; + case '\x00': APPEND_STRING("\\u0000"); break; + case '\x01': APPEND_STRING("\\u0001"); break; + case '\x02': APPEND_STRING("\\u0002"); break; + case '\x03': APPEND_STRING("\\u0003"); break; + case '\x04': APPEND_STRING("\\u0004"); break; + case '\x05': APPEND_STRING("\\u0005"); break; + case '\x06': APPEND_STRING("\\u0006"); break; + case '\x07': APPEND_STRING("\\u0007"); break; + /* '\x08' duplicate: '\b' */ + /* '\x09' duplicate: '\t' */ + /* '\x0a' duplicate: '\n' */ + case '\x0b': APPEND_STRING("\\u000b"); break; + /* '\x0c' duplicate: '\f' */ + /* '\x0d' duplicate: '\r' */ + case '\x0e': APPEND_STRING("\\u000e"); break; + case '\x0f': APPEND_STRING("\\u000f"); break; + case '\x10': APPEND_STRING("\\u0010"); break; + case '\x11': APPEND_STRING("\\u0011"); break; + case '\x12': APPEND_STRING("\\u0012"); break; + case '\x13': APPEND_STRING("\\u0013"); break; + case '\x14': APPEND_STRING("\\u0014"); break; + case '\x15': APPEND_STRING("\\u0015"); break; + case '\x16': APPEND_STRING("\\u0016"); break; + case '\x17': APPEND_STRING("\\u0017"); break; + case '\x18': APPEND_STRING("\\u0018"); break; + case '\x19': APPEND_STRING("\\u0019"); break; + case '\x1a': APPEND_STRING("\\u001a"); break; + case '\x1b': APPEND_STRING("\\u001b"); break; + case '\x1c': APPEND_STRING("\\u001c"); break; + case '\x1d': APPEND_STRING("\\u001d"); break; + case '\x1e': APPEND_STRING("\\u001e"); break; + case '\x1f': APPEND_STRING("\\u001f"); break; default: if (buf != NULL) { buf[0] = c; @@ -883,8 +981,9 @@ static int append_string(char *buf, const char *string) { JSON_Value * json_parse_file(const char *filename) { char *file_contents = read_file(filename); JSON_Value *output_value = NULL; - if (file_contents == NULL) + if (file_contents == NULL) { return NULL; + } output_value = json_parse_string(file_contents); parson_free(file_contents); return output_value; @@ -893,19 +992,18 @@ JSON_Value * json_parse_file(const char *filename) { JSON_Value * json_parse_file_with_comments(const char *filename) { char *file_contents = read_file(filename); JSON_Value *output_value = NULL; - if (file_contents == NULL) + if (file_contents == NULL) { return NULL; + } output_value = json_parse_string_with_comments(file_contents); parson_free(file_contents); return output_value; } JSON_Value * json_parse_string(const char *string) { - if (string == NULL) - return NULL; - SKIP_WHITESPACES(&string); - if (*string != '{' && *string != '[') + if (string == NULL) { return NULL; + } return parse_value((const char**)&string, 0); } @@ -913,27 +1011,23 @@ JSON_Value * json_parse_string_with_comments(const char *string) { JSON_Value *result = NULL; char *string_mutable_copy = NULL, *string_mutable_copy_ptr = NULL; string_mutable_copy = parson_strdup(string); - if (string_mutable_copy == NULL) + if (string_mutable_copy == NULL) { return NULL; + } remove_comments(string_mutable_copy, "/*", "*/"); remove_comments(string_mutable_copy, "//", "\n"); string_mutable_copy_ptr = string_mutable_copy; - SKIP_WHITESPACES(&string_mutable_copy_ptr); - if (*string_mutable_copy_ptr != '{' && *string_mutable_copy_ptr != '[') { - parson_free(string_mutable_copy); - return NULL; - } result = parse_value((const char**)&string_mutable_copy_ptr, 0); parson_free(string_mutable_copy); return result; } - /* JSON Object API */ JSON_Value * json_object_get_value(const JSON_Object *object, const char *name) { - if (object == NULL || name == NULL) + if (object == NULL || name == NULL) { return NULL; + } return json_object_nget_value(object, name, strlen(name)); } @@ -959,8 +1053,9 @@ int json_object_get_boolean(const JSON_Object *object, const char *name) { JSON_Value * json_object_dotget_value(const JSON_Object *object, const char *name) { const char *dot_position = strchr(name, '.'); - if (!dot_position) + if (!dot_position) { return json_object_get_value(object, name); + } object = json_value_get_object(json_object_nget_value(object, name, dot_position - name)); return json_object_dotget_value(object, dot_position + 1); } @@ -990,15 +1085,42 @@ size_t json_object_get_count(const JSON_Object *object) { } const char * json_object_get_name(const JSON_Object *object, size_t index) { - if (index >= json_object_get_count(object)) + if (object == NULL || index >= json_object_get_count(object)) { return NULL; + } return object->names[index]; } +JSON_Value * json_object_get_value_at(const JSON_Object *object, size_t index) { + if (object == NULL || index >= json_object_get_count(object)) { + return NULL; + } + return object->values[index]; +} + +int json_object_has_value (const JSON_Object *object, const char *name) { + return json_object_get_value(object, name) != NULL; +} + +int json_object_has_value_of_type(const JSON_Object *object, const char *name, JSON_Value_Type type) { + JSON_Value *val = json_object_get_value(object, name); + return val != NULL && json_value_get_type(val) == type; +} + +int json_object_dothas_value (const JSON_Object *object, const char *name) { + return json_object_dotget_value(object, name) != NULL; +} + +int json_object_dothas_value_of_type(const JSON_Object *object, const char *name, JSON_Value_Type type) { + JSON_Value *val = json_object_dotget_value(object, name); + return val != NULL && json_value_get_type(val) == type; +} + /* JSON Array API */ JSON_Value * json_array_get_value(const JSON_Array *array, size_t index) { - if (index >= json_array_get_count(array)) + if (array == NULL || index >= json_array_get_count(array)) { return NULL; + } return array->items[index]; } @@ -1057,7 +1179,9 @@ void json_value_free(JSON_Value *value) { json_object_free(value->value.object); break; case JSONString: - if (value->value.string) { parson_free(value->value.string); } + if (value->value.string) { + parson_free(value->value.string); + } break; case JSONArray: json_array_free(value->value.array); @@ -1070,8 +1194,9 @@ void json_value_free(JSON_Value *value) { JSON_Value * json_value_init_object(void) { JSON_Value *new_value = (JSON_Value*)parson_malloc(sizeof(JSON_Value)); - if (!new_value) + if (!new_value) { return NULL; + } new_value->type = JSONObject; new_value->value.object = json_object_init(); if (!new_value->value.object) { @@ -1083,8 +1208,9 @@ JSON_Value * json_value_init_object(void) { JSON_Value * json_value_init_array(void) { JSON_Value *new_value = (JSON_Value*)parson_malloc(sizeof(JSON_Value)); - if (!new_value) + if (!new_value) { return NULL; + } new_value->type = JSONArray; new_value->value.array = json_array_init(); if (!new_value->value.array) { @@ -1098,24 +1224,29 @@ JSON_Value * json_value_init_string(const char *string) { char *copy = NULL; JSON_Value *value; size_t string_len = 0; - if (string == NULL) + if (string == NULL) { return NULL; + } string_len = strlen(string); - if (!is_valid_utf8(string, string_len)) + if (!is_valid_utf8(string, string_len)) { return NULL; + } copy = parson_strndup(string, string_len); - if (copy == NULL) + if (copy == NULL) { return NULL; + } value = json_value_init_string_no_copy(copy); - if (value == NULL) + if (value == NULL) { parson_free(copy); + } return value; } JSON_Value * json_value_init_number(double number) { JSON_Value *new_value = (JSON_Value*)parson_malloc(sizeof(JSON_Value)); - if (!new_value) + if (!new_value) { return NULL; + } new_value->type = JSONNumber; new_value->value.number = number; return new_value; @@ -1123,8 +1254,9 @@ JSON_Value * json_value_init_number(double number) { JSON_Value * json_value_init_boolean(int boolean) { JSON_Value *new_value = (JSON_Value*)parson_malloc(sizeof(JSON_Value)); - if (!new_value) + if (!new_value) { return NULL; + } new_value->type = JSONBoolean; new_value->value.boolean = boolean ? 1 : 0; return new_value; @@ -1132,8 +1264,9 @@ JSON_Value * json_value_init_boolean(int boolean) { JSON_Value * json_value_init_null(void) { JSON_Value *new_value = (JSON_Value*)parson_malloc(sizeof(JSON_Value)); - if (!new_value) + if (!new_value) { return NULL; + } new_value->type = JSONNull; return new_value; } @@ -1145,13 +1278,14 @@ JSON_Value * json_value_deep_copy(const JSON_Value *value) { char *temp_string_copy = NULL; JSON_Array *temp_array = NULL, *temp_array_copy = NULL; JSON_Object *temp_object = NULL, *temp_object_copy = NULL; - + switch (json_value_get_type(value)) { case JSONArray: temp_array = json_value_get_array(value); return_value = json_value_init_array(); - if (return_value == NULL) + if (return_value == NULL) { return NULL; + } temp_array_copy = json_value_get_array(return_value); for (i = 0; i < json_array_get_count(temp_array); i++) { temp_value = json_array_get_value(temp_array, i); @@ -1170,8 +1304,9 @@ JSON_Value * json_value_deep_copy(const JSON_Value *value) { case JSONObject: temp_object = json_value_get_object(value); return_value = json_value_init_object(); - if (return_value == NULL) + if (return_value == NULL) { return NULL; + } temp_object_copy = json_value_get_object(return_value); for (i = 0; i < json_object_get_count(temp_object); i++) { temp_key = json_object_get_name(temp_object, i); @@ -1195,11 +1330,13 @@ JSON_Value * json_value_deep_copy(const JSON_Value *value) { case JSONString: temp_string = json_value_get_string(value); temp_string_copy = parson_strdup(temp_string); - if (temp_string_copy == NULL) + if (temp_string_copy == NULL) { return NULL; + } return_value = json_value_init_string_no_copy(temp_string_copy); - if (return_value == NULL) + if (return_value == NULL) { parson_free(temp_string_copy); + } return return_value; case JSONNull: return json_value_init_null(); @@ -1223,8 +1360,9 @@ JSON_Status json_serialize_to_buffer(const JSON_Value *value, char *buf, size_t return JSONFailure; } written = json_serialize_to_buffer_r(value, buf, 0, 0, NULL); - if (written < 0) + if (written < 0) { return JSONFailure; + } return JSONSuccess; } @@ -1236,13 +1374,15 @@ JSON_Status json_serialize_to_file(const JSON_Value *value, const char *filename return JSONFailure; } fp = fopen (filename, "w"); - if (fp != NULL) { - if (fputs (serialized_string, fp) == EOF) { - return_code = JSONFailure; - } - if (fclose (fp) == EOF) { - return_code = JSONFailure; - } + if (fp == NULL) { + json_free_serialized_string(serialized_string); + return JSONFailure; + } + if (fputs(serialized_string, fp) == EOF) { + return_code = JSONFailure; + } + if (fclose(fp) == EOF) { + return_code = JSONFailure; } json_free_serialized_string(serialized_string); return return_code; @@ -1256,8 +1396,9 @@ char * json_serialize_to_string(const JSON_Value *value) { return NULL; } buf = (char*)parson_malloc(buf_size_bytes); - if (buf == NULL) + if (buf == NULL) { return NULL; + } serialization_result = json_serialize_to_buffer(value, buf, buf_size_bytes); if (serialization_result == JSONFailure) { json_free_serialized_string(buf); @@ -1275,11 +1416,13 @@ size_t json_serialization_size_pretty(const JSON_Value *value) { JSON_Status json_serialize_to_buffer_pretty(const JSON_Value *value, char *buf, size_t buf_size_in_bytes) { int written = -1; size_t needed_size_in_bytes = json_serialization_size_pretty(value); - if (needed_size_in_bytes == 0 || buf_size_in_bytes < needed_size_in_bytes) + if (needed_size_in_bytes == 0 || buf_size_in_bytes < needed_size_in_bytes) { return JSONFailure; + } written = json_serialize_to_buffer_r(value, buf, 0, 1, NULL); - if (written < 0) + if (written < 0) { return JSONFailure; + } return JSONSuccess; } @@ -1291,13 +1434,15 @@ JSON_Status json_serialize_to_file_pretty(const JSON_Value *value, const char *f return JSONFailure; } fp = fopen (filename, "w"); - if (fp != NULL) { - if (fputs (serialized_string, fp) == EOF) { - return_code = JSONFailure; - } - if (fclose (fp) == EOF) { - return_code = JSONFailure; - } + if (fp == NULL) { + json_free_serialized_string(serialized_string); + return JSONFailure; + } + if (fputs(serialized_string, fp) == EOF) { + return_code = JSONFailure; + } + if (fclose(fp) == EOF) { + return_code = JSONFailure; } json_free_serialized_string(serialized_string); return return_code; @@ -1311,8 +1456,9 @@ char * json_serialize_to_string_pretty(const JSON_Value *value) { return NULL; } buf = (char*)parson_malloc(buf_size_bytes); - if (buf == NULL) + if (buf == NULL) { return NULL; + } serialization_result = json_serialize_to_buffer_pretty(value, buf, buf_size_bytes); if (serialization_result == JSONFailure) { json_free_serialized_string(buf); @@ -1321,21 +1467,26 @@ char * json_serialize_to_string_pretty(const JSON_Value *value) { return buf; } - void json_free_serialized_string(char *string) { parson_free(string); } JSON_Status json_array_remove(JSON_Array *array, size_t ix) { + JSON_Value *temp_value = NULL; size_t last_element_ix = 0; if (array == NULL || ix >= json_array_get_count(array)) { return JSONFailure; } last_element_ix = json_array_get_count(array) - 1; json_value_free(json_array_get_value(array, ix)); + if (ix != last_element_ix) { /* Replace value with one from the end of array */ + temp_value = json_array_get_value(array, last_element_ix); + if (temp_value == NULL) { + return JSONFailure; + } + array->items[ix] = temp_value; + } array->count -= 1; - if (ix != last_element_ix) /* Replace value with one from the end of array */ - array->items[ix] = json_array_get_value(array, last_element_ix); return JSONSuccess; } @@ -1350,8 +1501,9 @@ JSON_Status json_array_replace_value(JSON_Array *array, size_t ix, JSON_Value *v JSON_Status json_array_replace_string(JSON_Array *array, size_t i, const char* string) { JSON_Value *value = json_value_init_string(string); - if (value == NULL) + if (value == NULL) { return JSONFailure; + } if (json_array_replace_value(array, i, value) == JSONFailure) { json_value_free(value); return JSONFailure; @@ -1361,8 +1513,9 @@ JSON_Status json_array_replace_string(JSON_Array *array, size_t i, const char* s JSON_Status json_array_replace_number(JSON_Array *array, size_t i, double number) { JSON_Value *value = json_value_init_number(number); - if (value == NULL) + if (value == NULL) { return JSONFailure; + } if (json_array_replace_value(array, i, value) == JSONFailure) { json_value_free(value); return JSONFailure; @@ -1372,8 +1525,9 @@ JSON_Status json_array_replace_number(JSON_Array *array, size_t i, double number JSON_Status json_array_replace_boolean(JSON_Array *array, size_t i, int boolean) { JSON_Value *value = json_value_init_boolean(boolean); - if (value == NULL) + if (value == NULL) { return JSONFailure; + } if (json_array_replace_value(array, i, value) == JSONFailure) { json_value_free(value); return JSONFailure; @@ -1383,8 +1537,9 @@ JSON_Status json_array_replace_boolean(JSON_Array *array, size_t i, int boolean) JSON_Status json_array_replace_null(JSON_Array *array, size_t i) { JSON_Value *value = json_value_init_null(); - if (value == NULL) + if (value == NULL) { return JSONFailure; + } if (json_array_replace_value(array, i, value) == JSONFailure) { json_value_free(value); return JSONFailure; @@ -1394,8 +1549,9 @@ JSON_Status json_array_replace_null(JSON_Array *array, size_t i) { JSON_Status json_array_clear(JSON_Array *array) { size_t i = 0; - if (array == NULL) + if (array == NULL) { return JSONFailure; + } for (i = 0; i < json_array_get_count(array); i++) { json_value_free(json_array_get_value(array, i)); } @@ -1404,15 +1560,17 @@ JSON_Status json_array_clear(JSON_Array *array) { } JSON_Status json_array_append_value(JSON_Array *array, JSON_Value *value) { - if (array == NULL || value == NULL) + if (array == NULL || value == NULL) { return JSONFailure; + } return json_array_add(array, value); } JSON_Status json_array_append_string(JSON_Array *array, const char *string) { JSON_Value *value = json_value_init_string(string); - if (value == NULL) + if (value == NULL) { return JSONFailure; + } if (json_array_append_value(array, value) == JSONFailure) { json_value_free(value); return JSONFailure; @@ -1422,8 +1580,9 @@ JSON_Status json_array_append_string(JSON_Array *array, const char *string) { JSON_Status json_array_append_number(JSON_Array *array, double number) { JSON_Value *value = json_value_init_number(number); - if (value == NULL) + if (value == NULL) { return JSONFailure; + } if (json_array_append_value(array, value) == JSONFailure) { json_value_free(value); return JSONFailure; @@ -1433,8 +1592,9 @@ JSON_Status json_array_append_number(JSON_Array *array, double number) { JSON_Status json_array_append_boolean(JSON_Array *array, int boolean) { JSON_Value *value = json_value_init_boolean(boolean); - if (value == NULL) + if (value == NULL) { return JSONFailure; + } if (json_array_append_value(array, value) == JSONFailure) { json_value_free(value); return JSONFailure; @@ -1444,8 +1604,9 @@ JSON_Status json_array_append_boolean(JSON_Array *array, int boolean) { JSON_Status json_array_append_null(JSON_Array *array) { JSON_Value *value = json_value_init_null(); - if (value == NULL) + if (value == NULL) { return JSONFailure; + } if (json_array_append_value(array, value) == JSONFailure) { json_value_free(value); return JSONFailure; @@ -1456,8 +1617,9 @@ JSON_Status json_array_append_null(JSON_Array *array) { JSON_Status json_object_set_value(JSON_Object *object, const char *name, JSON_Value *value) { size_t i = 0; JSON_Value *old_value; - if (object == NULL || name == NULL || value == NULL) + if (object == NULL || name == NULL || value == NULL) { return JSONFailure; + } old_value = json_object_get_value(object, name); if (old_value != NULL) { /* free and overwrite old value */ json_value_free(old_value); @@ -1493,8 +1655,9 @@ JSON_Status json_object_dotset_value(JSON_Object *object, const char *name, JSON char *current_name = NULL; JSON_Object *temp_obj = NULL; JSON_Value *new_value = NULL; - if (value == NULL || name == NULL || value == NULL) + if (value == NULL || name == NULL || value == NULL) { return JSONFailure; + } dot_pos = strchr(name, '.'); if (dot_pos == NULL) { return json_object_set_value(object, name, value); @@ -1521,8 +1684,9 @@ JSON_Status json_object_dotset_value(JSON_Object *object, const char *name, JSON JSON_Status json_object_dotset_string(JSON_Object *object, const char *name, const char *string) { JSON_Value *value = json_value_init_string(string); - if (value == NULL) + if (value == NULL) { return JSONFailure; + } if (json_object_dotset_value(object, name, value) == JSONFailure) { json_value_free(value); return JSONFailure; @@ -1532,8 +1696,9 @@ JSON_Status json_object_dotset_string(JSON_Object *object, const char *name, con JSON_Status json_object_dotset_number(JSON_Object *object, const char *name, double number) { JSON_Value *value = json_value_init_number(number); - if (value == NULL) + if (value == NULL) { return JSONFailure; + } if (json_object_dotset_value(object, name, value) == JSONFailure) { json_value_free(value); return JSONFailure; @@ -1543,8 +1708,9 @@ JSON_Status json_object_dotset_number(JSON_Object *object, const char *name, dou JSON_Status json_object_dotset_boolean(JSON_Object *object, const char *name, int boolean) { JSON_Value *value = json_value_init_boolean(boolean); - if (value == NULL) + if (value == NULL) { return JSONFailure; + } if (json_object_dotset_value(object, name, value) == JSONFailure) { json_value_free(value); return JSONFailure; @@ -1554,8 +1720,9 @@ JSON_Status json_object_dotset_boolean(JSON_Object *object, const char *name, in JSON_Status json_object_dotset_null(JSON_Object *object, const char *name) { JSON_Value *value = json_value_init_null(); - if (value == NULL) + if (value == NULL) { return JSONFailure; + } if (json_object_dotset_value(object, name, value) == JSONFailure) { json_value_free(value); return JSONFailure; @@ -1565,8 +1732,9 @@ JSON_Status json_object_dotset_null(JSON_Object *object, const char *name) { JSON_Status json_object_remove(JSON_Object *object, const char *name) { size_t i = 0, last_item_index = 0; - if (object == NULL || json_object_get_value(object, name) == NULL) + if (object == NULL || json_object_get_value(object, name) == NULL) { return JSONFailure; + } last_item_index = json_object_get_count(object) - 1; for (i = 0; i < json_object_get_count(object); i++) { if (strcmp(object->names[i], name) == 0) { @@ -1606,7 +1774,7 @@ JSON_Status json_object_clear(JSON_Object *object) { if (object == NULL) { return JSONFailure; } - for (i = 0; i < json_object_get_count(object); i++) { + for (i = 0; i < json_object_get_count(object); i++) { parson_free(object->names[i]); json_value_free(object->values[i]); } @@ -1621,24 +1789,27 @@ JSON_Status json_validate(const JSON_Value *schema, const JSON_Value *value) { JSON_Value_Type schema_type = JSONError, value_type = JSONError; const char *key = NULL; size_t i = 0, count = 0; - if (schema == NULL || value == NULL) + if (schema == NULL || value == NULL) { return JSONFailure; + } schema_type = json_value_get_type(schema); value_type = json_value_get_type(value); - if (schema_type != value_type && schema_type != JSONNull) /* null represents all values */ + if (schema_type != value_type && schema_type != JSONNull) { /* null represents all values */ return JSONFailure; + } switch (schema_type) { case JSONArray: schema_array = json_value_get_array(schema); value_array = json_value_get_array(value); count = json_array_get_count(schema_array); - if (count == 0) + if (count == 0) { return JSONSuccess; /* Empty array allows all types */ + } /* Get first value from array, rest is ignored */ temp_schema_value = json_array_get_value(schema_array, 0); for (i = 0; i < json_array_get_count(value_array); i++) { temp_value = json_array_get_value(value_array, i); - if (json_validate(temp_schema_value, temp_value) == 0) { + if (json_validate(temp_schema_value, temp_value) == JSONFailure) { return JSONFailure; } } @@ -1647,18 +1818,21 @@ JSON_Status json_validate(const JSON_Value *schema, const JSON_Value *value) { schema_object = json_value_get_object(schema); value_object = json_value_get_object(value); count = json_object_get_count(schema_object); - if (count == 0) + if (count == 0) { return JSONSuccess; /* Empty object allows all objects */ - else if (json_object_get_count(value_object) < count) + } else if (json_object_get_count(value_object) < count) { return JSONFailure; /* Tested object mustn't have less name-value pairs than schema */ + } for (i = 0; i < count; i++) { key = json_object_get_name(schema_object, i); temp_schema_value = json_object_get_value(schema_object, key); temp_value = json_object_get_value(value_object, key); - if (temp_value == NULL) + if (temp_value == NULL) { return JSONFailure; - if (json_validate(temp_schema_value, temp_value) == JSONFailure) + } + if (json_validate(temp_schema_value, temp_value) == JSONFailure) { return JSONFailure; + } } return JSONSuccess; case JSONString: case JSONNumber: case JSONBoolean: case JSONNull: diff --git a/software/aws-iot-ethernet/firmware/src/parson.h b/software/aws-iot-ethernet/firmware/src/parson.h index 3c04edf..6a89982 100755 --- a/software/aws-iot-ethernet/firmware/src/parson.h +++ b/software/aws-iot-ethernet/firmware/src/parson.h @@ -1,17 +1,17 @@ /* Parson ( http://kgabis.github.com/parson/ ) - Copyright (c) 2012 - 2015 Krzysztof Gabis - + Copyright (c) 2012 - 2016 Krzysztof Gabis + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -27,10 +27,10 @@ #ifdef __cplusplus extern "C" { -#endif - -#include /* size_t */ - +#endif + +#include /* size_t */ + /* Types and enums */ typedef struct json_object_t JSON_Object; typedef struct json_array_t JSON_Array; @@ -46,34 +46,34 @@ enum json_value_type { JSONBoolean = 6 }; typedef int JSON_Value_Type; - + enum json_result_t { JSONSuccess = 0, JSONFailure = -1 }; typedef int JSON_Status; - + typedef void * (*JSON_Malloc_Function)(size_t); typedef void (*JSON_Free_Function)(void *); /* Call only once, before calling any other function from parson API. If not called, malloc and free from stdlib will be used for all allocations */ void json_set_allocation_functions(JSON_Malloc_Function malloc_fun, JSON_Free_Function free_fun); - + /* Parses first JSON value in a file, returns NULL in case of error */ JSON_Value * json_parse_file(const char *filename); /* Parses first JSON value in a file and ignores comments (/ * * / and //), returns NULL in case of error */ JSON_Value * json_parse_file_with_comments(const char *filename); - + /* Parses first JSON value in a string, returns NULL in case of error */ JSON_Value * json_parse_string(const char *string); /* Parses first JSON value in a string and ignores comments (/ * * / and //), returns NULL in case of error */ JSON_Value * json_parse_string_with_comments(const char *string); - + /* Serialization */ size_t json_serialization_size(const JSON_Value *value); /* returns 0 on fail */ JSON_Status json_serialize_to_buffer(const JSON_Value *value, char *buf, size_t buf_size_in_bytes); @@ -90,11 +90,11 @@ void json_free_serialized_string(char *string); /* frees string from json /* Comparing */ int json_value_equals(const JSON_Value *a, const JSON_Value *b); - + /* Validation - This is *NOT* JSON Schema. It validates json by checking if object have identically + This is *NOT* JSON Schema. It validates json by checking if object have identically named fields with matching types. - For example schema {"name":"", "age":0} will validate + For example schema {"name":"", "age":0} will validate {"name":"Joe", "age":25} and {"name":"Joe", "age":25, "gender":"m"}, but not {"name":"Joe"} or {"name":"Joe", "age":"Cucumber"}. In case of arrays, only first value in schema is checked against all values in tested array. @@ -102,7 +102,7 @@ int json_value_equals(const JSON_Value *a, const JSON_Value *b); null validates values of every type. */ JSON_Status json_validate(const JSON_Value *schema, const JSON_Value *value); - + /* * JSON Object */ @@ -125,10 +125,19 @@ double json_object_dotget_number (const JSON_Object *object, const char * int json_object_dotget_boolean(const JSON_Object *object, const char *name); /* returns -1 on fail */ /* Functions to get available names */ -size_t json_object_get_count(const JSON_Object *object); -const char * json_object_get_name (const JSON_Object *object, size_t index); - -/* Creates new name-value pair or frees and replaces old value with a new one. +size_t json_object_get_count (const JSON_Object *object); +const char * json_object_get_name (const JSON_Object *object, size_t index); +JSON_Value * json_object_get_value_at(const JSON_Object *object, size_t index); + +/* Functions to check if object has a value with a specific name. Returned value is 1 if object has + * a value and 0 if it doesn't. dothas functions behave exactly like dotget functions. */ +int json_object_has_value (const JSON_Object *object, const char *name); +int json_object_has_value_of_type(const JSON_Object *object, const char *name, JSON_Value_Type type); + +int json_object_dothas_value (const JSON_Object *object, const char *name); +int json_object_dothas_value_of_type(const JSON_Object *object, const char *name, JSON_Value_Type type); + +/* Creates new name-value pair or frees and replaces old value with a new one. * json_object_set_value does not copy passed value so it shouldn't be freed afterwards. */ JSON_Status json_object_set_value(JSON_Object *object, const char *name, JSON_Value *value); JSON_Status json_object_set_string(JSON_Object *object, const char *name, const char *string); @@ -152,9 +161,9 @@ JSON_Status json_object_dotremove(JSON_Object *object, const char *key); /* Removes all name-value pairs in object */ JSON_Status json_object_clear(JSON_Object *object); - -/* - *JSON Array + +/* + *JSON Array */ JSON_Value * json_array_get_value (const JSON_Array *array, size_t index); const char * json_array_get_string (const JSON_Array *array, size_t index); @@ -163,13 +172,13 @@ JSON_Array * json_array_get_array (const JSON_Array *array, size_t index); double json_array_get_number (const JSON_Array *array, size_t index); /* returns 0 on fail */ int json_array_get_boolean(const JSON_Array *array, size_t index); /* returns -1 on fail */ size_t json_array_get_count (const JSON_Array *array); - + /* Frees and removes value at given index, does nothing and returns JSONFailure if index doesn't exist. * Order of values in array may change during execution. */ JSON_Status json_array_remove(JSON_Array *array, size_t i); /* Frees and removes from array value at given index and replaces it with given one. - * Does nothing and returns JSONFailure if index doesn't exist. + * Does nothing and returns JSONFailure if index doesn't exist. * json_array_replace_value does not copy passed value so it shouldn't be freed afterwards. */ JSON_Status json_array_replace_value(JSON_Array *array, size_t i, JSON_Value *value); JSON_Status json_array_replace_string(JSON_Array *array, size_t i, const char* string); @@ -187,7 +196,7 @@ JSON_Status json_array_append_string(JSON_Array *array, const char *string); JSON_Status json_array_append_number(JSON_Array *array, double number); JSON_Status json_array_append_boolean(JSON_Array *array, int boolean); JSON_Status json_array_append_null(JSON_Array *array); - + /* *JSON Value */ @@ -214,7 +223,7 @@ JSON_Array * json_array (const JSON_Value *value); const char * json_string (const JSON_Value *value); double json_number (const JSON_Value *value); int json_boolean(const JSON_Value *value); - + #ifdef __cplusplus } #endif diff --git a/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/DM990004_IoT_Ethernet.mhc b/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/DM990004_IoT_Ethernet.mhc new file mode 100644 index 0000000..4a72e4e --- /dev/null +++ b/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/DM990004_IoT_Ethernet.mhc @@ -0,0 +1,1165 @@ +# +# Configuration generated by Microchip Harmony Configurator (MHC) v1.0.9.2 +# Project name: aws-iot-ethernet +# Configuration: DM990004_IoT_Ethernet +# Device: PIC32MZ2048EFM064 +# Harmony version: 1.09 +# +# +# from /Users/c14227/Documents/git-projects/iot-00027--v2.0.0-firmware-and-application-development/software/aws-iot-ethernet/firmware/aws-iot-ethernet.hconfig +# +CONFIG_APP_INSTANCES=3 +# +# from $HARMONY_VERSION_PATH/utilities/mhc/config/app_name_idx_gencode.ftl +# +CONFIG_APP_MENU_IDX0=y +CONFIG_APP_NAME_0="app" +CONFIG_APP_AUTO_GENERATE_CODE0=n +CONFIG_APP_TASK_SIZE_IDX0=2048 +CONFIG_APP_TASK_PRIORITY_IDX0=1 +CONFIG_APP_TASK_USE_DELAY_IDX0=y +CONFIG_APP_TASK_DELAY_IDX0=1 +CONFIG_APP_MENU_IDX1=y +CONFIG_APP_NAME_1="app1" +CONFIG_APP_AUTO_GENERATE_CODE1=n +CONFIG_APP_TASK_SIZE_IDX1=512 +CONFIG_APP_TASK_PRIORITY_IDX1=2 +CONFIG_APP_TASK_USE_DELAY_IDX1=y +CONFIG_APP_TASK_DELAY_IDX1=10 +CONFIG_APP_MENU_IDX2=y +CONFIG_APP_NAME_2="app2" +CONFIG_APP_AUTO_GENERATE_CODE2=n +CONFIG_APP_TASK_SIZE_IDX2=2048 +CONFIG_APP_TASK_PRIORITY_IDX2=2 +CONFIG_APP_TASK_USE_DELAY_IDX2=y +CONFIG_APP_TASK_DELAY_IDX2=1 +# +# from /Users/c14227/Documents/git-projects/iot-00027--v2.0.0-firmware-and-application-development/software/aws-iot-ethernet/firmware/aws-iot-ethernet.hconfig +# +CONFIG_USE_EXCEPTION_HANDLER=y +CONFIG_EXCEPTION_USE_SYS_DEBUG=y +CONFIG_EXCEPTION_BREAKPOINT=y +# +# from $HARMONY_VERSION_PATH/framework/config/framework.hconfig +# +CONFIG_FW_USE_SYS_TASK=y +CONFIG_FW_SYS_TASK_SIZE=4096 +CONFIG_FW_SYS_TASK_PRIORITY=2 +CONFIG_FW_SYS_TASK_USE_DELAY=y +CONFIG_FW_SYS_TASK_DELAY=1 +# +# from $HARMONY_VERSION_PATH/framework/bluetooth/config/bluetooth.hconfig +# +CONFIG_USE_BLUETOOTH_LIBRARIES=n +# +# from $HARMONY_VERSION_PATH/framework/bootloader/config/bootloader.hconfig +# +CONFIG_USE_BOOTLOADER=n +# +# from $HARMONY_VERSION_PATH/framework/classb/config/classb.hconfig +# +CONFIG_USE_CLASSB=n +# +# from $HARMONY_VERSION_PATH/framework/crypto/config/crypto.hconfig +# +CONFIG_USE_CRYPTO_LIBRARY=y +CONFIG_USE_CRYPTO_HW=n +# +# from $HARMONY_VERSION_PATH/framework/crypto/config/crypto_cipher.hconfig +# +CONFIG_USE_CRYPTO_ECC=n +CONFIG_USE_CRYPTO_3DES_SW=y +CONFIG_USE_CRYPTO_RSA=y +# +# from $HARMONY_VERSION_PATH/framework/crypto/config/crypto_cipher_aes.hconfig +# +CONFIG_USE_CRYPTO_AES_SW=y +CONFIG_USE_CRYPTO_AES_CBC_SW=n +CONFIG_USE_CRYPTO_AES_COUNTER_SW=n +CONFIG_USE_CRYPTO_AES_DIRECT_SW=n +# +# from $HARMONY_VERSION_PATH/framework/crypto/config/crypto_hash.hconfig +# +CONFIG_USE_CRYPTO_MD5_SW=n +CONFIG_USE_CRYPTO_SHA_SW=n +CONFIG_USE_CRYPTO_SHA_256_SW=y +CONFIG_USE_CRYPTO_SHA_384=n +CONFIG_USE_CRYPTO_SHA_512=n +CONFIG_USE_CRYPTO_HMAC_SW=y +# +# from $HARMONY_VERSION_PATH/framework/crypto/config/crypto_compress.hconfig +# +CONFIG_USE_CRYPTO_COMPRESS=n +# +# from $HARMONY_VERSION_PATH/framework/crypto/config/crypto_random.hconfig +# +CONFIG_USE_CRYPTO_RANDOM=y +# +# from $HARMONY_VERSION_PATH/framework/crypto/config/crypto.hconfig +# +CONFIG_USE_CRYPTO_LIB=n +# +# from $HARMONY_VERSION_PATH/framework/decoder/config/decoder.hconfig +# +CONFIG_USE_IMAGE_DECODER=n +CONFIG_USE_DECODER=n +# +# from $HARMONY_VERSION_PATH/framework/driver/adc/config/drv_adc.hconfig +# +CONFIG_USE_DRV_ADC=y +# +# from $HARMONY_VERSION_PATH/framework/driver/adc/config/drv_adchs.hconfig +# +CONFIG_DRV_ADCHS_DRIVER_MODE="STATIC" +CONFIG_DRV_ADCHS_INTERRUPT_MODE=n +CONFIG_DRV_ADCHS_POLLED_MODE=y +CONFIG_DRV_ADCHS_CHARGEPUMP_MODE="ADCHS_CHARGEPUMP_DISABLE" +CONFIG_DRV_ADCHS_FAST_SYNC_SYSTEM_CLOCK="ADCHS_FAST_SYNC_SYSTEM_CLOCK_DISABLE" +CONFIG_DRV_ADCHS_FAST_SYNC_PERIPHERAL_CLOCK="ADCHS_FAST_SYNC_PERIPHERAL_CLOCK_DISABLE" +CONFIG_DRV_ADCHS_OUTPUT_DATA_FORMAT="ADCHS_OUTPUT_DATA_FORMAT_INTEGER" +CONFIG_DRV_ADC_VOLTAGE_REFERENCE_ADCHS="ADCHS_VREF_AVDD_AVSS" +CONFIG_DRV_ADCHS_CLOCK_SOURCE="ADCHS_CLOCK_SOURCE_PBCLK" +CONFIG_DRV_ADCHS_CLOCK_DIVIDER=16 +CONFIG_DRV_ADCHS_WARMUP_CLOCK="ADCHS_WARMUP_CLOCK_32768" +CONFIG_DRV_ADCHS_CHANNEL_NUMBER=1 +# +# from $HARMONY_VERSION_PATH/framework/driver/adc/config/drv_adchs_channel_idx.ftl +# +CONFIG_DRV_ADCHS_CHANNEL_INST_IDX0=y +CONFIG_DRV_ADCHS_CHANNEL_ID_IDX0="ADCHS_CHANNEL_3" +CONFIG_DRV_ADCHS_CHNL_3_ALT_INP_SEL_IDX0="ADCHS_DEFAULT_CLASS1_AN3" +CONFIG_DRV_ADCHS_ANALOG_INPUT_LEVEL_TRIGGER_IDX0=n +CONFIG_DRV_ADCHS_TRIGGER_SOURCE_IDX0="ADCHS_TRIGGER_SOURCE_GLOBAL_SOFTWARE_EDGE" +CONFIG_DRV_ADCHS_INPUT_MODE_IDX0="ADCHS_INPUT_MODE_SINGLE_ENDED_UNIPOLAR" +CONFIG_DRV_ADCHS_DATA_RESOLUTION_SELECT_IDX0="ADCHS_DATA_RESOLUTION_12BIT" +CONFIG_DRV_ADCHS_CHANNEL_CLOCK_DIVIDER_IDX0=4 +CONFIG_DRV_ADCHS_SAMPLE_TIME_COUNT_IDX0=32 +CONFIG_DRV_ADCHS_TRIGGER_SAMPLE_SELECT_IDX0="ADCHS_CHANNEL_UNSYNC_TRIGGER_UNSYNC_SAMPLING" +# +# from $HARMONY_VERSION_PATH/framework/driver/adc/config/drv_adchs.hconfig +# +CONFIG_DRV_ADCHS_POWER_STATE="SYS_MODULE_POWER_RUN_FULL" +# +# from $HARMONY_VERSION_PATH/framework/driver/adc/config/drv_adc.hconfig +# +CONFIG_USE_DRV_ADCHS_CLASS_2_ANALOG_INPUT_CONVERT=n +CONFIG_USE_DRV_ADCHS_SCAN_MODE=n +CONFIG_USE_DRV_ADCHS_DIGITAL_COMPARATOR=n +CONFIG_USE_DRV_ADCHS_DIGITAL_FILTER=y +CONFIG_DRV_ADCHS_DIGITAL_FILTER_INSTANCES_NUMBER=2 +# +# from $HARMONY_VERSION_PATH/framework/driver/adc/config/drv_adchs_digital_filter_idx.ftl +# +CONFIG_DRV_ADCHS_DIGITAL_FILTER_INST_IDX0=y +CONFIG_DRV_ADCHS_DIGITAL_FILTER_ID_IDX0="ADCHS_DIGITAL_FILTER_1" +CONFIG_DRV_ADCHS_DIGITAL_FILTER_ANALOG_INPUT_ID_IDX0="ADCHS_AN3" +CONFIG_DRV_ADCHS_DIGITAL_FILTER_MODE_IDX0=y +CONFIG_DRV_ADCHS_DIGITAL_FILTER_OVERSAMPLING_RATIO_IDX0="ADCHS_DIGITAL_FILTER_OVERSAMPLE_RATIO_256X" +CONFIG_DRV_ADCHS_DIGITAL_FILTER_SIG_BITS_IDX0="ADCHS_DIGITAL_FILTER_SIGNIFICANT_ALL_16BITS" +CONFIG_DRV_ADCHS_DIGITAL_FILTER_INST_IDX1=n +# +# from $HARMONY_VERSION_PATH/framework/driver/adc/config/drv_adc.hconfig +# +CONFIG_USE_DRV_ADCHS_CVD=n +# +# from $HARMONY_VERSION_PATH/framework/driver/camera/config/drv_camera.hconfig +# +CONFIG_USE_DRV_CAMERA=n +# +# from $HARMONY_VERSION_PATH/framework/driver/can/config/drv_can.hconfig +# +CONFIG_USE_DRV_CAN=n +# +# from $HARMONY_VERSION_PATH/framework/driver/cmp/config/drv_cmp.hconfig +# +CONFIG_DRV_CVREF_ENABLE=y +CONFIG_DRV_CMP_CVREF_VOLTAGE_SOURCE="CMP_CVREF_VOLTAGE_SOURCE_VDD" +CONFIG_DRV_CMP_CVREF="CMP_CVREF_RESISTOR_LADDER_VOLTAGE" +CONFIG_DRV_CMP_CVREF_VALUE="CMP_CVREF_VALUE_11" +CONFIG_DRV_CMP_IVREF="CMP_CVREF_BANDGAP_1_2V" +CONFIG_DRV_CMP_CVREF_WIDE_RANGE=n +CONFIG_DRV_CMP_CVREF_OE=n +CONFIG_USE_DRV_CMP=y +CONFIG_DRV_CMP_DRIVER_MODE="STATIC" +CONFIG_DRV_CMP_INTERRUPT_MODE=y +CONFIG_DRV_CMP_INSTANCES_NUMBER=1 +# +# from $HARMONY_VERSION_PATH/framework/driver/cmp/config/drv_cmp_idx.ftl +# +CONFIG_DRV_CMP_INST_IDX0=y +CONFIG_DRV_CMP_PERIPHERAL_ID_IDX0="CMP_ID_2" +CONFIG_DRV_CMP_INTERRUPT_EVENT_IDX0="CMP_INTERRUPT_GENERATION_LOW_TO_HIGH" +CONFIG_DRV_CMP_INT_PRIORITY_IDX0="INT_PRIORITY_LEVEL1" +CONFIG_DRV_CMP_INT_SUB_PRIORITY_IDX0="INT_SUBPRIORITY_LEVEL0" +CONFIG_DRV_CMP_OUTPUT_ENABLE_IDX0=y +CONFIG_DRV_CMP_OUTPUT_INVERT_IDX0=n +CONFIG_DRV_CMP_INVERTING_INPUT_IDX0="CMP_INVERTING_INPUT_EXTERNAL_PIN_B" +CONFIG_DRV_CMP_NON_INVERTING_INPUT_IDX0="CMP_NON_INVERTING_INPUT_CVREF" +# +# from $HARMONY_VERSION_PATH/framework/driver/codec/config/drv_codec.hconfig +# +CONFIG_SELECT_DRV_AK4384=n +CONFIG_SELECT_DRV_AK4642=n +CONFIG_SELECT_DRV_AK4953=n +CONFIG_SELECT_DRV_AK7755=n +# +# from $HARMONY_VERSION_PATH/framework/driver/encx24j600/config/drv_encx24j600.hconfig +# +CONFIG_DRV_ENCX24J600_USE_DRIVER=n +# +# from $HARMONY_VERSION_PATH/framework/driver/enc28j60/config/drv_enc28j60.hconfig +# +CONFIG_DRV_ENC28J60_USE_DRIVER=n +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/tcpip_mac.hconfig +# +CONFIG_TCPIP_USE_ETH_MAC=y +CONFIG_TCPIP_EMAC_TX_DESCRIPTORS=8 +CONFIG_TCPIP_EMAC_RX_DESCRIPTORS=10 +CONFIG_TCPIP_EMAC_RX_DEDICATED_BUFFERS=4 +CONFIG_TCPIP_EMAC_RX_INIT_BUFFERS=0 +CONFIG_TCPIP_EMAC_RX_LOW_THRESHOLD=1 +CONFIG_TCPIP_EMAC_RX_LOW_FILL=2 +CONFIG_TCPIP_EMAC_RX_BUFF_SIZE=1536 +CONFIG_TCPIP_EMAC_RX_MAX_FRAME=1536 +CONFIG_TCPIP_EMAC_RX_FRAGMENTS=1 +CONFIG_TCPIP_EMAC_ETH_FILTER_BCAST_ACCEPT=y +CONFIG_TCPIP_EMAC_ETH_FILTER_MCAST_ACCEPT=y +CONFIG_TCPIP_EMAC_ETH_FILTER_UCAST_ACCEPT=y +CONFIG_TCPIP_EMAC_ETH_FILTER_UCAST_OTHER_ACCEPT=n +CONFIG_TCPIP_EMAC_ETH_FILTER_RUNT_REJECT=y +CONFIG_TCPIP_EMAC_ETH_FILTER_RUNT_ACCEPT=n +CONFIG_TCPIP_EMAC_ETH_FILTER_CRC_ERROR_REJECT=y +CONFIG_TCPIP_EMAC_ETH_FILTER_CRC_ERROR_ACCEPT=n +CONFIG_TCPIP_EMAC_ETH_OF_AUTO_NEGOTIATION=y +CONFIG_TCPIP_EMAC_ETH_OF_FULL_DUPLEX=y +CONFIG_TCPIP_EMAC_ETH_OF_HALF_DUPLEX=y +CONFIG_TCPIP_EMAC_ETH_OF_100=y +CONFIG_TCPIP_EMAC_ETH_OF_10=y +CONFIG_TCPIP_EMAC_ETH_OF_HUGE_PKTS=n +CONFIG_TCPIP_EMAC_ETH_OF_MAC_LOOPBACK=n +CONFIG_TCPIP_EMAC_ETH_OF_PHY_LOOPBACK=n +CONFIG_TCPIP_EMAC_ETH_OF_MDIX_AUTO=n +CONFIG_TCPIP_EMAC_ETH_OF_MDIX_SWAP=y +CONFIG_TCPIP_EMAC_ETH_OF_RMII=y +CONFIG_TCPIP_EMAC_PHY_CONFIG_RMII=y +CONFIG_TCPIP_EMAC_PHY_CONFIG_ALTERNATE=n +CONFIG_TCPIP_EMAC_PHY_CONFIG_AUTO=n +CONFIG_TCPIP_EMAC_PHY_LINK_INIT_DELAY=500 +CONFIG_TCPIP_EMAC_PHY_ADDRESS=0 +CONFIG_TCPIP_EMAC_MODULE_ID="ETH_ID_0" +CONFIG_TCPIP_EMAC_INTERRUPT_PRIORITY="INT_PRIORITY_LEVEL5" +CONFIG_TCPIP_EMAC_INTERRUPT_SUB_PRIORITY="INT_SUBPRIORITY_LEVEL3" +CONFIG_TCPIP_EMAC_PHY_TYPE="SMSC_LAN8740" +CONFIG_DRV_ETHPHY_INSTANCES_NUMBER=1 +CONFIG_DRV_ETHPHY_CLIENTS_NUMBER=1 +CONFIG_DRV_ETHPHY_INDEX=1 +CONFIG_DRV_ETHPHY_PERIPHERAL_ID=1 +CONFIG_DRV_ETHPHY_NEG_INIT_TMO=1 +CONFIG_DRV_ETHPHY_NEG_DONE_TMO=2000 +CONFIG_DRV_ETHPHY_RESET_CLR_TMO=500 +CONFIG_DRV_ETHMAC_INSTANCES_NUMBER=1 +CONFIG_DRV_ETHMAC_CLIENTS_NUMBER=1 +CONFIG_DRV_ETHMAC_INDEX=1 +CONFIG_DRV_ETHMAC_PERIPHERAL_ID=1 +CONFIG_DRV_ETHMAC_INTERRUPT_MODE=y +CONFIG_DRV_ETHMAC_POWER_STATE="SYS_MODULE_POWER_RUN_FULL" +# +# from $HARMONY_VERSION_PATH/framework/driver/flash/config/drv_flash.hconfig +# +CONFIG_USE_DRV_FLASH=n +# +# from $HARMONY_VERSION_PATH/framework/driver/gfx/controller/glcd/config/drv_gfx_glcd.hconfig +# +CONFIG_USE_DRV_GFX_GLCD=n +# +# from $HARMONY_VERSION_PATH/framework/driver/gfx/controller/lcc/config/drv_gfx_lcc.hconfig +# +CONFIG_USE_DRV_GFX_LCC=n +# +# from $HARMONY_VERSION_PATH/framework/driver/gfx/controller/otm2201a/config/drv_gfx_otm2201a.hconfig +# +CONFIG_USE_DRV_GFX_OTM2201A=n +# +# from $HARMONY_VERSION_PATH/framework/driver/gfx/controller/ssd1926/config/drv_gfx_ssd1926.hconfig +# +CONFIG_USE_DRV_GFX_SSD1926=n +# +# from $HARMONY_VERSION_PATH/framework/driver/gfx/controller/ssd1289/config/drv_gfx_ssd1289.hconfig +# +CONFIG_USE_DRV_GFX_SSD1289=n +# +# from $HARMONY_VERSION_PATH/framework/driver/gfx/controller/s1d13517/config/drv_gfx_s1d13517.hconfig +# +CONFIG_USE_DRV_GFX_S1D13517=n +# +# from $HARMONY_VERSION_PATH/framework/driver/gfx/display/config/drv_gfx_display.hconfig +# +CONFIG_USE_DRV_GFX_DISPLAY=n +# +# from $HARMONY_VERSION_PATH/framework/driver/i2c/config/drv_i2c.hconfig +# +CONFIG_USE_DRV_I2C=n +# +# from $HARMONY_VERSION_PATH/framework/driver/i2s/config/drv_i2s.hconfig +# +CONFIG_USE_DRV_I2S=n +# +# from $HARMONY_VERSION_PATH/framework/driver/ic/config/drv_ic.hconfig +# +CONFIG_USE_DRV_IC=n +# +# from $HARMONY_VERSION_PATH/framework/driver/nvm/config/drv_nvm.hconfig +# +CONFIG_USE_DRV_NVM=y +CONFIG_DRV_NVM_DRIVER_MODE="DYNAMIC" +CONFIG_DRV_NVM_DRIVER_TYPE_SELECT="BLOCK_DRIVER" +CONFIG_DRV_NVM_CLIENTS_NUMBER=2 +CONFIG_DRV_NVM_MEDIA_START_ADDRESS=0x9D100000 +CONFIG_DRV_NVM_MEDIA_SIZE=80 +CONFIG_DRV_NVM_BUFFER_OBJECT_NUMBER=5 +CONFIG_DRV_NVM_INTERRUPT_MODE=y +CONFIG_DRV_NVM_INTERRUPT_PRIORITY="INT_PRIORITY_LEVEL3" +CONFIG_DRV_NVM_INTERRUPT_SUB_PRIORITY="INT_SUBPRIORITY_LEVEL0" +CONFIG_DRV_NVM_POWER_STATE="SYS_MODULE_POWER_RUN_FULL" +CONFIG_USE_DRV_NVM_ERASE_WRITE=y +CONFIG_USE_DRV_NVM_SYS_FS_REGISTER=y +CONFIG_USE_DRV_NVM_DISABLE_ERROR_CHECK=n +# +# from $HARMONY_VERSION_PATH/framework/driver/oc/config/drv_oc.hconfig +# +CONFIG_USE_DRV_OC=n +# +# from $HARMONY_VERSION_PATH/framework/driver/pmp/config/drv_pmp.hconfig +# +CONFIG_USE_DRV_PMP=n +# +# from $HARMONY_VERSION_PATH/framework/driver/rtcc/config/drv_rtcc.hconfig +# +CONFIG_USE_DRV_RTCC=n +# +# from $HARMONY_VERSION_PATH/framework/driver/sample/config/drv_sample.hconfig +# +CONFIG_USE_DRV_SAMPLE=n +# +# from $HARMONY_VERSION_PATH/framework/driver/sdcard/config/drv_sdcard.hconfig +# +CONFIG_USE_DRV_SDCARD=n +# +# from $HARMONY_VERSION_PATH/framework/driver/spi/config/drv_spi.hconfig +# +CONFIG_DRV_SPI_USE_DRIVER=n +# +# from $HARMONY_VERSION_PATH/framework/driver/sqi/config/drv_sqi.hconfig +# +CONFIG_DRV_SQI_USE_DRIVER=n +# +# from $HARMONY_VERSION_PATH/framework/driver/spi_flash/sst25/config/drv_sst25.hconfig +# +CONFIG_USE_DRV_SST25=n +# +# from $HARMONY_VERSION_PATH/framework/driver/spi_flash/sst25vf016b/config/drv_sst25vf016b.hconfig +# +CONFIG_USE_DRV_SST25VF016B=n +# +# from $HARMONY_VERSION_PATH/framework/driver/spi_flash/sst25vf020b/config/drv_sst25vf020b.hconfig +# +CONFIG_USE_DRV_SST25VF020B=n +# +# from $HARMONY_VERSION_PATH/framework/driver/spi_flash/sst25vf064c/config/drv_sst25vf064c.hconfig +# +CONFIG_USE_DRV_SST25VF064C=n +# +# from $HARMONY_VERSION_PATH/framework/driver/sram/config/drv_sram.hconfig +# +CONFIG_USE_DRV_SRAM=n +# +# from $HARMONY_VERSION_PATH/framework/driver/tmr/config/drv_tmr.hconfig +# +CONFIG_USE_DRV_TMR=y +CONFIG_DRV_TMR_DRIVER_MODE="DYNAMIC" +CONFIG_DRV_TMR_CLIENTS_NUMBER=1 +CONFIG_DRV_TMR_INTERRUPT_MODE=y +CONFIG_DRV_TMR_INSTANCES_NUMBER=1 +# +# from $HARMONY_VERSION_PATH/framework/driver/tmr/config/drv_tmr_idx.ftl +# +CONFIG_DRV_TMR_INST_0=y +CONFIG_DRV_TMR_PERIPHERAL_ID_IDX0="TMR_ID_2" +CONFIG_DRV_TMR_RTOS_IDX0="Combined with System Tasks" +CONFIG_DRV_TMR_INTERRUPT_PRIORITY_IDX0="INT_PRIORITY_LEVEL1" +CONFIG_DRV_TMR_INTERRUPT_SUB_PRIORITY_IDX0="INT_SUBPRIORITY_LEVEL0" +CONFIG_DRV_TMR_CLOCK_SOURCE_3_IDX0="DRV_TMR_CLKSOURCE_INTERNAL" +CONFIG_DRV_TMR_PRESCALE_IDX0="TMR_PRESCALE_VALUE_256" +CONFIG_DRV_TMR_OPERATION_MODE_IDX0="DRV_TMR_OPERATION_MODE_16_BIT" +CONFIG_DRV_TMR_ASYNC_WRITE_ENABLE_IDX0=n +CONFIG_DRV_TMR_POWER_STATE_IDX0="SYS_MODULE_POWER_RUN_FULL" +# +# from $HARMONY_VERSION_PATH/framework/driver/touch/adc10bit/config/drv_adc10bit.hconfig +# +CONFIG_USE_DRV_TOUCH_ADC10BIT=n +# +# from $HARMONY_VERSION_PATH/framework/driver/touch/ar1021/config/drv_ar1021.hconfig +# +CONFIG_USE_DRV_TOUCH_AR1021=n +# +# from $HARMONY_VERSION_PATH/framework/driver/touch/mtch6301/config/drv_mtch6301.hconfig +# +CONFIG_USE_DRV_TOUCH_MTCH6301=n +# +# from $HARMONY_VERSION_PATH/framework/driver/touch/mtch6303/config/drv_mtch6303.hconfig +# +CONFIG_USE_DRV_TOUCH_MTCH6303=n +# +# from $HARMONY_VERSION_PATH/framework/driver/usart/config/drv_usart.hconfig +# +CONFIG_USE_DRV_USART=n +# +# from $HARMONY_VERSION_PATH/framework/driver/wifi/config/drv_wifi.hconfig +# +CONFIG_USE_DRV_WIFI=n +# +# from $HARMONY_VERSION_PATH/framework/gfx/config/gfx.hconfig +# +CONFIG_USE_GFX_STACK=n +# +# from $HARMONY_VERSION_PATH/framework/gfx/config/gfx_segger.hconfig +# +CONFIG_USE_SEGGER_EMWIN=n +# +# from $HARMONY_VERSION_PATH/framework/math/dsp/config/dsp.hconfig +# +CONFIG_USE_DSP=n +# +# from $HARMONY_VERSION_PATH/framework/math/libq/config/libq.hconfig +# +CONFIG_USE_LIBQ=n +CONFIG_USE_LIBQ_C=n +# +# from $HARMONY_VERSION_PATH/framework/net/pres/config/net_pres.hconfig +# +CONFIG_NET_PRES_USE=y +CONFIG_NET_PRES_RTOS="Combined with System Tasks" +CONFIG_NET_PRES_SOCKETS=10 +CONFIG_NET_PRES_INSTANCES=1 +# +# from $HARMONY_VERSION_PATH/framework/net/pres/config/net_pres_idx.ftl +# +CONFIG_NET_PRES_IDX0=y +CONFIG_NET_PRES_CONFIG_NAME_IDX0="NET_PRES_0" +CONFIG_NET_PRES_TRANSPORT_AS_TCPIP_IDX0=y +CONFIG_NET_PRES_SUPPORT_STREAM_IDX0=y +CONFIG_NET_PRES_SUPPORT_DATAGRAM_IDX0=n +CONFIG_NET_PRES_SUPPORT_SERVER_IDX0=n +CONFIG_NET_PRES_SUPPORT_CLIENT_IDX0=y +CONFIG_NET_PRES_SUPPORT_ENCRYPTION0=y +CONFIG_NET_PRES_USE_WOLF_SSL_IDX0=y +CONFIG_NET_PRES_SUPPORT_STREAM_ENC_IDX0=y +CONFIG_NET_PRES_SUPPORT_CLIENT_ENC_IDX0=y +# +# from $HARMONY_VERSION_PATH/framework/net/pres/config/net_pres.hconfig +# +CONFIG_NET_PRES_BLOB_CERT_REPO=y +CONFIG_NET_PRES_BLOB_CLIENT_SUPPORT=y +CONFIG_NET_PRES_BLOB_CLIENT_CERT_FILENAME="ca-certs.h" +CONFIG_NET_PRES_BLOB_CLIENT_CERT_VARIABLE="caCert" +CONFIG_NET_PRES_BLOB_CLIENT_CERT_LEN_VARIABLE="caCert_len" +CONFIG_NET_PRES_BLOB_SERVER_SUPPORT=n +# +# from $HARMONY_VERSION_PATH/framework/osal/config/osal.hconfig +# +CONFIG_USE_OSAL=y +# +# from $HARMONY_VERSION_PATH/framework/peripheral/config/peripheral.hconfig +# +CONFIG_PERIPHERAL_LIB=y +# +# from $HARMONY_VERSION_PATH/framework/sample/config/sample_module.hconfig +# +CONFIG_USE_SAMPLE_MODULE=n +# +# from $HARMONY_VERSION_PATH/framework/system/clk/config/sys_clk.hconfig +# +CONFIG_USE_SYS_CLK=y +CONFIG_SYS_CLK_MODE="STATIC" +CONFIG_SYS_CLK_PBDIV0_MZ=2 +CONFIG_SYS_CLK_PBCLK1_ENABLE=y +CONFIG_SYS_CLK_PBDIV1=2 +CONFIG_SYS_CLK_PBCLK2_ENABLE=y +CONFIG_SYS_CLK_PBDIV2=2 +CONFIG_SYS_CLK_PBCLK3_ENABLE=y +CONFIG_SYS_CLK_PBDIV3=2 +CONFIG_SYS_CLK_PBCLK4_ENABLE=y +CONFIG_SYS_CLK_PBDIV4=2 +CONFIG_SYS_CLK_PBCLK6_ENABLE=y +CONFIG_SYS_CLK_PBDIV6=1 +CONFIG_SYS_CLK_PBCLK7_ENABLE=y +CONFIG_SYS_CLK_PBDIV7=1 +CONFIG_SYS_CLK_REFCLK0_ENABLE=n +CONFIG_SYS_CLK_REFCLK1_ENABLE=n +CONFIG_SYS_CLK_REFCLK2_ENABLE=n +CONFIG_SYS_CLK_REFCLK3_ENABLE=n +CONFIG_SYS_CLK_CONFIG_PRIMARY_XTAL="24000000" +CONFIG_SYS_CLK_CONFIG_SECONDARY_XTAL="" +CONFIG_SYS_CLK_FREQ="200000000" +CONFIG_SYS_CLK_PBCLK0_FREQ="100000000" +CONFIG_SYS_CLK_PBCLK1_FREQ="100000000" +CONFIG_SYS_CLK_PBCLK2_FREQ="100000000" +CONFIG_SYS_CLK_PBCLK3_FREQ="100000000" +CONFIG_SYS_CLK_PBCLK4_FREQ="100000000" +CONFIG_SYS_CLK_PBCLK6_FREQ="200000000" +CONFIG_SYS_CLK_PBCLK7_FREQ="200000000" +# +# from $HARMONY_VERSION_PATH/framework/system/command/config/sys_command.hconfig +# +CONFIG_USE_SYS_COMMAND=n +# +# from $HARMONY_VERSION_PATH/framework/system/common/config/sys_common.hconfig +# +CONFIG_USE_SYS_COMMON=y +CONFIG_SYS_BUFFER=n +CONFIG_SYS_QUEUE=n +# +# from $HARMONY_VERSION_PATH/framework/system/console/config/sys_console.hconfig +# +CONFIG_USE_SYS_CONSOLE=n +# +# from $HARMONY_VERSION_PATH/framework/system/debug/config/sys_debug.hconfig +# +CONFIG_USE_SYS_DEBUG=n +# +# from $HARMONY_VERSION_PATH/framework/system/devcon/config/sys_devcon.hconfig +# +CONFIG_USE_SYS_DEVCON=y +CONFIG_SYS_DEVCON_RTOS="Combined with System Tasks" +CONFIG_SYS_DEVCON_USE_JTAG=n +CONFIG_SYS_DEVCON_USE_TRACE=n +# +# from $HARMONY_VERSION_PATH/framework/system/dma/config/sys_dma.hconfig +# +CONFIG_USE_SYS_DMA=n +# +# from $HARMONY_VERSION_PATH/framework/system/fs/config/sys_fs.hconfig +# +CONFIG_USE_SYS_FS=y +CONFIG_SYS_FS_RTOS="Combined with System Tasks" +CONFIG_SYS_FS_MAX_FILES=25 +CONFIG_SYS_FS_MEDIA_MAX_BLOCK_SIZE=512 +CONFIG_SYS_FS_MEDIA_MANAGER_BUFFER_SIZE=2048 +CONFIG_SYS_FS_AUTO_MOUNT=y +CONFIG_SYS_FS_INSTANCES_NUMBER=1 +# +# from $HARMONY_VERSION_PATH/framework/system/fs/config/sys_fs_idx.ftl +# +CONFIG_SYS_FS_IDX0=y +CONFIG_SYS_FS_MEDIA_TYPE_DEFINE_IDX0="SYS_FS_MEDIA_TYPE_NVM" +CONFIG_SYS_FS_TYPE_DEFINE_IDX0="MPFS2" +CONFIG_SYS_FS_VOLUME_INSTANCES_NUMBER_IDX0=1 +CONFIG_SYS_FS_VOL_1_IDX0=y +CONFIG_SYS_FS_MEDIA_DEVICE_1_NAME_IDX0="/dev/nvma1" +CONFIG_SYS_FS_MEDIA_MOUNT_1_NAME_IDX0="/mnt/myDrive1" +# +# from $HARMONY_VERSION_PATH/framework/system/fs/config/sys_fs.hconfig +# +CONFIG_SYS_FS_MAX_FILE_SYSTEM_TYPE=1 +CONFIG_SYS_FS_FAT=n +CONFIG_SYS_FS_MPFS=y +CONFIG_SYS_FS_USE_MBR=n +# +# from $HARMONY_VERSION_PATH/framework/system/int/config/sys_int.hconfig +# +CONFIG_USE_SYS_INT=y +CONFIG_USE_EXT_INT=n +# +# from $HARMONY_VERSION_PATH/framework/system/msg/config/sys_msg.hconfig +# +CONFIG_USE_SYS_MSG=n +# +# from $HARMONY_VERSION_PATH/framework/system/ports/config/sys_ports.hconfig +# +CONFIG_USE_SYS_PORTS=y +CONFIG_SYS_PORTS_IMPLEMENTATION="STATIC" +CONFIG_COMPONENT_PACKAGE="TQFP" +CONFIG_USE_SYS_PORTS_CN_INTERRUPT=n +# +# from $HARMONY_VERSION_PATH/framework/system/ports/config/sys_ports_idx.ftl +# +CONFIG_USE_PORT_B=y +CONFIG_SYS_PORT_B_ANSEL=0x1f +CONFIG_SYS_PORT_B_TRIS=0x8f3f +CONFIG_SYS_PORT_B_LAT=0x4000 +CONFIG_SYS_PORT_B_ODC=0x0 +CONFIG_SYS_PORT_B_CNPU=0x0 +CONFIG_SYS_PORT_B_CNPD=0x0 +CONFIG_SYS_PORT_B_CNEN=0x0 +CONFIG_USE_PORT_C=y +CONFIG_SYS_PORT_C_ANSEL=0x6000 +CONFIG_SYS_PORT_C_TRIS=0x7000 +CONFIG_SYS_PORT_C_LAT=0x0 +CONFIG_SYS_PORT_C_ODC=0x0 +CONFIG_SYS_PORT_C_CNPU=0x0 +CONFIG_SYS_PORT_C_CNPD=0x0 +CONFIG_SYS_PORT_C_CNEN=0x0 +CONFIG_SYS_PORT_D_ANSEL=0x0 +CONFIG_SYS_PORT_D_TRIS=0xe3f +CONFIG_SYS_PORT_D_LAT=0x0 +CONFIG_SYS_PORT_D_ODC=0x0 +CONFIG_SYS_PORT_D_CNPU=0x0 +CONFIG_SYS_PORT_D_CNPD=0x0 +CONFIG_SYS_PORT_D_CNEN=0x0 +CONFIG_USE_PORT_E=y +CONFIG_SYS_PORT_E_ANSEL=0x0 +CONFIG_SYS_PORT_E_TRIS=0xff +CONFIG_SYS_PORT_E_LAT=0x0 +CONFIG_SYS_PORT_E_ODC=0x0 +CONFIG_SYS_PORT_E_CNPU=0x0 +CONFIG_SYS_PORT_E_CNPD=0x0 +CONFIG_SYS_PORT_E_CNEN=0x0 +CONFIG_USE_PORT_F=y +CONFIG_SYS_PORT_F_ANSEL=0x0 +CONFIG_SYS_PORT_F_TRIS=0x39 +CONFIG_SYS_PORT_F_LAT=0x0 +CONFIG_SYS_PORT_F_ODC=0x0 +CONFIG_SYS_PORT_F_CNPU=0x0 +CONFIG_SYS_PORT_F_CNPD=0x0 +CONFIG_SYS_PORT_F_CNEN=0x0 +CONFIG_SYS_PORT_G_ANSEL=0x3c0 +CONFIG_SYS_PORT_G_TRIS=0x3c0 +CONFIG_SYS_PORT_G_LAT=0x0 +CONFIG_SYS_PORT_G_ODC=0x0 +CONFIG_SYS_PORT_G_CNPU=0x0 +CONFIG_SYS_PORT_G_CNPD=0x0 +CONFIG_SYS_PORT_G_CNEN=0x0 +# +# from $HARMONY_VERSION_PATH/framework/system/ports/config/sys_ports_pps_output_idx.ftl +# +CONFIG_USE_PPS_OUTPUT_0=y +CONFIG_SYS_PORT_PPS_OUTPUT_FUNCTION_0="OUTPUT_FUNC_C2OUT" +CONFIG_SYS_PORT_PPS_OUTPUT_PIN_0="OUTPUT_PIN_RPB9" +# +# from $HARMONY_VERSION_PATH/framework/system/random/config/sys_random.hconfig +# +CONFIG_USE_SYS_RANDOM=y +CONFIG_SYS_RANDOM_CRYPTO_SEED_SIZE=32 +CONFIG_SYS_RANDOM_USE_CRYPTO_STRENGTH=n +# +# from $HARMONY_VERSION_PATH/framework/system/reset/config/sys_reset.hconfig +# +CONFIG_USE_SYS_RESET=n +# +# from $HARMONY_VERSION_PATH/framework/system/rtcc/config/sys_rtcc.hconfig +# +CONFIG_USE_SYS_RTCC=n +# +# from $HARMONY_VERSION_PATH/framework/system/touch/config/sys_touch.hconfig +# +CONFIG_USE_SYS_TOUCH=n +# +# from $HARMONY_VERSION_PATH/framework/system/tmr/config/sys_tmr.hconfig +# +CONFIG_USE_SYS_TMR=y +CONFIG_SYS_TMR_RTOS="Combined with System Tasks" +CONFIG_SYS_TMR_POWER_STATE="SYS_MODULE_POWER_RUN_FULL" +CONFIG_SYS_TMR_DRIVER_INDEX="DRV_TMR_INDEX_0" +CONFIG_SYS_TMR_MAX_CLIENT_OBJECTS=5 +CONFIG_SYS_TMR_FREQUENCY=1000 +CONFIG_SYS_TMR_FREQUENCY_TOLERANCE=10 +CONFIG_SYS_TMR_UNIT_RESOLUTION=10000 +CONFIG_SYS_TMR_CLIENT_TOLERANCE=10 +CONFIG_SYS_TMR_INTERRUPT_NOTIFICATION=n +# +# from $HARMONY_VERSION_PATH/framework/system/wdt/config/sys_wdt.hconfig +# +CONFIG_USE_SYS_WDT=n +# +# from $HARMONY_VERSION_PATH/framework/test/config/test.hconfig +# +CONFIG_USE_TEST_HARNESS=n +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/tcpip_stack.hconfig +# +CONFIG_USE_TCPIP_STACK=y +CONFIG_TCPIP_RTOS="Combined with System Tasks" +CONFIG_TCPIP_STACK_USE_IPV4=y +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/ip.hconfig +# +CONFIG_TCPIP_IPV4_FRAGMENTATION=n +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/tcpip_stack.hconfig +# +CONFIG_TCPIP_STACK_USE_IPV6=n +CONFIG_TCPIP_USE_TCP=y +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/tcp.hconfig +# +CONFIG_TCPIP_TCP_MAX_SEG_SIZE_TX=1460 +CONFIG_TCPIP_TCP_MAX_SEG_SIZE_RX_LOCAL=1460 +CONFIG_TCPIP_TCP_MAX_SEG_SIZE_RX_NON_LOCAL=536 +CONFIG_TCPIP_TCP_SOCKET_DEFAULT_TX_SIZE=512 +CONFIG_TCPIP_TCP_SOCKET_DEFAULT_RX_SIZE=4096 +CONFIG_TCPIP_TCP_DYNAMIC_OPTIONS=y +CONFIG_TCPIP_TCP_START_TIMEOUT_VAL=1000 +CONFIG_TCPIP_TCP_DELAYED_ACK_TIMEOUT=100 +CONFIG_TCPIP_TCP_FIN_WAIT_2_TIMEOUT=5000 +CONFIG_TCPIP_TCP_KEEP_ALIVE_TIMEOUT=10000 +CONFIG_TCPIP_TCP_CLOSE_WAIT_TIMEOUT=200 +CONFIG_TCPIP_TCP_MAX_RETRIES=5 +CONFIG_TCPIP_TCP_MAX_UNACKED_KEEP_ALIVES=6 +CONFIG_TCPIP_TCP_MAX_SYN_RETRIES=3 +CONFIG_TCPIP_TCP_AUTO_TRANSMIT_TIMEOUT_VAL=40 +CONFIG_TCPIP_TCP_WINDOW_UPDATE_TIMEOUT_VAL=200 +CONFIG_TCPIP_TCP_MAX_SOCKETS=15 +CONFIG_TCPIP_TCP_TASK_TICK_RATE=5 +CONFIG_TCPIP_TCP_MSL_TIMEOUT=0 +CONFIG_TCPIP_TCP_QUIET_TIME=0 +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/tcpip_stack.hconfig +# +CONFIG_TCPIP_USE_UDP=y +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/udp.hconfig +# +CONFIG_TCPIP_UDP_MAX_SOCKETS=10 +CONFIG_TCPIP_UDP_SOCKET_DEFAULT_TX_SIZE=512 +CONFIG_TCPIP_UDP_USE_TX_CHECKSUM=y +CONFIG_TCPIP_UDP_USE_RX_CHECKSUM=y +CONFIG_TCPIP_UDP_SOCKET_DEFAULT_TX_QUEUE_LIMIT=3 +CONFIG_TCPIP_UDP_SOCKET_DEFAULT_RX_QUEUE_LIMIT=3 +CONFIG_TCPIP_UDP_USE_POOL_BUFFERS=n +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/tcpip_stack.hconfig +# +CONFIG_TCPIP_STACK_NETWORK_CONFIG_NUMBER=1 +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/network_config_idx.ftl +# +CONFIG_TCPIP_STACK_NETWORK_CONFIG_IDX0=y +CONFIG_TCPIP_NETWORK_DEFAULT_INTERFACE_NAME_IDX0="PIC32INT" +CONFIG_TCPIP_NETWORK_DEFAULT_HOST_NAME_IDX0="IOT_ETHERNET" +CONFIG_TCPIP_NETWORK_DEFAULT_MAC_ADDR_IDX0="" +CONFIG_TCPIP_NETWORK_DEFAULT_IP_ADDRESS_IDX0="0.0.0.0" +CONFIG_TCPIP_NETWORK_DEFAULT_IP_MASK_IDX0="255.255.255.0" +CONFIG_TCPIP_NETWORK_DEFAULT_GATEWAY_IDX0="192.168.100.1" +CONFIG_TCPIP_NETWORK_DEFAULT_DNS_IDX0="192.168.100.1" +CONFIG_TCPIP_NETWORK_DEFAULT_SECOND_DNS_IDX0="0.0.0.0" +CONFIG_TCPIP_NETWORK_DEFAULT_POWER_MODE_IDX0="full" +CONFIG_TCPIP_NETWORK_INTERFACE_FLAG_DHCP_CLIENT_IDX0=y +CONFIG_TCPIP_NETWORK_INTERFACE_FLAG_ZCLL_IDX0=n +CONFIG_TCPIP_NETWORK_INTERFACE_FLAG_DHCP_SERVER_IDX0=n +CONFIG_TCPIP_NETWORK_INTERFACE_FLAG_DNS_CLIENT_IDX0=y +CONFIG_TCPIP_NETWORK_INTERFACE_FLAG_DNS_SERVER_IDX0=n +CONFIG_TCPIP_NETWORK_DEFAULT_MAC_DRIVER_IDX0="DRV_ETHMAC_PIC32MACObject" +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/tcpip_stack.hconfig +# +CONFIG_TCPIP_STACK_TICK_RATE=5 +CONFIG_TCPIP_STACK_USER_NOTIFICATION=n +CONFIG_TCPIP_STACK_DOWN_OPERATION=y +CONFIG_TCPIP_STACK_IF_UP_DOWN_OPERATION=y +CONFIG_TCPIP_STACK_CONFIGURATION_SAVE_RESTORE=y +CONFIG_TCPIP_STACK_SECURE_PORT_ENTRIES=10 +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/tcpip_heap.hconfig +# +CONFIG_TCPIP_USE_HEAP=y +CONFIG_TCPIP_STACK_USE_HEAP_CONFIG="TCPIP_STACK_HEAP_TYPE_INTERNAL_HEAP" +CONFIG_TCPIP_STACK_MALLOC_FUNC="malloc" +CONFIG_TCPIP_STACK_CALLOC_FUNC="calloc" +CONFIG_TCPIP_STACK_FREE_FUNC="free" +CONFIG_TCPIP_STACK_HEAP_USE_FLAGS="TCPIP_STACK_HEAP_FLAG_ALLOC_UNCACHED" +CONFIG_TCPIP_STACK_HEAP_USAGE_CONFIG="TCPIP_STACK_HEAP_USE_DEFAULT" +CONFIG_TCPIP_STACK_SUPPORTED_HEAPS=1 +CONFIG_TCPIP_STACK_DRAM_SIZE=39250 +CONFIG_TCPIP_STACK_DRAM_RUN_LIMIT=2048 +CONFIG_TCPIP_STACK_DRAM_DEBUG_ENABLE=n +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/arp.hconfig +# +CONFIG_TCPIP_ARP_CACHE_ENTRIES=5 +CONFIG_TCPIP_ARP_CACHE_DELETE_OLD=y +CONFIG_TCPIP_ARP_CACHE_SOLVED_ENTRY_TMO=1200 +CONFIG_TCPIP_ARP_CACHE_PENDING_ENTRY_TMO=60 +CONFIG_TCPIP_ARP_CACHE_PENDING_RETRY_TMO=2 +CONFIG_TCPIP_ARP_CACHE_PERMANENT_QUOTA=50 +CONFIG_TCPIP_ARP_CACHE_PURGE_THRESHOLD=75 +CONFIG_TCPIP_ARP_CACHE_PURGE_QUANTA=1 +CONFIG_TCPIP_ARP_CACHE_ENTRY_RETRIES=3 +CONFIG_TCPIP_ARP_GRATUITOUS_PROBE_COUNT=1 +CONFIG_TCPIP_ARP_TASK_PROCESS_RATE=2 +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/berkeley_api.hconfig +# +CONFIG_TCPIP_STACK_USE_BERKELEY_API=n +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/dhcp.hconfig +# +CONFIG_TCPIP_STACK_USE_DHCP_CLIENT=y +CONFIG_TCPIP_DHCP_TIMEOUT=10 +CONFIG_TCPIP_DHCP_TASK_TICK_RATE=5 +CONFIG_TCPIP_DHCP_CLIENT_ENABLED=y +CONFIG_TCPIP_DHCP_HOST_NAME_SIZE=20 +CONFIG_TCPIP_DHCP_CLIENT_CONNECT_PORT=68 +CONFIG_TCPIP_DHCP_SERVER_LISTEN_PORT=67 +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/dhcps.hconfig +# +CONFIG_TCPIP_STACK_USE_DHCP_SERVER=n +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/dns.hconfig +# +CONFIG_TCPIP_USE_DNS_CLIENT=y +CONFIG_TCPIP_DNS_CLIENT_SERVER_TMO=60 +CONFIG_TCPIP_DNS_CLIENT_TASK_PROCESS_RATE=200 +CONFIG_TCPIP_DNS_CLIENT_CACHE_ENTRIES=5 +CONFIG_TCPIP_DNS_CLIENT_CACHE_ENTRY_TMO=0 +CONFIG_TCPIP_DNS_CLIENT_CACHE_PER_IPV4_ADDRESS=5 +CONFIG_TCPIP_DNS_CLIENT_CACHE_PER_IPV6_ADDRESS=1 +CONFIG_TCPIP_DNS_CLIENT_ADDRESS_TYPE="IP_ADDRESS_TYPE_IPV4" +CONFIG_TCPIP_DNS_CLIENT_CACHE_DEFAULT_TTL_VAL=1200 +CONFIG_TCPIP_DNS_CLIENT_CACHE_UNSOLVED_ENTRY_TMO=10 +CONFIG_TCPIP_DNS_CLIENT_LOOKUP_RETRY_TMO=3 +CONFIG_TCPIP_DNS_CLIENT_MAX_HOSTNAME_LEN=256 +CONFIG_TCPIP_DNS_CLIENT_MAX_SELECT_INTERFACES=4 +CONFIG_TCPIP_DNS_CLIENT_DELETE_OLD_ENTRIES=y +CONFIG_TCPIP_DNS_CLIENT_USER_NOTIFICATION=n +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/dnss.hconfig +# +CONFIG_TCPIP_USE_DNSS=n +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/ddns.hconfig +# +CONFIG_TCPIP_USE_DDNS=n +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/ftp.hconfig +# +CONFIG_TCPIP_USE_FTP_MODULE=n +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/http.hconfig +# +CONFIG_TCPIP_STACK_USE_HTTP_SERVER=n +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/http_net.hconfig +# +CONFIG_TCPIP_STACK_USE_HTTP_NET_SERVER=n +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/icmp.hconfig +# +CONFIG_TCPIP_STACK_USE_ICMPV4=n +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/nbns.hconfig +# +CONFIG_TCPIP_USE_NBNS=y +CONFIG_TCPIP_NBNS_TASK_TICK_RATE=110 +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/tcpip_reboot.hconfig +# +CONFIG_TCPIP_USE_REBOOT_SERVER=n +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/smtp.hconfig +# +CONFIG_TCPIP_USE_SMTP_CLIENT=n +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/smtpc.hconfig +# +CONFIG_TCPIP_USE_SMTPC_CLIENT=n +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/snmp.hconfig +# +CONFIG_TCPIP_USE_SNMP=n +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/sntp.hconfig +# +CONFIG_TCPIP_USE_SNTP_CLIENT=y +CONFIG_TCPIP_NTP_DEFAULT_IF="PIC32INT" +CONFIG_TCPIP_NTP_STRING_VERSION="SNTP_VERSION_4" +CONFIG_TCPIP_NTP_DEFAULT_CONNECTION_TYPE="IP_ADDRESS_TYPE_IPV4" +CONFIG_TCPIP_NTP_EPOCH=2208988800 +CONFIG_TCPIP_NTP_REPLY_TIMEOUT=6 +CONFIG_TCPIP_NTP_MAX_STRATUM=15 +CONFIG_TCPIP_NTP_TIME_STAMP_TMO=660 +CONFIG_TCPIP_NTP_SERVER="pool.ntp.org" +CONFIG_TCPIP_NTP_SERVER_MAX_LENGTH="30" +CONFIG_TCPIP_NTP_QUERY_INTERVAL="600" +CONFIG_TCPIP_NTP_FAST_QUERY_INTERVAL="14" +CONFIG_TCPIP_NTP_TASK_TICK_RATE="1100" +CONFIG_TCPIP_NTP_RX_QUEUE_LIMIT="2" +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/telnet.hconfig +# +CONFIG_TCPIP_USE_TELNET=n +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/zeroconf.hconfig +# +CONFIG_TCPIP_USE_LINK_ZERO_CONFIG=n +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/tcpip_announce.hconfig +# +CONFIG_TCPIP_USE_ANNOUNCE=n +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/iperf.hconfig +# +CONFIG_TCPIP_USE_IPERF=n +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/tcpip_cmd.hconfig +# +CONFIG_TCPIP_STACK_USE_COMMANDS=n +CONFIG_TCPIP_STACK_COMMANDS_ICMP_ECHO_REQUEST_BUFF_SIZE=2000 +CONFIG_TCPIP_STACK_COMMANDS_ICMP_ECHO_REQUEST_DATA_SIZE=100 +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/tftpc.hconfig +# +CONFIG_TCPIP_USE_TFTPC_MODULE=n +# +# from $HARMONY_VERSION_PATH/framework/usb/config/usb.hconfig +# +CONFIG_USE_USB_STACK=y +CONFIG_USB_RTOS="Combined with System Tasks" +CONFIG_DRV_USB_INTERRUPT_MODE=y +CONFIG_DRV_USB_DEVICE_SUPPORT=y +CONFIG_DRV_USB_HOST_SUPPORT=n +CONFIG_DRV_USB_BETA_SW_HOST_SUPPORT=n +CONFIG_DRV_USB_ENDPOINTS_NUMBER=3 +CONFIG_USB_DEVICE_EP0_BUFFER_SIZE="64" +# +# from $HARMONY_VERSION_PATH/framework/usb/config/usb_device_idx.ftl +# +CONFIG_USB_DEVICE_INST_IDX0=y +CONFIG_USB_DEVICE_SPEED_HS_IDX0="USB_SPEED_FULL" +CONFIG_USB_DEVICE_NUMBER_REGISTRED_FUNCTION_DRIVER_IDX0=1 +CONFIG_USB_DEVICE_FUNCTION_1_IDX0=y +# +# from $HARMONY_VERSION_PATH/framework/usb/config/usb_device_function_1.ftl +# +CONFIG_USB_DEVICE_FUNCTION_1_DEVICE_CLASS_IDX0="CDC" +CONFIG_USB_DEVICE_FUNCTION_1_CONFIGURATION_IDX0=1 +CONFIG_USB_DEVICE_FUNCTION_1_INTERFACE_NUMBER_IDX0=0 +CONFIG_USB_DEVICE_FUNCTION_1_SPEED_HS_IDX0="USB_SPEED_FULL" +CONFIG_USB_DEVICE_FUNCTION_1_CDC_READ_Q_SIZE_IDX0=512 +CONFIG_USB_DEVICE_FUNCTION_1_CDC_WRITE_Q_SIZE_IDX0=512 +CONFIG_USB_DEVICE_FUNCTION_1_CDC_SERIAL_NOTIFIACATION_Q_SIZE_IDX0=1 +CONFIG_USB_DEVICE_FUNCTION_1_CDC_INT_ENDPOINT_NUMBER_IDX0=1 +CONFIG_USB_DEVICE_FUNCTION_1_CDC_BULK_ENDPOINT_NUMBER_IDX0=2 +# +# from $HARMONY_VERSION_PATH/framework/usb/config/usb_device_idx.ftl +# +CONFIG_USB_DEVICE_PRODUCT_ID_SELECT_IDX0="cdc_com_port_single_demo" +CONFIG_USB_DEVICE_VENDOR_ID_IDX0="0x04D8" +CONFIG_USB_DEVICE_PRODUCT_ID_IDX0="0x000A" +CONFIG_USB_DEVICE_MANUFACTURER_STRING_IDX0="Microchip Technology Inc." +CONFIG_USB_DEVICE_PRODUCT_STRING_DESCRIPTOR_IDX0="IoT Ethernet" +CONFIG_USB_DEVICE_SUSPEND_IN_SLEEP_IDX0=n +CONFIG_DRV_USB_INTERRUPT_PRIORITY_IDX0="INT_PRIORITY_LEVEL1" +CONFIG_DRV_USB_INTERRUPT_SUB_PRIORITY_IDX0="INT_SUBPRIORITY_LEVEL0" +CONFIG_DRV_USBDMA_INTERRUPT_PRIORITY_IDX0="INT_PRIORITY_LEVEL1" +CONFIG_DRV_USBDMA_INTERRUPT_SUB_PRIORITY_IDX0="INT_SUBPRIORITY_LEVEL0" +CONFIG_USB_DEVICE_POWER_STATE_IDX0="SYS_MODULE_POWER_RUN_FULL" +# +# from $HARMONY_VERSION_PATH/framework/usb/config/usb.hconfig +# +CONFIG_USB_DEVICE_SOF_EVENT_ENABLE=y +CONFIG_USB_DEVICE_SET_DESCRIPTOR_EVENT_ENABLE=n +CONFIG_USB_DEVICE_SYNCH_FRAME_EVENT_ENABLE=n +CONFIG_USB_DEVICE_REMOTE_WAKEUP=n +CONFIG_USB_DEVICE_BOS_DESCRIPTOR_SUPPORT=n +CONFIG_USB_DEVICE_STRING_DESCRIPTOR_TABLE_ADVANCED=n +# +# from $HARMONY_VERSION_PATH/bsp/config/bsp.hconfig +# +CONFIG_USE_BSP=n +# +# from $HARMONY_VERSION_PATH/third_party/rtos/config/rtos.hconfig +# +CONFIG_USE_3RDPARTY_RTOS=y +CONFIG_3RDPARTY_RTOS_USED="FreeRTOS" +# +# from $HARMONY_VERSION_PATH/third_party/rtos/FreeRTOS/config/freertos_menu.hconfig +# +CONFIG_FREERTOS_PREEMPTIVE_SCHEDULER=y +CONFIG_FREERTOS_COOPERATIVE_SCHEDULER=n +CONFIG_FREERTOS_PORT_OPTIMIZED_TASK_SELECTION=y +CONFIG_FREERTOS_GENERIC_TASK_SELECTION=n +CONFIG_FREERTOS_TICKLESS_IDLE=n +CONFIG_FREERTOS_TICK_INTERRUPT=y +CONFIG_FREERTOS_CPU_CLOCK_HZ="200000000" +CONFIG_FREERTOS_PERIPHERAL_CLOCK_HZ="100000000" +CONFIG_FREERTOS_TIMER_ID="TMR_ID_1" +CONFIG_FREERTOS_TICK_RATE_HZ=1000 +CONFIG_FREERTOS_MAX_PRIORITIES=5 +CONFIG_FREERTOS_MINIMAL_STACK_SIZE=512 +CONFIG_FREERTOS_ISR_STACK_SIZE=1024 +CONFIG_FREERTOS_DYNAMIC_ALLOC=y +CONFIG_FREERTOS_STATIC_ALLOC=n +CONFIG_FREERTOS_HEAP_1=n +CONFIG_FREERTOS_HEAP_2=y +CONFIG_FREERTOS_HEAP_3=n +CONFIG_FREERTOS_HEAP_4=n +CONFIG_FREERTOS_HEAP_5=n +CONFIG_FREERTOS_TOTAL_HEAP_SIZE=131072 +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16 +CONFIG_FREERTOS_USE_16_BIT_TICKS=n +CONFIG_FREERTOS_IDLE_SHOULD_YIELD=y +CONFIG_FREERTOS_USE_MUTEXES=y +CONFIG_FREERTOS_USE_RECURSIVE_MUTEXES=n +CONFIG_FREERTOS_USE_COUNTING_SEMAPHORES=y +CONFIG_FREERTOS_USE_TASK_NOTIFICATIONS=y +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_USE_QUEUE_SETS=n +CONFIG_FREERTOS_USE_TIME_SLICING=n +CONFIG_FREERTOS_USE_NEWLIB_REENTRANT=n +CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY=n +CONFIG_FREERTOS_USE_TASK_FPU_SUPPORT=n +CONFIG_FREERTOS_IDLE_HOOK=n +CONFIG_FREERTOS_TICK_HOOK=n +CONFIG_FREERTOS_NO_STACK_OVERFLOW_CHECK=n +CONFIG_FREERTOS_STACK_OVERFLOW_CHECK_METHOD_1=n +CONFIG_FREERTOS_STACK_OVERFLOW_CHECK_METHOD_2=y +CONFIG_FREERTOS_USE_MALLOC_FAILED_HOOK=y +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=n +CONFIG_FREERTOS_USE_TRACE_FACILITY=n +CONFIG_FREERTOS_USE_CO_ROUTINES=n +CONFIG_FREERTOS_MAX_CO_ROUTINE_PRIORITIES=2 +CONFIG_FREERTOS_USE_TIMERS=n +CONFIG_FREERTOS_USE_APPLICATION_TASK_TAG=n +CONFIG_FREERTOS_USE_CONFIGASSERT=n +CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITY=1 +CONFIG_FREERTOS_MAX_SYSCALL_INTERRUPT_PRIORITY=3 +CONFIG_FREERTOS_INCLUDE_VTASKPRIORITYSET=y +CONFIG_FREERTOS_INCLUDE_UXTASKPRIORITYGET=y +CONFIG_FREERTOS_INCLUDE_VTASKDELETE=y +CONFIG_FREERTOS_INCLUDE_VTASKSUSPEND=y +CONFIG_FREERTOS_INCLUDE_VTASKDELAYUNTIL=y +CONFIG_FREERTOS_INCLUDE_VTASKDELAY=y +CONFIG_FREERTOS_INCLUDE_UXTASKGETSTACKHIGHWATERMARK=n +CONFIG_FREERTOS_INCLUDE_XTASKGETSCHEDULERSTATE=n +CONFIG_FREERTOS_INCLUDE_XTASKGETCURRENTTASKHANDLE=n +CONFIG_FREERTOS_INCLUDE_XTASKGETIDLETASKHANDLE=n +CONFIG_FREERTOS_INCLUDE_ETASKGETSTATE=n +CONFIG_FREERTOS_INCLUDE_XEVENTGROUPSETBITFROMISR=n +CONFIG_FREERTOS_INCLUDE_XTIMERPENDFUNCTIONCALL=n +CONFIG_FREERTOS_INCLUDE_XTASKABORTDELAY=n +CONFIG_FREERTOS_INCLUDE_XTASKGETHANDLE=n +# +# from $HARMONY_VERSION_PATH/third_party/tcpip/config/wolfssl.hconfig +# +CONFIG_USE_3RDPARTY_WOLFSSL=y +CONFIG_WOLFSSL_MULTI_THREAD_SUPPORT=n +CONFIG_WOLFSSL_USE_FAST_MATH=y +CONFIG_WOLFSSL_USE_MZ_CRYPTO=n +CONFIG_WOLFSSL_TLS=y +CONFIG_WOLFSSL_DH=y +CONFIG_WOLFSSL_PSK=y +CONFIG_WOLFSSL_PWDBASED=y +CONFIG_WOLFSSL_CERT_GEN=n +CONFIG_WOLFSSL_DER_LOAD=n +CONFIG_WOLFSSL_DTLS=n +CONFIG_WOLFSSL_KEY_GEN=n +CONFIG_WOLFSSL_HAVE_CRL=n +CONFIG_WOLFSSL_HAVE_ECC=n +CONFIG_WOLFSSL_HAVE_LIBZ=n +CONFIG_WOLFSSL_HAVE_OCSP=n +CONFIG_WOLFSSL_DES3=y +CONFIG_WOLFSSL_AES=y +CONFIG_WOLFSSL_HAVE_AESCCM=n +CONFIG_WOLFSSL_HAVE_AESGCM=n +CONFIG_WOLFSSL_DSA=y +CONFIG_WOLFSSL_HMAC=y +CONFIG_WOLFSSL_RC4=y +CONFIG_WOLFSSL_RABBIT=y +CONFIG_WOLFSSL_HC128=y +CONFIG_WOLFSSL_HAVE_CAMELLIA=n +CONFIG_WOLFSSL_MD4=y +CONFIG_WOLFSSL_SHA256=y +CONFIG_WOLFSSL_RIPEMD=n +CONFIG_WOLFSSL_SHA384=n +CONFIG_WOLFSSL_SHA512=n +CONFIG_WOLFSSL_SESSION_CACHE=y +CONFIG_WOLFSSL_SMALL_SESSION_CACHE=n +CONFIG_WOLFSSL_ERROR_STRINGS=y +CONFIG_WOLFSSL_WOLFSSL_CLIENT=y +CONFIG_WOLFSSL_WOLFSSL_SERVER=y +CONFIG_WOLFSSL_DEBUG_SUPPORT=n +CONFIG_WOLFSSL_OPENSSL_EXTRA=n +CONFIG_WOLFSSL_OLD_TLS_SUPPORT=y +# +# from $HARMONY_VERSION_PATH/third_party/tcpip/iniche/config/embtcp.hconfig +# +CONFIG_IN_EMB_TCPIP_USE_TCP=n +# +# from $HARMONY_VERSION_PATH/third_party/tcpip/iniche/config/embdual.hconfig +# +CONFIG_IN_EMB_DUAL_USE_TCP=n +# +# from $HARMONY_VERSION_PATH/third_party/tcpip/iniche/config/stack.hconfig +# +CONFIG_IN_TCPIP=n +# +# from $HARMONY_VERSION_PATH/third_party/gfx/config/gfxtp.hconfig +# +CONFIG_3RDPARTY_SEGGER_EMWIN_LIBRARY=n +# +# from $HARMONY_VERSION_PATH/config/harmony.hconfig +# +CONFIG_DEVICE_CONFIGURATION=y +# +# from $HARMONY_VERSION_PATH/utilities/mhc/config/PIC32MZ2048EFM064.hconfig +# +CONFIG_USERID=0xffff +CONFIG_FMIIEN="OFF" +CONFIG_FETHIO="ON" +CONFIG_PGL1WAY="ON" +CONFIG_PMDL1WAY="ON" +CONFIG_IOL1WAY="ON" +CONFIG_FUSBIDIO="OFF" +CONFIG_FPLLIDIV="DIV_3" +CONFIG_FPLLRNG="RANGE_8_16_MHZ" +CONFIG_FPLLICLK="PLL_POSC" +CONFIG_FPLLMULT="MUL_50" +CONFIG_FPLLODIV="DIV_2" +CONFIG_UPLLFSEL="FREQ_24MHZ" +CONFIG_FNOSC="SPLL" +CONFIG_DMTINTV="WIN_127_128" +CONFIG_FSOSCEN="OFF" +CONFIG_IESO="OFF" +CONFIG_POSCMOD="EC" +CONFIG_OSCIOFNC="OFF" +CONFIG_FCKSM="CSECME" +CONFIG_WDTPS="PS1048576" +CONFIG_WDTSPGM="STOP" +CONFIG_WINDIS="NORMAL" +CONFIG_FWDTEN="OFF" +CONFIG_FWDTWINSZ="WINSZ_25" +CONFIG_DMTCNT="DMT31" +CONFIG_FDMTEN="OFF" +CONFIG_DEBUG="OFF" +CONFIG_JTAGEN="OFF" +CONFIG_ICESEL="ICS_PGx1" +CONFIG_TRCEN="OFF" +CONFIG_BOOTISA="MIPS32" +CONFIG_FECCCON="OFF_UNLOCKED" +CONFIG_FSLEEP="OFF" +CONFIG_FDBGWP="WP_DEBUG" +CONFIG_DBGPER="PG_ALL" +CONFIG_SMCLR="MCLR_NORM" +CONFIG_SOSCGAIN="GAIN_2X" +CONFIG_SOSCBOOST="ON" +CONFIG_POSCGAIN="GAIN_2X" +CONFIG_POSCBOOST="ON" +CONFIG_EJTAGBEN="NORMAL" +CONFIG_CP="OFF" +CONFIG_TSEQ=0x0000 +CONFIG_CSEQ=0xffff +# +# from $HARMONY_VERSION_PATH/config/harmony.hconfig +# +CONFIG_PROJECT_STANDALONE=n +# +# from $HARMONY_VERSION_PATH/utilities/mhc/config/project.hconfig +# +CONFIG_XC32_HEAP="262144" +# +# from $HARMONY_VERSION_PATH/utilities/mhc/config/isa.hconfig +# +CONFIG_ISA_MIPS32_MODE=y +CONFIG_ISA_MICROMIPS_MODE=n diff --git a/software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/FreeRTOSConfig.h b/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/FreeRTOSConfig.h similarity index 93% rename from software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/FreeRTOSConfig.h rename to software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/FreeRTOSConfig.h index 398fd5b..5139e5f 100644 --- a/software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/FreeRTOSConfig.h +++ b/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/FreeRTOSConfig.h @@ -1,5 +1,5 @@ /* - FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd. + FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -90,6 +90,8 @@ #define configMAX_PRIORITIES ( 5UL ) #define configMINIMAL_STACK_SIZE ( 512 ) #define configISR_STACK_SIZE ( 1024 ) +#define configSUPPORT_DYNAMIC_ALLOCATION 1 +#define configSUPPORT_STATIC_ALLOCATION 0 #define configTOTAL_HEAP_SIZE ( ( size_t ) 131072 ) #define configMAX_TASK_NAME_LEN ( 16 ) #define configUSE_16_BIT_TICKS 0 @@ -125,6 +127,7 @@ #define configTIMER_TASK_PRIORITY #define configTIMER_QUEUE_LENGTH #define configTIMER_TASK_STACK_DEPTH +#define configUSE_DAEMON_TASK_STARTUP_HOOK 0 /* Misc */ #define configUSE_APPLICATION_TASK_TAG 0 @@ -143,7 +146,6 @@ Only API functions that end in ...FromISR() can be used within interrupts. */ #define INCLUDE_vTaskPrioritySet 1 #define INCLUDE_uxTaskPriorityGet 1 #define INCLUDE_vTaskDelete 1 -#define INCLUDE_vTaskCleanUpResources 0 #define INCLUDE_vTaskSuspend 1 #define INCLUDE_vTaskDelayUntil 1 #define INCLUDE_vTaskDelay 1 @@ -151,10 +153,10 @@ Only API functions that end in ...FromISR() can be used within interrupts. */ #define INCLUDE_xTaskGetCurrentTaskHandle 0 #define INCLUDE_uxTaskGetStackHighWaterMark 0 #define INCLUDE_xTaskGetIdleTaskHandle 0 -#define INCLUDE_xTimerGetTimerDaemonTaskHandle 0 -#define INCLUDE_pcTaskGetTaskName 0 #define INCLUDE_eTaskGetState 0 #define INCLUDE_xEventGroupSetBitFromISR 0 #define INCLUDE_xTimerPendFunctionCall 0 +#define INCLUDE_xTaskAbortDelay 0 +#define INCLUDE_xTaskGetHandle 0 #endif /* FREERTOS_CONFIG_H */ diff --git a/software/aws-iot-ethernet/firmware/src/bsp_config.h b/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/bsp_config.h similarity index 95% rename from software/aws-iot-ethernet/firmware/src/bsp_config.h rename to software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/bsp_config.h index 36df275..fec7dd2 100755 --- a/software/aws-iot-ethernet/firmware/src/bsp_config.h +++ b/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/bsp_config.h @@ -8,11 +8,11 @@ bsp_config.h Summary: - Board Support Package Header file for IoT Wi-Fi n AWS IoT St. + Board Support Package Header file for IoT Ethernet Description: This file contains constants, macros, type defintions and function - declarations required by the IoT Wi-Fi G AWS IoT Starter Kit + declarations required by the IoT Ethernet *******************************************************************************/ diff --git a/software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/config.h b/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/config.h similarity index 100% rename from software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/config.h rename to software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/config.h diff --git a/software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/configuration.xml b/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/configuration.xml similarity index 82% rename from software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/configuration.xml rename to software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/configuration.xml index 9ede469..9e8ae3b 100644 --- a/software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/configuration.xml +++ b/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/configuration.xml @@ -1,9 +1,13 @@ - + + + + + - + - + @@ -12,6 +16,10 @@ tfm.h Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + + dhcp_private.h + Header Files/framework/tcpip/src + ecdsa.h Header Files/third_party/tcpip/wolfssl/cyassl/openssl @@ -21,21 +29,13 @@ Source Files/framework/crypto/src - zero_conf_helper.h - Header Files/framework/tcpip/stack - - - udp_private.h - Header Files/framework/tcpip/stack + helpers.h + Header Files/framework/tcpip/src/common usb_device_local.h Header Files/framework/usb/src - - sys_reset_mapping.h - Header Files/framework/system/reset/src - dsa.c Source Files/third_party/wolfssl/wolfcrypt @@ -64,21 +64,17 @@ usb_device.c Source Files/framework/usb/src/dynamic - - dns_manager.h - Header Files/framework/tcpip/stack - mem_track.h Header Files/third_party/tcpip/wolfssl/wolfssl - blake2-impl.h - Header Files/third_party/wolfssl/wolfcrypt + ipv6_manager.h + Header Files/framework/tcpip/src - sys_console_usb_cdc.c - Source Files/framework/system/console/src + blake2-impl.h + Header Files/third_party/wolfssl/wolfcrypt conf.h @@ -88,14 +84,26 @@ sha512.c Source Files/framework/crypto/src + + tcp_private.h + Header Files/framework/tcpip/src + tls.h Header Files/framework/tcpip + + zero_conf_helper.h + Header Files/framework/tcpip/src + settings.h Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + drv_extphy_smsc8700.h + Header Files/framework/driver/ethphy/src/dynamic + system.h Header Files/framework/system @@ -104,6 +112,10 @@ unit.h Header Files/third_party/tcpip/wolfssl/tests + + oahash.c + Source Files/framework/tcpip/src + sys_fs_media_manager.h Header Files/framework/system/fs @@ -121,21 +133,17 @@ Header Files/framework/peripheral - version.h - Header Files/third_party/tcpip/wolfssl/cyassl + dns_private.h + Header Files/framework/tcpip/src - ipv4_private.h - Header Files/framework/tcpip/stack + version.h + Header Files/third_party/tcpip/wolfssl/cyassl drv_tmr.h Header Files/framework/driver/tmr - - tcp_manager.h - Header Files/framework/tcpip/stack - srp.h Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt @@ -160,30 +168,10 @@ sha.h Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt - - tcpip_manager.c - Source Files/framework/tcpip/stack - - - tcpip_notify.h - Header Files/framework/tcpip/stack - des3.h Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt - - drv_ethphy_local.h - Header Files/framework/driver/ethphy - - - tcpip_module_manager.h - Header Files/framework/tcpip/stack - - - zero_conf_link_local_private.h - Header Files/framework/tcpip/stack - hash.c Source Files/framework/crypto/src @@ -196,10 +184,6 @@ hc128.h Header Files/framework/crypto/src - - arp_private.h - Header Files/framework/tcpip/stack - logging.c Source Files/framework/crypto/src @@ -216,6 +200,10 @@ md4.h Header Files/framework/crypto/src + + ipv4_manager.h + Header Files/framework/tcpip/src + ui.h Header Files/third_party/tcpip/wolfssl/cyassl/openssl @@ -276,10 +264,6 @@ hmac.h Header Files/third_party/tcpip/wolfssl/cyassl/openssl - - drv_extphy_smsc8740.h - Header Files/framework/driver/ethphy - net_pres_socketapiconversion.h Header Files/framework/net/pres @@ -292,6 +276,10 @@ fips_test.h Header Files/third_party/wolfssl/wolfcrypt + + tcpip_commands_manager.h + Header Files/framework/tcpip/src + driver.h Header Files/framework/driver @@ -333,8 +321,8 @@ Header Files/framework/usb - sys_console_usb_cdc_local.h - Header Files/framework/system/console/src + aes_cbc.h + Header Files/framework/tcpip/src/crypto sys_tmr_local.h @@ -404,14 +392,14 @@ sys_int.h Header Files/framework/system/int - - http_private.h - Header Files/framework/tcpip/stack - client.h Header Files/third_party/tcpip/wolfssl/examples/client + + ndp_manager.h + Header Files/framework/tcpip/src + error-crypt.h Header Files/third_party/wolfssl/wolfcrypt @@ -432,10 +420,6 @@ tasks.c Source Files/FreeRTOS - - link_list.h - Header Files/framework/tcpip/stack - usb_common.h Header Files/framework/usb @@ -452,26 +436,26 @@ rabbit.h Header Files/framework/crypto/src - - sys_debug_local.h - Header Files/framework/system/debug/src - dh.h Header Files/third_party/tcpip/wolfssl/wolfssl/openssl - bn.h - Header Files/third_party/tcpip/wolfssl/cyassl/openssl + drv_ethmac_lib.h + Header Files/framework/driver/ethmac/src/dynamic - oahash.c - Source Files/framework/tcpip/stack + bn.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl osal_impl_none.h Header Files/framework/osal/src + + tftpc_manager.h + Header Files/framework/tcpip/src + ec.h Header Files/third_party/tcpip/wolfssl/cyassl/openssl @@ -488,6 +472,10 @@ sys_devcon_cache_pic32mz.S Source Files/framework/system/devcon/src + + aes_ecb_pic32.h + Header Files/framework/tcpip/src/crypto + rsa.h Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt @@ -497,8 +485,8 @@ Header Files/framework/crypto/src - tcpip_private.h - Header Files/framework/tcpip/stack + drv_extphy_smsc8720.h + Header Files/framework/driver/ethphy/src/dynamic md4.h @@ -529,12 +517,12 @@ Header Files/framework/system/fs/src - dsa.h - Header Files/framework/crypto/src + nbns_manager.h + Header Files/framework/tcpip/src - sntp_manager.h - Header Files/framework/tcpip/stack + dsa.h + Header Files/framework/crypto/src tcpip.h @@ -544,18 +532,10 @@ ge_operations.h Header Files/third_party/wolfssl/wolfcrypt - - sys_fs_wrapper.c - Source Files/framework/tcpip/common - sys_queue.h Header Files/framework/system/common - - sys_console_local.h - Header Files/framework/system/console/src - md2.c Source Files/third_party/wolfssl/wolfcrypt @@ -564,6 +544,10 @@ ripemd.h Header Files/third_party/wolfssl/wolfcrypt + + dhcps_private.h + Header Files/framework/tcpip/src + net_pres_socketapi.h Header Files/framework/net/pres @@ -573,28 +557,20 @@ Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt - tcpip_packet.c - Source Files/framework/tcpip/stack + ipv4_private.h + Header Files/framework/tcpip/src sys_fs.h Header Files/framework/system/fs - - tcpip_heap_alloc.c - Source Files/framework/tcpip/stack - - - arp_manager.h - Header Files/framework/tcpip/stack - version.h Header Files/third_party/tcpip/wolfssl/wolfssl - zero_conf_helper.c - Source Files/framework/tcpip/stack + tcpip_commands.h + Header Files/framework/tcpip zero_conf_link_local.h @@ -617,17 +593,21 @@ Source Files/framework/system/devcon/src - tcpip_packet.h - Header Files/framework/tcpip/stack + tcpip_types.h + Header Files/framework/tcpip/src - tcpip_helpers_private.h - Header Files/framework/tcpip/stack + berkeley_manager.h + Header Files/framework/tcpip/src - berkeley_manager.h + http_manager.h Header Files/framework/tcpip/src + + smtp.h + Header Files/framework/tcpip + sha.h Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt @@ -637,17 +617,13 @@ Header Files/third_party/tcpip/wolfssl/cyassl/openssl - sys_console.h - Header Files/framework/system/console + ndp.h + Header Files/framework/tcpip net_pres.c Source Files/framework/net/pres - - tcp.c - Source Files/framework/tcpip/stack - wc_port.h Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt @@ -656,14 +632,14 @@ port.h Header Files/framework/crypto/src - - tcpip_helpers.c - Source Files/framework/tcpip/stack - camellia.c Source Files/third_party/wolfssl/wolfcrypt + + smtpc_manager.h + Header Files/framework/tcpip/src + blake2-int.h Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt @@ -672,6 +648,10 @@ sys_devcon.c Source Files/framework/system/devcon/src + + hash_fnv.c + Source Files/framework/tcpip/src + sha.h Header Files/third_party/tcpip/wolfssl/wolfssl/openssl @@ -684,10 +664,6 @@ sys_tmr.h Header Files/framework/system/tmr - - udp.c - Source Files/framework/tcpip/stack - ocsp.h Header Files/third_party/tcpip/wolfssl/cyassl @@ -705,16 +681,16 @@ Header Files/framework/crypto/src - ocsp.h - Header Files/third_party/tcpip/wolfssl/cyassl/openssl + udp.c + Source Files/framework/tcpip/src - ipv4.c - Source Files/framework/tcpip/stack + ocsp.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl - dhcp_private.h - Header Files/framework/tcpip/stack + tcpip_notify.c + Source Files/framework/tcpip/src projdefs.h @@ -736,10 +712,6 @@ lldp_manager.h Header Files/framework/tcpip/src - - tcpip_announce.c - Source Files/framework/tcpip/stack - http.h Header Files/framework/tcpip @@ -748,6 +720,10 @@ integer.h Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + + tcpip_manager_control.h + Header Files/framework/tcpip/src + osal_definitions.h Header Files/framework/osal @@ -772,6 +748,10 @@ drv_nvm.c Source Files/framework/driver/nvm/src/dynamic + + aes_cfb.h + Header Files/framework/tcpip/src/crypto + port_asm.S Source Files/FreeRTOS/portable/MPLAB/PIC32MZ @@ -788,6 +768,10 @@ sys_devcon_local.h Header Files/framework/system/devcon/src + + hash_fnv.h + Header Files/framework/tcpip/src + drv_ethmac.h Header Files/framework/driver/ethmac @@ -816,6 +800,10 @@ sys_tmr.c Source Files/framework/system/tmr/src + + tcp_manager.h + Header Files/framework/tcpip/src + ec.h Header Files/framework/crypto/src @@ -828,6 +816,10 @@ asn.c Source Files/framework/crypto/src + + drv_wifi.h + Header Files/framework/driver/wifi/mrf24w + des3.c Source Files/framework/crypto/src @@ -836,6 +828,10 @@ callbacks.h Header Files/third_party/wolfssl + + dhcp_manager.h + Header Files/framework/tcpip/src + crypto.h Header Files/third_party/tcpip/wolfssl/wolfssl/openssl @@ -852,14 +848,26 @@ bio.h Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + tcpip_announce_manager.h + Header Files/framework/tcpip/src + sys_clk.h Header Files/framework/system/clk + + dhcps.h + Header Files/framework/tcpip + types.h Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + dnss_private.h + Header Files/framework/tcpip/src + hmac.h Header Files/framework/crypto/src @@ -868,6 +876,10 @@ ssl.h Header Files/framework/crypto/src + + tcpip_heap_internal.c + Source Files/framework/tcpip/src + evp.h Header Files/third_party/tcpip/wolfssl/cyassl/openssl @@ -877,12 +889,8 @@ Source Files/framework/driver/tmr/src/dynamic - helpers.h - Header Files/framework/tcpip/common - - - http.c - Source Files/framework/tcpip/stack + drv_extphy_smsc8740.h + Header Files/framework/driver/ethphy/src/dynamic mpfs_local.h @@ -892,6 +900,10 @@ rand.h Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + zero_conf_manager.h + Header Files/framework/tcpip/src + opensslconf.h Header Files/third_party/tcpip/wolfssl/wolfssl/openssl @@ -904,10 +916,6 @@ sniffer.h Header Files/third_party/tcpip/wolfssl/cyassl - - tcpip_announce_manager.h - Header Files/framework/tcpip/stack - ecc.h Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt @@ -921,12 +929,12 @@ Header Files/framework/driver/tmr/src - coding.h - Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + sntp_manager.h + Header Files/framework/tcpip/src - sys_console.c - Source Files/framework/system/console/src + coding.h + Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt drv_ethphy.h @@ -948,6 +956,10 @@ sys_ports.h Header Files/framework/system/ports + + dnss.h + Header Files/framework/tcpip + usb_device_mapping.h Header Files/framework/usb/src @@ -981,25 +993,29 @@ Header Files/framework/tcpip/src - md5.h - Header Files/third_party/tcpip/wolfssl/cyassl/openssl + ftp_manager.h + Header Files/framework/tcpip/src - sntp.c - Source Files/framework/tcpip/stack + md5.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl sha.h Header Files/third_party/tcpip/wolfssl/cyassl/openssl - zero_conf_link_local.c - Source Files/framework/tcpip/stack + oahash.h + Header Files/framework/tcpip/src hc128.h Header Files/third_party/wolfssl/wolfcrypt + + ipv6_private.h + Header Files/framework/tcpip/src + sha256.c Source Files/framework/crypto/src @@ -1016,6 +1032,10 @@ semphr.h Header Files/FreeRTOS + + tcpip_helper_c32.S + Source Files/framework/tcpip/src + bn.h Header Files/third_party/tcpip/wolfssl/wolfssl/openssl @@ -1025,8 +1045,8 @@ Header Files/framework/crypto/src - tcpip_heap_alloc.h - Header Files/framework/tcpip/stack + snmpv3.h + Header Files/framework/tcpip ge_low_mem.c @@ -1044,14 +1064,34 @@ err.h Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + dhcp.c + Source Files/framework/tcpip/src + tcpip_mac.h Header Files/framework/tcpip + + helpers.c + Source Files/framework/tcpip/src/common + signature.h Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + + tcpip_heap_alloc.c + Source Files/framework/tcpip/src + + + tftpc_private.h + Header Files/framework/tcpip/src + + + mpu_prototypes.h + Header Files/FreeRTOS + portmacro.h Header Files/FreeRTOS/portable/MPLAB/PIC32MZ @@ -1073,12 +1113,16 @@ Source Files/third_party/wolfssl/wolfcrypt - crl.h - Header Files/third_party/tcpip/wolfssl/cyassl + tcpip_helpers_private.h + Header Files/framework/tcpip/src - sys_command.c - Source Files/framework/system/command/src + tcpip_packet.c + Source Files/framework/tcpip/src + + + crl.h + Header Files/third_party/tcpip/wolfssl/cyassl dh.h @@ -1088,6 +1132,14 @@ arc4.h Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + + smtpc.h + Header Files/framework/tcpip + + + dnss_manager.h + Header Files/framework/tcpip/src + tcpip_manager.h Header Files/framework/tcpip @@ -1097,8 +1149,12 @@ Header Files/framework/tcpip - http_manager.h - Header Files/framework/tcpip/stack + ndp_private.h + Header Files/framework/tcpip/src + + + snmp.h + Header Files/framework/tcpip timers.h @@ -1125,8 +1181,8 @@ Header Files/framework/tcpip - sys_fs_wrapper.h - Header Files/framework/tcpip/common + snmpv3_private.h + Header Files/framework/tcpip/src opensslconf.h @@ -1137,8 +1193,8 @@ Header Files/framework/osal/src - sys_reset.h - Header Files/framework/system/reset + udp_private.h + Header Files/framework/tcpip/src list.c @@ -1156,14 +1212,18 @@ ec25519.h Header Files/third_party/tcpip/wolfssl/cyassl/openssl - - zero_conf_multicast_dns.c - Source Files/framework/tcpip/stack - test.h Header Files/third_party/tcpip/wolfssl/cyassl + + dns_manager.h + Header Files/framework/tcpip/src + + + http_net_private.h + Header Files/framework/tcpip/src + ISR_Support.h Header Files/FreeRTOS/portable/MPLAB/PIC32MZ @@ -1188,26 +1248,18 @@ md2.h Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt - - sys_command.h - Header Files/framework/system/command - error.c Source Files/framework/crypto/src - drv_ethmac_local.h - Header Files/framework/driver/ethmac + iperf_manager.h + Header Files/framework/tcpip/src visibility.h Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt - - tcpip_manager_control.h - Header Files/framework/tcpip/stack - internal.h Header Files/third_party/tcpip/wolfssl/wolfssl @@ -1236,6 +1288,10 @@ nbns.h Header Files/framework/tcpip + + tcpip_packet.h + Header Files/framework/tcpip/src + sys_debug.h Header Files/framework/system/debug @@ -1245,13 +1301,21 @@ Source Files/third_party/wolfssl - ipv4_manager.h - Header Files/framework/tcpip/stack + drv_extphy_regs.h + Header Files/framework/driver/ethphy/src/dynamic + + + icmpv6_manager.h + Header Files/framework/tcpip/src misc.h Header Files/framework/crypto/src + + ipv4.c + Source Files/framework/tcpip/src + mpu_wrappers.h Header Files/FreeRTOS @@ -1264,10 +1328,6 @@ queue.c Source Files/FreeRTOS - - helpers.c - Source Files/framework/tcpip/common - ecc.h Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt @@ -1277,13 +1337,17 @@ Header Files/third_party/tcpip/wolfssl/cyassl - zero_conf_manager.h - Header Files/framework/tcpip/stack + tcp.c + Source Files/framework/tcpip/src logging.h Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + arp.c + Source Files/framework/tcpip/src + md5.h Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt @@ -1292,14 +1356,14 @@ crypto.h Header Files/framework/crypto - - sys_reset_local.h - Header Files/framework/system/reset/src - settings.h Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + + snmp_manager.h + Header Files/framework/tcpip/src + queue.h Header Files/FreeRTOS @@ -1328,6 +1392,10 @@ tcp.h Header Files/framework/tcpip + + drv_ethphy_local.h + Header Files/framework/driver/ethphy/src + visibility.h Header Files/framework/crypto/src @@ -1348,6 +1416,10 @@ arp.h Header Files/framework/tcpip + + aes_ofb.h + Header Files/framework/tcpip/src/crypto + coding.h Header Files/framework/crypto/src @@ -1356,6 +1428,10 @@ coding.h Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + aes.h + Header Files/framework/tcpip/src/crypto + arc4.c Source Files/framework/crypto/src @@ -1377,12 +1453,12 @@ Header Files/framework/driver/tmr - ti-ccm.h - Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/port/ti + tcpip_notify.h + Header Files/framework/tcpip/src - udp_manager.h - Header Files/framework/tcpip/stack + ti-ccm.h + Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/port/ti rsa.h @@ -1392,6 +1468,10 @@ pkcs12.h Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + dhcps_manager.h + Header Files/framework/tcpip/src + usb_device_cdc_local.h Header Files/framework/usb/src @@ -1400,6 +1480,18 @@ blake2.h Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + icmpv6.h + Header Files/framework/tcpip + + + ipv6.h + Header Files/framework/tcpip + + + telnet.h + Header Files/framework/tcpip + certs_test.h Header Files/third_party/tcpip/wolfssl/cyassl @@ -1408,10 +1500,6 @@ osal_freertos.h Header Files/framework/osal/src - - dns_private.h - Header Files/framework/tcpip/stack - drv_usb.h Header Files/framework/driver/usb @@ -1420,6 +1508,10 @@ pkcs7.h Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + smtp_manager.h + Header Files/framework/tcpip/src + pwdbased.h Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt @@ -1428,6 +1520,10 @@ stack.h Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + nbns.c + Source Files/framework/tcpip/src + blake2b.c Source Files/third_party/wolfssl/wolfcrypt @@ -1440,10 +1536,18 @@ md4.h Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + berkeley_api.h + Header Files/framework/tcpip + ed25519.h Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + link_list.h + Header Files/framework/tcpip/src + pem.h Header Files/third_party/tcpip/wolfssl/cyassl/openssl @@ -1453,8 +1557,8 @@ Header Files/framework/tcpip/src - tcpip_notify.c - Source Files/framework/tcpip/stack + tcpip_module_manager.h + Header Files/framework/tcpip/src aes.h @@ -1464,6 +1568,14 @@ osal_freertos.c Source Files/framework/osal/src + + drv_extphy_dp83848.h + Header Files/framework/driver/ethphy/src/dynamic + + + tcpip_manager.c + Source Files/framework/tcpip/src + sniffer_error.h Header Files/third_party/wolfssl @@ -1477,13 +1589,17 @@ Header Files/framework/crypto/src - tcp_private.h - Header Files/framework/tcpip/stack + tcpip_heap_alloc.h + Header Files/framework/tcpip/src des3.h Header Files/framework/crypto/src + + arp_manager.h + Header Files/framework/tcpip/src + rabbit.h Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt @@ -1512,14 +1628,14 @@ compress.h Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt - - oahash.h - Header Files/framework/tcpip/stack - tcpip_helpers.h Header Files/framework/tcpip + + arp_private.h + Header Files/framework/tcpip/src + sys_clk_mapping.h Header Files/framework/system/clk @@ -1532,6 +1648,10 @@ pwdbased.h Header Files/framework/crypto/src + + drv_extphy_ip101gr.h + Header Files/framework/driver/ethphy/src/dynamic + poly1305.h Header Files/third_party/wolfssl/wolfcrypt @@ -1576,10 +1696,6 @@ drv_tmr_local.h Header Files/framework/driver/tmr/src - - tcpip_helper_c32.S - Source Files/framework/tcpip/stack - hmac.h Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt @@ -1588,10 +1704,6 @@ hmac.h Header Files/third_party/tcpip/wolfssl/wolfssl/openssl - - arp.c - Source Files/framework/tcpip/stack - aes.c Source Files/framework/crypto/src @@ -1632,6 +1744,10 @@ random.h Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + + icmp_manager.h + Header Files/framework/tcpip/src + fe_operations.h Header Files/third_party/wolfssl/wolfcrypt @@ -1645,12 +1761,12 @@ Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt - dns.c - Source Files/framework/tcpip/stack + drv_extphy_dp83640.h + Header Files/framework/driver/ethphy/src/dynamic - _eth_dcpt_lists.h - Header Files/framework/driver/ethmac + icmp.h + Header Files/framework/tcpip ed25519.h @@ -1660,10 +1776,6 @@ idea.h Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt - - nbns.c - Source Files/framework/tcpip/stack - x509.h Header Files/third_party/tcpip/wolfssl/cyassl/openssl @@ -1672,6 +1784,10 @@ ec25519.h Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + snmp_private.h + Header Files/framework/tcpip/src + ripemd.h Header Files/third_party/tcpip/wolfssl/wolfssl/openssl @@ -1681,12 +1797,12 @@ Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt - drv_ethphy.c - Source Files/framework/driver/ethphy + udp_manager.h + Header Files/framework/tcpip/src - dhcp_manager.h - Header Files/framework/tcpip/stack + drv_ethphy.c + Source Files/framework/driver/ethphy hc128.c @@ -1700,22 +1816,6 @@ sys_random_local.h Header Files/framework/system/random/src - - sys_reset.c - Source Files/framework/system/reset/src - - - tcpip_types.h - Header Files/framework/tcpip/stack - - - drv_extphy_regs.h - Header Files/framework/driver/ethphy - - - tcpip_heap_internal.c - Source Files/framework/tcpip/stack - ssl.c Source Files/third_party/wolfssl @@ -1724,6 +1824,10 @@ event_groups.h Header Files/FreeRTOS + + tcpip_helpers.c + Source Files/framework/tcpip/src + sys_random.h Header Files/framework/system/random @@ -1736,10 +1840,6 @@ settings_comp.h Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt - - hash_fnv.h - Header Files/framework/tcpip/stack - ti-hash.h Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/port/ti @@ -1749,13 +1849,21 @@ Header Files/third_party/tcpip/wolfssl/cyassl/openssl - dhcp.c - Source Files/framework/tcpip/stack + ddns.h + Header Files/framework/tcpip drv_extphy_smsc8740.c Source Files/framework/driver/ethphy + + tcpip_private.h + Header Files/framework/tcpip/src + + + aes_ecb.h + Header Files/framework/tcpip/src/crypto + random.c Source Files/framework/crypto/src @@ -1780,6 +1888,10 @@ driver_common.h Header Files/framework/driver + + drv_extphy_smsc9303.h + Header Files/framework/driver/ethphy/src/dynamic + des.h Header Files/third_party/tcpip/wolfssl/wolfssl/openssl @@ -1800,14 +1912,18 @@ drv_usbhs.c Source Files/framework/driver/usb/usbhs/src/dynamic - - drv_ethmac_lib.h - Header Files/framework/driver/ethmac - drv_ethmac.c Source Files/framework/driver/ethmac + + ddns_manager.h + Header Files/framework/tcpip/src + + + ftp.h + Header Files/framework/tcpip + memory.c Source Files/framework/crypto/src @@ -1824,6 +1940,10 @@ ecdsa.h Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + http_net.h + Header Files/framework/tcpip + dh.h Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt @@ -1844,6 +1964,14 @@ dh.h Header Files/third_party/wolfssl/wolfcrypt + + dns.c + Source Files/framework/tcpip/src + + + aes_ctr.h + Header Files/framework/tcpip/src/crypto + md5.h Header Files/framework/crypto/src @@ -1856,6 +1984,10 @@ deprecated_definitions.h Header Files/FreeRTOS + + sntp.c + Source Files/framework/tcpip/src + err.h Header Files/third_party/tcpip/wolfssl/cyassl/openssl @@ -1864,6 +1996,10 @@ misc.h Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + iperf.h + Header Files/framework/tcpip + tcpip_ethernet.h Header Files/framework/tcpip @@ -1884,10 +2020,18 @@ error-ssl.h Header Files/third_party/tcpip/wolfssl/cyassl + + zero_conf_link_local_private.h + Header Files/framework/tcpip/src + compress.c Source Files/framework/crypto/src + + _eth_dcpt_lists.h + Header Files/framework/driver/ethmac/src/dynamic + usb_billboard.h Header Files/framework/usb @@ -1913,8 +2057,8 @@ Header Files/framework/crypto/src - hash_fnv.c - Source Files/framework/tcpip/stack + http_net_manager.h + Header Files/framework/tcpip/src StackMacros.h @@ -1936,6 +2080,14 @@ sha512.h Header Files/framework/crypto/src + + tftpc.h + Header Files/framework/tcpip + + + ftp_private.h + Header Files/framework/tcpip/src + ge_operations.c Source Files/third_party/wolfssl/wolfcrypt @@ -1948,6 +2100,10 @@ integer.h Header Files/framework/crypto/src + + tcpip_reboot_manager.h + Header Files/framework/tcpip/src + croutine.h Header Files/FreeRTOS @@ -1980,14 +2136,14 @@ options.h Header Files/third_party/wolfssl - - nbns_manager.h - Header Files/framework/tcpip/stack - dhcpv6_manager.h Header Files/framework/tcpip/src + + drv_ethmac_local.h + Header Files/framework/driver/ethmac/src + ssl.h Header Files/third_party/tcpip/wolfssl/wolfssl/openssl @@ -2048,10 +2204,6 @@ mpi_class.h Header Files/framework/crypto/src - - sys_debug.c - Source Files/framework/system/debug/src - ed25519.h Header Files/third_party/tcpip/wolfssl/wolfssl/openssl @@ -2060,6 +2212,14 @@ ocsp.h Header Files/third_party/wolfssl + + http_private.h + Header Files/framework/tcpip/src + + + telnet_manager.h + Header Files/framework/tcpip/src + memory.h Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt @@ -2070,100 +2230,101 @@ - + - - + - + + + + - - - + + + - - - - - - - - + + + + + + + + - + - - + diff --git a/software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/framework/driver/adc/drv_adc_static.h b/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/framework/driver/adc/drv_adc_static.h similarity index 100% rename from software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/framework/driver/adc/drv_adc_static.h rename to software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/framework/driver/adc/drv_adc_static.h diff --git a/software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/framework/driver/adc/src/drv_adc_static.c b/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/framework/driver/adc/src/drv_adc_static.c similarity index 100% rename from software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/framework/driver/adc/src/drv_adc_static.c rename to software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/framework/driver/adc/src/drv_adc_static.c diff --git a/software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/framework/driver/cmp/drv_cmp_static.h b/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/framework/driver/cmp/drv_cmp_static.h similarity index 100% rename from software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/framework/driver/cmp/drv_cmp_static.h rename to software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/framework/driver/cmp/drv_cmp_static.h diff --git a/software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/framework/driver/cmp/src/drv_cmp_static.c b/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/framework/driver/cmp/src/drv_cmp_static.c similarity index 100% rename from software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/framework/driver/cmp/src/drv_cmp_static.c rename to software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/framework/driver/cmp/src/drv_cmp_static.c diff --git a/software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/framework/net/pres/net_pres_cert_store.c b/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/framework/net/pres/net_pres_cert_store.c similarity index 100% rename from software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/framework/net/pres/net_pres_cert_store.c rename to software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/framework/net/pres/net_pres_cert_store.c diff --git a/software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/framework/net/pres/net_pres_enc_glue.c b/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/framework/net/pres/net_pres_enc_glue.c similarity index 92% rename from software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/framework/net/pres/net_pres_enc_glue.c rename to software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/framework/net/pres/net_pres_enc_glue.c index deb8ba6..74d3ab8 100644 --- a/software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/framework/net/pres/net_pres_enc_glue.c +++ b/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/framework/net/pres/net_pres_enc_glue.c @@ -130,24 +130,21 @@ bool NET_PRES_EncProviderStreamClientInit0(NET_PRES_TransportObject * transObjec if (wolfSSL_CTX_load_verify_buffer(net_pres_wolfSSLInfoStreamClient0.context, caCertsPtr, caCertsLen, SSL_FILETYPE_ASN1) != SSL_SUCCESS) { // Couldn't load the certificates - SYS_CONSOLE_MESSAGE("Something went wrong loading the certificates\r\n"); wolfSSL_CTX_free(net_pres_wolfSSLInfoStreamClient0.context); return false; } - if(wolfSSL_CTX_use_PrivateKey_buffer(net_pres_wolfSSLInfoStreamClient0.context, appData.clientKey, strlen((char *)appData.clientKey), SSL_FILETYPE_PEM) != SSL_SUCCESS) + if(wolfSSL_CTX_use_PrivateKey_buffer(net_pres_wolfSSLInfoStreamClient0.context, (unsigned char *)appData.clientKey, strlen((char *)appData.clientKey), SSL_FILETYPE_PEM) != SSL_SUCCESS) { // Couldn't load the private key - SYS_CONSOLE_MESSAGE("Something went wrong loading the private key\r\n"); wolfSSL_CTX_free(net_pres_wolfSSLInfoStreamClient0.context); return false; } // Loading the client cert so that the server can authenticate us (client authentication)) - if(wolfSSL_CTX_use_certificate_buffer(net_pres_wolfSSLInfoStreamClient0.context, appData.clientCert, strlen((char *)appData.clientCert), SSL_FILETYPE_PEM) != SSL_SUCCESS) + if(wolfSSL_CTX_use_certificate_buffer(net_pres_wolfSSLInfoStreamClient0.context, (unsigned char *)appData.clientCert, strlen((char *)appData.clientCert), SSL_FILETYPE_PEM) != SSL_SUCCESS) { // Couldn't load the client certificate - SYS_CONSOLE_MESSAGE("Something went wrong loading the client certificate\r\n"); wolfSSL_CTX_free(net_pres_wolfSSLInfoStreamClient0.context); return false; } diff --git a/software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/framework/net/pres/net_pres_enc_glue.h b/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/framework/net/pres/net_pres_enc_glue.h similarity index 100% rename from software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/framework/net/pres/net_pres_enc_glue.h rename to software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/framework/net/pres/net_pres_enc_glue.h diff --git a/software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/framework/system/clk/src/sys_clk_static.c b/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/framework/system/clk/src/sys_clk_static.c similarity index 100% rename from software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/framework/system/clk/src/sys_clk_static.c rename to software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/framework/system/clk/src/sys_clk_static.c diff --git a/software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/framework/system/clk/sys_clk_static.h b/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/framework/system/clk/sys_clk_static.h similarity index 100% rename from software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/framework/system/clk/sys_clk_static.h rename to software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/framework/system/clk/sys_clk_static.h diff --git a/software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/framework/system/ports/src/sys_ports_static.c b/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/framework/system/ports/src/sys_ports_static.c similarity index 100% rename from software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/framework/system/ports/src/sys_ports_static.c rename to software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/framework/system/ports/src/sys_ports_static.c diff --git a/software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/rtos_hooks.c b/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/rtos_hooks.c similarity index 97% rename from software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/rtos_hooks.c rename to software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/rtos_hooks.c index d3a9efb..1716820 100644 --- a/software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/rtos_hooks.c +++ b/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/rtos_hooks.c @@ -113,6 +113,12 @@ void vApplicationMallocFailedHook( void ) + + + + /******************************************************************************* End of File */ + + diff --git a/software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/system_config.h b/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/system_config.h similarity index 79% rename from software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/system_config.h rename to software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/system_config.h index 1cece36..daa728c 100644 --- a/software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/system_config.h +++ b/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/system_config.h @@ -17,8 +17,8 @@ definitions (or include any files that do). It only provides macro definitions for build-time configuration options that are not instantiated until used by another MPLAB Harmony module or application. - - Created with MPLAB Harmony Version 1.08.01 + + Created with MPLAB Harmony Version 1.09 *******************************************************************************/ // DOM-IGNORE-BEGIN @@ -64,7 +64,7 @@ SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES extern "C" { #endif -// DOM-IGNORE-END +// DOM-IGNORE-END // ***************************************************************************** // ***************************************************************************** @@ -74,8 +74,8 @@ extern "C" { // ***************************************************************************** /* Common System Service Configuration Options */ -#define SYS_VERSION_STR "1.08.01" -#define SYS_VERSION 10801 +#define SYS_VERSION_STR "1.09" +#define SYS_VERSION 10900 // ***************************************************************************** /* Clock System Service Configuration Options @@ -137,49 +137,22 @@ extern "C" { #define SYS_TMR_CLIENT_TOLERANCE 10 #define SYS_TMR_INTERRUPT_NOTIFICATION false -/*** Console System Service Configuration ***/ - -#define SYS_CONSOLE_OVERRIDE_STDIO -#define SYS_CONSOLE_DEVICE_MAX_INSTANCES 1 -#define SYS_CONSOLE_INSTANCES_NUMBER 1 -#define SYS_CONSOLE_USB_CDC_INSTANCE USB_DEVICE_CDC_INDEX_0 -#define SYS_CONSOLE_USB_CDC_COMM_BAUD_RATE 230400 -#define SYS_CONSOLE_USB_CDC_RD_QUEUE_DEPTH 1 -#define SYS_CONSOLE_USB_CDC_WR_QUEUE_DEPTH 128 -#define SYS_CONSOLE_USB_CDC_READ_BUFFER_SIZE 512 -#define SYS_CONSOLE_BUFFER_DMA_READY __attribute__((coherent)) __attribute__((aligned(16))) - - - -/*** Debug System Service Configuration ***/ -#define SYS_DEBUG_ENABLE -#define DEBUG_PRINT_BUFFER_SIZE 1024 -#define SYS_DEBUG_BUFFER_DMA_READY __attribute__((coherent)) __attribute__((aligned(16))) -#define SYS_DEBUG_USE_CONSOLE - -/*** Command Processor System Service Configuration ***/ -#define SYS_CMD_ENABLE -#define SYS_CMD_DEVICE_MAX_INSTANCES SYS_CONSOLE_DEVICE_MAX_INSTANCES -#define SYS_CMD_PRINT_BUFFER_SIZE 2048 -#define SYS_CMD_BUFFER_DMA_READY __attribute__((coherent)) __attribute__((aligned(16))) -#define SYS_CMD_REMAP_SYS_CONSOLE_MESSAGE -#define SYS_CMD_REMAP_SYS_DEBUG_MESSAGE /*** File System Service Configuration ***/ #define SYS_FS_MEDIA_NUMBER 1 -#define SYS_FS_VOLUME_NUMBER 1 +#define SYS_FS_VOLUME_NUMBER (1) -#define SYS_FS_AUTOMOUNT_ENABLE false +#define SYS_FS_AUTOMOUNT_ENABLE true #define SYS_FS_MAX_FILES 25 #define SYS_FS_MAX_FILE_SYSTEM_TYPE 1 #define SYS_FS_MEDIA_MAX_BLOCK_SIZE 512 #define SYS_FS_MEDIA_MANAGER_BUFFER_SIZE 2048 -#define SYS_FS_MEDIA_TYPE_IDX0 -#define SYS_FS_TYPE_IDX0 +#define SYS_FS_MEDIA_TYPE_IDX0 SYS_FS_MEDIA_TYPE_NVM +#define SYS_FS_TYPE_IDX0 MPFS2 @@ -187,6 +160,8 @@ extern "C" { +#define SYS_FS_MEDIA_IDX0_MOUNT_NAME_VOLUME_IDX0 "/mnt/myDrive1" +#define SYS_FS_MEDIA_IDX0_DEVICE_NAME_VOLUME_IDX0 "/dev/nvma1" // ***************************************************************************** /* Random System Service Configuration Options @@ -243,76 +218,8 @@ extern "C" { // Section: Middleware & Other Library Configuration // ***************************************************************************** // ***************************************************************************** -/*** USB Driver Configuration ***/ - - -/* Enables Device Support */ -#define DRV_USBHS_DEVICE_SUPPORT true - -/* Disable Device Support */ -#define DRV_USBHS_HOST_SUPPORT false - -/* Maximum USB driver instances */ -#define DRV_USBHS_INSTANCES_NUMBER 1 - - -/* Interrupt mode enabled */ -#define DRV_USBHS_INTERRUPT_MODE true - - -/* Number of Endpoints used */ -#define DRV_USBHS_ENDPOINTS_NUMBER 3 - - - - -/*** USB Device Stack Configuration ***/ - - - - - - - - - - -/* The USB Device Layer will not initialize the USB Driver */ -#define USB_DEVICE_DRIVER_INITIALIZE_EXPLICIT - -/* Maximum device layer instances */ -#define USB_DEVICE_INSTANCES_NUMBER 1 - -/* EP0 size in bytes */ -#define USB_DEVICE_EP0_BUFFER_SIZE 64 - - - - - - - - - - -/* Maximum instances of CDC function driver */ -#define USB_DEVICE_CDC_INSTANCES_NUMBER 1 - - - - - - - - - - -/* CDC Transfer Queue Size for both read and - write. Applicable to all instances of the - function driver */ -#define USB_DEVICE_CDC_QUEUE_DEPTH_COMBINED 130 - - +/*** OSAL Configuration ***/ +#define OSAL_USE_RTOS 9 // ***************************************************************************** @@ -395,25 +302,6 @@ extern "C" { -/*** HTTP Configuration ***/ -#define TCPIP_STACK_USE_HTTP_SERVER -#define TCPIP_HTTP_MAX_HEADER_LEN 15 -#define TCPIP_HTTP_CACHE_LEN "600" -#define TCPIP_HTTP_TIMEOUT 45 -#define TCPIP_HTTP_MAX_CONNECTIONS 1 -#define TCPIP_HTTP_MAX_TLS_CONNECTIONS 0 -#define TCPIP_HTTP_DEFAULT_FILE "index.htm" -#define TCPIP_HTTPS_DEFAULT_FILE "index.htm" -#define TCPIP_HTTP_DEFAULT_LEN 10 -#define TCPIP_HTTP_MAX_DATA_LEN 4096 -#define TCPIP_HTTP_MIN_CALLBACK_FREE 16 -#define TCPIP_HTTP_SKT_TX_BUFF_SIZE 0 -#define TCPIP_HTTP_SKT_RX_BUFF_SIZE 0 -#define TCPIP_HTTP_TLS_SKT_TX_BUFF_SIZE 0 -#define TCPIP_HTTP_TLS_SKT_RX_BUFF_SIZE 0 -#define TCPIP_HTTP_CONFIG_FLAGS 1 -#define TCPIP_HTTP_USE_POST -#define TCPIP_HTTP_TASK_RATE 33 @@ -423,6 +311,7 @@ extern "C" { #define TCPIP_NBNS_TASK_TICK_RATE 110 + /*** SNTP Configuration ***/ #define TCPIP_STACK_USE_SNTP_CLIENT #define TCPIP_NTP_DEFAULT_IF "PIC32INT" @@ -459,13 +348,11 @@ extern "C" { #define TCPIP_TCP_MAX_SYN_RETRIES 3 #define TCPIP_TCP_AUTO_TRANSMIT_TIMEOUT_VAL 40 #define TCPIP_TCP_WINDOW_UPDATE_TIMEOUT_VAL 200 -#define TCPIP_TCP_MAX_SOCKETS 15 +#define TCPIP_TCP_MAX_SOCKETS 15 #define TCPIP_TCP_TASK_TICK_RATE 5 +#define TCPIP_TCP_MSL_TIMEOUT 0 +#define TCPIP_TCP_QUIET_TIME 0 -/*** announce Configuration ***/ -#define TCPIP_STACK_USE_ANNOUNCE -#define TCPIP_ANNOUNCE_MAX_PAYLOAD 512 -#define TCPIP_ANNOUNCE_TASK_RATE 333 /*** TCPIP MAC Configuration ***/ #define TCPIP_EMAC_TX_DESCRIPTORS 8 @@ -529,44 +416,11 @@ extern "C" { #define TCPIP_UDP_USE_RX_CHECKSUM true -#define TCPIP_STACK_USE_ZEROCONF_LINK_LOCAL -#define TCPIP_ZC_LL_PROBE_WAIT 1 -#define TCPIP_ZC_LL_PROBE_MIN 1 -#define TCPIP_ZC_LL_PROBE_MAX 2 -#define TCPIP_ZC_LL_PROBE_NUM 3 -#define TCPIP_ZC_LL_ANNOUNCE_WAIT 2 -#define TCPIP_ZC_LL_ANNOUNCE_NUM 2 -#define TCPIP_ZC_LL_ANNOUNCE_INTERVAL 2 -#define TCPIP_ZC_LL_MAX_CONFLICTS 10 -#define TCPIP_ZC_LL_RATE_LIMIT_INTERVAL 60 -#define TCPIP_ZC_LL_DEFEND_INTERVAL 10 -#define TCPIP_ZC_LL_IPV4_LLBASE 0xa9fe0100 -#define TCPIP_ZC_LL_IPV4_LLBASE_MASK 0x0000FFFF -#define TCPIP_ZC_LL_TASK_TICK_RATE 333 -#define TCPIP_STACK_USE_ZEROCONF_MDNS_SD -#define TCPIP_ZC_MDNS_TASK_TICK_RATE 63 -#define TCPIP_ZC_MDNS_PORT 5353 -#define TCPIP_ZC_MDNS_MAX_HOST_NAME_SIZE 32 -#define TCPIP_ZC_MDNS_MAX_LABEL_SIZE 64 -#define TCPIP_ZC_MDNS_MAX_RR_NAME_SIZE 256 -#define TCPIP_ZC_MDNS_MAX_SRV_TYPE_SIZE 32 -#define TCPIP_ZC_MDNS_MAX_SRV_NAME_SIZE 64 -#define TCPIP_ZC_MDNS_MAX_TXT_DATA_SIZE 128 -#define TCPIP_ZC_MDNS_RESOURCE_RECORD_TTL_VAL 3600 -#define TCPIP_ZC_MDNS_MAX_RR_NUM 4 -#define TCPIP_ZC_MDNS_PROBE_WAIT 750 -#define TCPIP_ZC_MDNS_PROBE_INTERVAL 250 -#define TCPIP_ZC_MDNS_PROBE_NUM 3 -#define TCPIP_ZC_MDNS_MAX_PROBE_CONFLICT_NUM 30 -#define TCPIP_ZC_MDNS_ANNOUNCE_NUM 3 -#define TCPIP_ZC_MDNS_ANNOUNCE_INTERVAL 250 -#define TCPIP_ZC_MDNS_ANNOUNCE_WAIT 250 - /*** Network Configuration Index 0 ***/ #define TCPIP_NETWORK_DEFAULT_INTERFACE_NAME "PIC32INT" #define TCPIP_IF_PIC32INT -#define TCPIP_NETWORK_DEFAULT_HOST_NAME "AWS_IOT_ETHERNET" +#define TCPIP_NETWORK_DEFAULT_HOST_NAME "IOT_ETHERNET" #define TCPIP_NETWORK_DEFAULT_MAC_ADDR 0 #define TCPIP_NETWORK_DEFAULT_IP_ADDRESS "0.0.0.0" #define TCPIP_NETWORK_DEFAULT_IP_MASK "255.255.255.0" @@ -580,21 +434,87 @@ extern "C" { TCPIP_NETWORK_CONFIG_IP_STATIC #define TCPIP_NETWORK_DEFAULT_MAC_DRIVER DRV_ETHMAC_PIC32MACObject #define TCPIP_NETWORK_DEFAULT_IPV6_ADDRESS 0 -#define TCPIP_NETWORK_DEFAULT_IPV6_PREFIX_LENGTH +#define TCPIP_NETWORK_DEFAULT_IPV6_PREFIX_LENGTH 0 #define TCPIP_NETWORK_DEFAULT_IPV6_GATEWAY 0 -/*** TCPIP SYS FS Wrapper ***/ -#define SYS_FS_MAX_PATH 80 -#define LOCAL_WEBSITE_PATH_FS "/mnt/mchpSite1" -#define LOCAL_WEBSITE_PATH "/mnt/mchpSite1/" -#define SYS_FS_DRIVE "FLASH" -#define SYS_FS_NVM_VOL "/dev/nvma1" -#define SYS_FS_FATFS_STRING "FATFS" -#define SYS_FS_MPFS_STRING "MPFS2" +/*** IPv4 Configuration ***/ + +/*** USB Driver Configuration ***/ + + +/* Enables Device Support */ +#define DRV_USBHS_DEVICE_SUPPORT true + +/* Disable Device Support */ +#define DRV_USBHS_HOST_SUPPORT false + +/* Maximum USB driver instances */ +#define DRV_USBHS_INSTANCES_NUMBER 1 + + +/* Interrupt mode enabled */ +#define DRV_USBHS_INTERRUPT_MODE true + + +/* Number of Endpoints used */ +#define DRV_USBHS_ENDPOINTS_NUMBER 3 + + + + +/*** USB Device Stack Configuration ***/ + + + + + + + + + + +/* The USB Device Layer will not initialize the USB Driver */ +#define USB_DEVICE_DRIVER_INITIALIZE_EXPLICIT + +/* Maximum device layer instances */ +#define USB_DEVICE_INSTANCES_NUMBER 1 + +/* EP0 size in bytes */ +#define USB_DEVICE_EP0_BUFFER_SIZE 64 + +/* Enable SOF Events */ +#define USB_DEVICE_SOF_EVENT_ENABLE + + + + + + + + + +/* Maximum instances of CDC function driver */ +#define USB_DEVICE_CDC_INSTANCES_NUMBER 1 + + + + + + + + + + +/* CDC Transfer Queue Size for both read and + write. Applicable to all instances of the + function driver */ +#define USB_DEVICE_CDC_QUEUE_DEPTH_COMBINED 1025 + + /*** OSAL Configuration ***/ -#define OSAL_USE_RTOS 1 +#define OSAL_USE_RTOS 9 /* MPLAB Harmony Net Presentation Layer Definitions*/ #define NET_PRES_NUM_INSTANCE 1 @@ -612,6 +532,8 @@ extern "C" { /*** Application Instance 1 Configuration ***/ +/*** Application Instance 2 Configuration ***/ + //DOM-IGNORE-BEGIN #ifdef __cplusplus } diff --git a/software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/system_definitions.h b/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/system_definitions.h similarity index 93% rename from software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/system_definitions.h rename to software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/system_definitions.h index 1b8ea07..fd7d7e9 100644 --- a/software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/system_definitions.h +++ b/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/system_definitions.h @@ -58,18 +58,14 @@ SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES #include "system/int/sys_int.h" #include "system/fs/sys_fs.h" #include "system/fs/sys_fs_media_manager.h" -#include "system/console/sys_console.h" #include "system/random/sys_random.h" #include "system/fs/mpfs/mpfs.h" #include "system/tmr/sys_tmr.h" -#include "system/reset/sys_reset.h" #include "driver/adc/drv_adc_static.h" #include "driver/tmr/drv_tmr.h" #include "driver/cmp/drv_cmp_static.h" #include "driver/nvm/drv_nvm.h" #include "system/ports/sys_ports.h" -#include "system/debug/sys_debug.h" -#include "system/command/sys_command.h" #include "driver/usb/usbhs/drv_usbhs.h" #include "usb/usb_device.h" @@ -86,6 +82,7 @@ SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES #include "net/pres/net_pres_socketapi.h" #include "app.h" #include "app1.h" +#include "app2.h" // DOM-IGNORE-BEGIN @@ -123,8 +120,6 @@ typedef struct SYS_MODULE_OBJ sysTmr; SYS_MODULE_OBJ drvTmr0; SYS_MODULE_OBJ drvNvm; - SYS_MODULE_OBJ sysDebug; - SYS_MODULE_OBJ sysConsole0; SYS_MODULE_OBJ drvUSBObject; SYS_MODULE_OBJ usbDevObject0; diff --git a/software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/system_exceptions.c b/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/system_exceptions.c similarity index 100% rename from software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/system_exceptions.c rename to software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/system_exceptions.c diff --git a/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/system_init.c b/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/system_init.c new file mode 100644 index 0000000..6cc6a5d --- /dev/null +++ b/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/system_init.c @@ -0,0 +1,895 @@ +/******************************************************************************* + System Initialization File + + File Name: + system_init.c + + Summary: + This file contains source code necessary to initialize the system. + + Description: + This file contains source code necessary to initialize the system. It + implements the "SYS_Initialize" function, defines the configuration bits, + and allocates any necessary global system resources, such as the + sysObj structure that contains the object handles to all the MPLAB Harmony + module objects in the system. + *******************************************************************************/ + +// DOM-IGNORE-BEGIN +/******************************************************************************* +Copyright (c) 2013-2015 released Microchip Technology Inc. All rights reserved. + +Microchip licenses to you the right to use, modify, copy and distribute +Software only when embedded on a Microchip microcontroller or digital signal +controller that is integrated into your product or third party product +(pursuant to the sublicense terms in the accompanying license agreement). + +You should refer to the license agreement accompanying this Software for +additional information regarding your rights and obligations. + +SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF +MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. +IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER +CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR +OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES +INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR +CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF +SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES +(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS. + *******************************************************************************/ +// DOM-IGNORE-END + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** + +#include "system_config.h" +#include "system_definitions.h" + + +// **************************************************************************** +// **************************************************************************** +// Section: Configuration Bits +// **************************************************************************** +// **************************************************************************** +// + +/*** DEVCFG0 ***/ + +#pragma config DEBUG = OFF +#pragma config JTAGEN = OFF +#pragma config ICESEL = ICS_PGx1 +#pragma config TRCEN = OFF +#pragma config BOOTISA = MIPS32 +#pragma config FECCCON = OFF_UNLOCKED +#pragma config FSLEEP = OFF +#pragma config DBGPER = PG_ALL +#pragma config SMCLR = MCLR_NORM +#pragma config SOSCGAIN = GAIN_2X +#pragma config SOSCBOOST = ON +#pragma config POSCGAIN = GAIN_2X +#pragma config POSCBOOST = ON +#pragma config EJTAGBEN = NORMAL +#pragma config CP = OFF + +/*** DEVCFG1 ***/ + +#pragma config FNOSC = SPLL +#pragma config DMTINTV = WIN_127_128 +#pragma config FSOSCEN = OFF +#pragma config IESO = OFF +#pragma config POSCMOD = EC +#pragma config OSCIOFNC = OFF +#pragma config FCKSM = CSECME +#pragma config WDTPS = PS1048576 +#pragma config WDTSPGM = STOP +#pragma config FWDTEN = OFF +#pragma config WINDIS = NORMAL +#pragma config FWDTWINSZ = WINSZ_25 +#pragma config DMTCNT = DMT31 +#pragma config FDMTEN = OFF +/*** DEVCFG2 ***/ + +#pragma config FPLLIDIV = DIV_3 +#pragma config FPLLRNG = RANGE_8_16_MHZ +#pragma config FPLLICLK = PLL_POSC +#pragma config FPLLMULT = MUL_50 +#pragma config FPLLODIV = DIV_2 +#pragma config UPLLFSEL = FREQ_24MHZ +/*** DEVCFG3 ***/ + +#pragma config USERID = 0xffff +#pragma config FMIIEN = OFF +#pragma config FETHIO = ON +#pragma config PGL1WAY = ON +#pragma config PMDL1WAY = ON +#pragma config IOL1WAY = ON +#pragma config FUSBIDIO = OFF + +/*** BF1SEQ0 ***/ + +#pragma config TSEQ = 0x0000 +#pragma config CSEQ = 0xffff +// + +// ***************************************************************************** +// ***************************************************************************** +// Section: Driver Initialization Data +// ***************************************************************************** +// ***************************************************************************** +// +/*** FLASH Driver Initialization Data ***/ +extern const uint8_t NVM_MEDIA_DATA[]; +SYS_FS_MEDIA_REGION_GEOMETRY NVMGeometryTable[3] = +{ + { + .blockSize = 1, + .numBlocks = (DRV_NVM_MEDIA_SIZE * 1024), + }, + { + .blockSize = DRV_NVM_ROW_SIZE, + .numBlocks = ((DRV_NVM_MEDIA_SIZE * 1024)/DRV_NVM_ROW_SIZE) + }, + { + .blockSize = DRV_NVM_PAGE_SIZE, + .numBlocks = ((DRV_NVM_MEDIA_SIZE * 1024)/DRV_NVM_PAGE_SIZE) + } +}; + +const SYS_FS_MEDIA_GEOMETRY NVMGeometry = +{ + .mediaProperty = SYS_FS_MEDIA_WRITE_IS_BLOCKING, + .numReadRegions = 1, + .numWriteRegions = 1, + .numEraseRegions = 1, + .geometryTable = (SYS_FS_MEDIA_REGION_GEOMETRY *)&NVMGeometryTable +}; + +const DRV_NVM_INIT drvNvmInit = +{ + .moduleInit.sys.powerState = SYS_MODULE_POWER_RUN_FULL, + .nvmID = NVM_ID_0, + .interruptSource = INT_SOURCE_FLASH_CONTROL, + + .mediaStartAddress = 0x9D100000, + .nvmMediaGeometry = (SYS_FS_MEDIA_GEOMETRY *)&NVMGeometry + +}; + + +// +// +/*** TMR Driver Initialization Data ***/ + +const DRV_TMR_INIT drvTmr0InitData = +{ + .moduleInit.sys.powerState = DRV_TMR_POWER_STATE_IDX0, + .tmrId = DRV_TMR_PERIPHERAL_ID_IDX0, + .clockSource = DRV_TMR_CLOCK_SOURCE_IDX0, + .prescale = DRV_TMR_PRESCALE_IDX0, + .mode = DRV_TMR_OPERATION_MODE_IDX0, + .interruptSource = DRV_TMR_INTERRUPT_SOURCE_IDX0, + .asyncWriteEnable = false, +}; +// +// +/****************************************************** + * USB Driver Initialization + ******************************************************/ +const DRV_USBHS_INIT drvUSBInit = +{ + /* Interrupt Source for USB module */ + .interruptSource = INT_SOURCE_USB_1, + + /* Interrupt Source for USB module */ + .interruptSourceUSBDma = INT_SOURCE_USB_1_DMA, + + /* System module initialization */ + .moduleInit = {SYS_MODULE_POWER_RUN_FULL}, + + .operationMode = DRV_USBHS_OPMODE_DEVICE, + + .operationSpeed = USB_SPEED_FULL, + + /* Stop in idle */ + .stopInIdle = false, + + /* Suspend in sleep */ + .suspendInSleep = false, + + /* Identifies peripheral (PLIB-level) ID */ + .usbID = USBHS_ID_0, +}; +// + +// ***************************************************************************** +// ***************************************************************************** +// Section: System Data +// ***************************************************************************** +// ***************************************************************************** + +/* Structure to hold the object handles for the modules in the system. */ +SYSTEM_OBJECTS sysObj; + +// ***************************************************************************** +// ***************************************************************************** +// Section: Module Initialization Data +// ***************************************************************************** +// ***************************************************************************** +/* Net Presentation Layer Data Definitions */ +#include "framework/net/pres/net_pres_enc_glue.h" + +static const NET_PRES_TransportObject netPresTransObject0SC = { + .fpOpen = (NET_PRES_TransOpen)TCPIP_TCP_ClientOpen, + .fpLocalBind = (NET_PRES_TransBind)TCPIP_TCP_Bind, + .fpRemoteBind = (NET_PRES_TransBind)TCPIP_TCP_RemoteBind, + .fpOptionGet = (NET_PRES_TransOption)TCPIP_TCP_OptionsGet, + .fpOptionSet = (NET_PRES_TransOption)TCPIP_TCP_OptionsSet, + .fpIsConnected = (NET_PRES_TransBool)TCPIP_TCP_IsConnected, + .fpWasReset = (NET_PRES_TransBool)TCPIP_TCP_WasReset, + .fpDisconnect = (NET_PRES_TransBool)TCPIP_TCP_Disconnect, + .fpConnect = (NET_PRES_TransBool)TCPIP_TCP_Connect, + .fpClose = (NET_PRES_TransClose)TCPIP_TCP_Close, + .fpSocketInfoGet = (NET_PRES_TransSocketInfoGet)TCPIP_TCP_SocketInfoGet, + .fpFlush = (NET_PRES_TransBool)TCPIP_TCP_Flush, + .fpPeek = (NET_PRES_TransPeek)TCPIP_TCP_ArrayPeek, + .fpDiscard = (NET_PRES_TransDiscard)TCPIP_TCP_Discard, + .fpHandlerRegister = (NET_PRES_TransHandlerRegister)TCPIP_TCP_SignalHandlerRegister, + .fpHandlerDeregister = (NET_PRES_TransSignalHandlerDeregister)TCPIP_TCP_SignalHandlerDeregister, + .fpRead = (NET_PRES_TransRead)TCPIP_TCP_ArrayGet, + .fpWrite = (NET_PRES_TransWrite)TCPIP_TCP_ArrayPut, + .fpReadyToRead = (NET_PRES_TransReady)TCPIP_TCP_GetIsReady, + .fpReadyToWrite = (NET_PRES_TransReady)TCPIP_TCP_PutIsReady, + .fpIsPortDefaultSecure = (NET_PRES_TransIsPortDefaultSecured)TCPIP_Helper_TCPSecurePortGet, +}; +static const NET_PRES_INST_DATA netPresCfgs[] = +{ + { + .pTransObject_sc = &netPresTransObject0SC, + .pProvObject_ss = NULL, + .pProvObject_sc = &net_pres_EncProviderStreamClient0, + .pProvObject_ds = NULL, + .pProvObject_dc = NULL, + }, +}; + +static const NET_PRES_INIT_DATA netPresInitData = +{ + .numLayers = sizeof(netPresCfgs) / sizeof(NET_PRES_INST_DATA), + .pInitData = netPresCfgs +}; + + +// +/******************************************************************************* + Device Control System Service Initialization Data +*/ + +const SYS_DEVCON_INIT sysDevconInit = +{ + .moduleInit = {0}, +}; + +// +// +/*** File System Initialization Data ***/ + + +const SYS_FS_MEDIA_MOUNT_DATA sysfsMountTable[SYS_FS_VOLUME_NUMBER] = +{ + + { + .mountName = SYS_FS_MEDIA_IDX0_MOUNT_NAME_VOLUME_IDX0, + .devName = SYS_FS_MEDIA_IDX0_DEVICE_NAME_VOLUME_IDX0, + .mediaType = SYS_FS_MEDIA_TYPE_IDX0, + .fsType = SYS_FS_TYPE_IDX0 + }, + + + + + +}; + + + +const SYS_FS_REGISTRATION_TABLE sysFSInit [ SYS_FS_MAX_FILE_SYSTEM_TYPE ] = +{ + { + .nativeFileSystemType = MPFS2, + .nativeFileSystemFunctions = &MPFSFunctions + } +}; + +// +// +/*** TMR Service Initialization Data ***/ +const SYS_TMR_INIT sysTmrInitData = +{ + .moduleInit = {SYS_MODULE_POWER_RUN_FULL}, + .drvIndex = DRV_TMR_INDEX_0, + .tmrFreq = 1000, +}; +// + +// ***************************************************************************** +// ***************************************************************************** +// Section: Library/Stack Initialization Data +// ***************************************************************************** +// ***************************************************************************** +// +// ***************************************************************************** +// ***************************************************************************** +// Section: TCPIP Data +// ***************************************************************************** +// ***************************************************************************** + +/*** ARP Service Initialization Data ***/ +const TCPIP_ARP_MODULE_CONFIG tcpipARPInitData = +{ + .cacheEntries = TCPIP_ARP_CACHE_ENTRIES, + .deleteOld = TCPIP_ARP_CACHE_DELETE_OLD, + .entrySolvedTmo = TCPIP_ARP_CACHE_SOLVED_ENTRY_TMO, + .entryPendingTmo = TCPIP_ARP_CACHE_PENDING_ENTRY_TMO, + .entryRetryTmo = TCPIP_ARP_CACHE_PENDING_RETRY_TMO, + .permQuota = TCPIP_ARP_CACHE_PERMANENT_QUOTA, + .purgeThres = TCPIP_ARP_CACHE_PURGE_THRESHOLD, + .purgeQuanta = TCPIP_ARP_CACHE_PURGE_QUANTA, + .retries = TCPIP_ARP_CACHE_ENTRY_RETRIES, + .gratProbeCount = TCPIP_ARP_GRATUITOUS_PROBE_COUNT, +}; + + + +/*** UDP Sockets Initialization Data ***/ +const TCPIP_UDP_MODULE_CONFIG tcpipUDPInitData = +{ + .nSockets = TCPIP_UDP_MAX_SOCKETS, + .sktTxBuffSize = TCPIP_UDP_SOCKET_DEFAULT_TX_SIZE, +}; + +/*** TCP Sockets Initialization Data ***/ +const TCPIP_TCP_MODULE_CONFIG tcpipTCPInitData = +{ + .nSockets = TCPIP_TCP_MAX_SOCKETS, + .sktTxBuffSize = TCPIP_TCP_SOCKET_DEFAULT_TX_SIZE, + .sktRxBuffSize = TCPIP_TCP_SOCKET_DEFAULT_RX_SIZE, +}; + + + +/*** SNTP Client Initialization Data ***/ +const TCPIP_SNTP_MODULE_CONFIG tcpipSNTPInitData = +{ + .ntp_server = TCPIP_NTP_SERVER, + .ntp_interface = TCPIP_NTP_DEFAULT_IF, + .ntp_connection_type = TCPIP_NTP_DEFAULT_CONNECTION_TYPE, + .ntp_reply_timeout = TCPIP_NTP_REPLY_TIMEOUT, + .ntp_stamp_timeout = TCPIP_NTP_TIME_STAMP_TMO, + .ntp_success_interval = TCPIP_NTP_QUERY_INTERVAL, + .ntp_error_interval = TCPIP_NTP_FAST_QUERY_INTERVAL, +}; + + + +/*** DHCP client Initialization Data ***/ +const TCPIP_DHCP_MODULE_CONFIG tcpipDHCPInitData = +{ + .dhcpEnable = TCPIP_DHCP_CLIENT_ENABLED, + .dhcpTmo = TCPIP_DHCP_TIMEOUT, + .dhcpCliPort = TCPIP_DHCP_CLIENT_CONNECT_PORT, + .dhcpSrvPort = TCPIP_DHCP_SERVER_LISTEN_PORT, + +}; + + + +/*** NBNS Server Initialization Data ***/ +const TCPIP_NBNS_MODULE_CONFIG tcpipNBNSInitData = +{ +}; + +/*** ETH MAC Initialization Data ***/ +const TCPIP_MODULE_MAC_PIC32INT_CONFIG tcpipMACPIC32INTInitData = +{ + .nTxDescriptors = TCPIP_EMAC_TX_DESCRIPTORS, + .rxBuffSize = TCPIP_EMAC_RX_BUFF_SIZE, + .nRxDescriptors = TCPIP_EMAC_RX_DESCRIPTORS, + .nRxDedicatedBuffers = TCPIP_EMAC_RX_DEDICATED_BUFFERS, + .nRxInitBuffers = TCPIP_EMAC_RX_INIT_BUFFERS, + .rxLowThreshold = TCPIP_EMAC_RX_LOW_THRESHOLD, + .rxLowFill = TCPIP_EMAC_RX_LOW_FILL, + .ethFlags = TCPIP_EMAC_ETH_OPEN_FLAGS, + .phyFlags = TCPIP_EMAC_PHY_CONFIG_FLAGS, + .linkInitDelay = TCPIP_EMAC_PHY_LINK_INIT_DELAY, + .phyAddress = TCPIP_EMAC_PHY_ADDRESS, + .ethModuleId = TCPIP_EMAC_MODULE_ID, + .pPhyObject = &DRV_ETHPHY_OBJECT_SMSC_LAN8740, + .pPhyBase = &DRV_ETHPHY_OBJECT_BASE_Default, +}; + + + + + + + +/*** DNS Client Initialization Data ***/ +const TCPIP_DNS_CLIENT_MODULE_CONFIG tcpipDNSClientInitData = +{ + .deleteOldLease = TCPIP_DNS_CLIENT_DELETE_OLD_ENTRIES, + .cacheEntries = TCPIP_DNS_CLIENT_CACHE_ENTRIES, + .entrySolvedTmo = TCPIP_DNS_CLIENT_CACHE_ENTRY_TMO, + .nIPv4Entries = TCPIP_DNS_CLIENT_CACHE_PER_IPV4_ADDRESS, + .ipAddressType = TCPIP_DNS_CLIENT_ADDRESS_TYPE, + .nIPv6Entries = TCPIP_DNS_CLIENT_CACHE_PER_IPV6_ADDRESS, +}; + + + + +TCPIP_STACK_HEAP_INTERNAL_CONFIG tcpipHeapConfig = +{ + .heapType = TCPIP_STACK_HEAP_TYPE_INTERNAL_HEAP, + .heapFlags = TCPIP_STACK_HEAP_USE_FLAGS, + .heapUsage = TCPIP_STACK_HEAP_USAGE_CONFIG, + .malloc_fnc = TCPIP_STACK_MALLOC_FUNC, + .calloc_fnc = TCPIP_STACK_CALLOC_FUNC, + .free_fnc = TCPIP_STACK_FREE_FUNC, + .heapSize = TCPIP_STACK_DRAM_SIZE, +}; + +const TCPIP_NETWORK_CONFIG __attribute__((unused)) TCPIP_HOSTS_CONFIGURATION[] = +{ +/*** Network Configuration Index 0 ***/ + { + TCPIP_NETWORK_DEFAULT_INTERFACE_NAME, // interface + TCPIP_NETWORK_DEFAULT_HOST_NAME, // hostName + TCPIP_NETWORK_DEFAULT_MAC_ADDR, // macAddr + TCPIP_NETWORK_DEFAULT_IP_ADDRESS, // ipAddr + TCPIP_NETWORK_DEFAULT_IP_MASK, // ipMask + TCPIP_NETWORK_DEFAULT_GATEWAY, // gateway + TCPIP_NETWORK_DEFAULT_DNS, // priDNS + TCPIP_NETWORK_DEFAULT_SECOND_DNS, // secondDNS + TCPIP_NETWORK_DEFAULT_POWER_MODE, // powerMode + TCPIP_NETWORK_DEFAULT_INTERFACE_FLAGS, // startFlags + &TCPIP_NETWORK_DEFAULT_MAC_DRIVER, // pMacObject + }, +}; + +const TCPIP_STACK_MODULE_CONFIG TCPIP_STACK_MODULE_CONFIG_TBL [] = +{ + {TCPIP_MODULE_IPV4, 0}, + {TCPIP_MODULE_ARP, &tcpipARPInitData}, // TCPIP_MODULE_ARP + {TCPIP_MODULE_UDP, &tcpipUDPInitData}, // TCPIP_MODULE_UDP, + {TCPIP_MODULE_TCP, &tcpipTCPInitData}, // TCPIP_MODULE_TCP, + {TCPIP_MODULE_DHCP_CLIENT, &tcpipDHCPInitData}, // TCPIP_MODULE_DHCP_CLIENT, + {TCPIP_MODULE_DNS_CLIENT,&tcpipDNSClientInitData}, // TCPIP_MODULE_DNS_CLIENT, + {TCPIP_MODULE_NBNS, &tcpipNBNSInitData}, // TCPIP_MODULE_NBNS + {TCPIP_MODULE_SNTP, &tcpipSNTPInitData}, // TCPIP_MODULE_SNTP, + + { TCPIP_MODULE_MANAGER, & tcpipHeapConfig }, // TCPIP_MODULE_MANAGER + // MAC modules + {TCPIP_MODULE_MAC_PIC32INT, &tcpipMACPIC32INTInitData}, // TCPIP_MODULE_MAC_PIC32INT + +}; + +/********************************************************************* + * Function: SYS_MODULE_OBJ TCPIP_STACK_Init() + * + * PreCondition: None + * + * Input: + * + * Output: valid system module object if Stack and its componets are initialized + * SYS_MODULE_OBJ_INVALID otherwise + * + * Overview: The function starts the initialization of the stack. + * If an error occurs, the SYS_ERROR() is called + * and the function de-initialize itself and will return false. + * + * Side Effects: None + * + * Note: This function must be called before any of the + * stack or its component routines are used. + * + ********************************************************************/ + + +SYS_MODULE_OBJ TCPIP_STACK_Init() +{ + TCPIP_STACK_INIT tcpipInit; + + tcpipInit.moduleInit.sys.powerState = SYS_MODULE_POWER_RUN_FULL; + tcpipInit.pNetConf = TCPIP_HOSTS_CONFIGURATION; + tcpipInit.nNets = sizeof (TCPIP_HOSTS_CONFIGURATION) / sizeof (*TCPIP_HOSTS_CONFIGURATION); + tcpipInit.pModConfig = TCPIP_STACK_MODULE_CONFIG_TBL; + tcpipInit.nModules = sizeof (TCPIP_STACK_MODULE_CONFIG_TBL) / sizeof (*TCPIP_STACK_MODULE_CONFIG_TBL); + + return TCPIP_STACK_Initialize(0, &tcpipInit.moduleInit); +} +// +// + + +/************************************************** + * USB Device Function Driver Init Data + **************************************************/ + const USB_DEVICE_CDC_INIT cdcInit0 = + { + .queueSizeRead = 512, + .queueSizeWrite = 512, + .queueSizeSerialStateNotification = 1 + }; +/************************************************** + * USB Device Layer Function Driver Registration + * Table + **************************************************/ +const USB_DEVICE_FUNCTION_REGISTRATION_TABLE funcRegistrationTable[1] = +{ + /* Function 1 */ + { + .configurationValue = 1, /* Configuration value */ + .interfaceNumber = 0, /* First interfaceNumber of this function */ + .speed = USB_SPEED_FULL, /* Function Speed */ + .numberOfInterfaces = 2, /* Number of interfaces */ + .funcDriverIndex = 0, /* Index of CDC Function Driver */ + .driver = (void*)USB_DEVICE_CDC_FUNCTION_DRIVER, /* USB CDC function data exposed to device layer */ + .funcDriverInit = (void*)&cdcInit0 /* Function driver init data */ + }, +}; + +/******************************************* + * USB Device Layer Descriptors + *******************************************/ +/******************************************* + * USB Device Descriptor + *******************************************/ +const USB_DEVICE_DESCRIPTOR deviceDescriptor = +{ + 0x12, // Size of this descriptor in bytes + USB_DESCRIPTOR_DEVICE, // DEVICE descriptor type + 0x0200, // USB Spec Release Number in BCD format + USB_CDC_CLASS_CODE, // Class Code + USB_CDC_SUBCLASS_CODE, // Subclass code + 0x00, // Protocol code + USB_DEVICE_EP0_BUFFER_SIZE, // Max packet size for EP0, see system_config.h + 0x04D8, // Vendor ID + 0x000A, // Product ID + 0x0100, // Device release number in BCD format + 0x01, // Manufacturer string index + 0x02, // Product string index + 0x00, // Device serial number string index + 0x01 // Number of possible configurations +}; + + +/******************************************* + * USB Full Speed Configuration Descriptor + *******************************************/ +const uint8_t fullSpeedConfigurationDescriptor[]= +{ + /* Configuration Descriptor */ + + 0x09, // Size of this descriptor in bytes + USB_DESCRIPTOR_CONFIGURATION, // Descriptor Type + 67,0, //(67 Bytes)Size of the Config descriptor.e + 2, // Number of interfaces in this cfg + 0x01, // Index value of this configuration + 0x00, // Configuration string index + USB_ATTRIBUTE_DEFAULT | USB_ATTRIBUTE_SELF_POWERED, // Attributes + 50, // Max power consumption (2X mA) + /* Descriptor for Function 1 - CDC */ + + /* Interface Descriptor */ + + 0x09, // Size of this descriptor in bytes + USB_DESCRIPTOR_INTERFACE, // Descriptor Type + 0, // Interface Number + 0x00, // Alternate Setting Number + 0x01, // Number of endpoints in this interface + USB_CDC_COMMUNICATIONS_INTERFACE_CLASS_CODE, // Class code + USB_CDC_SUBCLASS_ABSTRACT_CONTROL_MODEL, // Subclass code + USB_CDC_PROTOCOL_AT_V250, // Protocol code + 0x00, // Interface string index + + /* CDC Class-Specific Descriptors */ + + sizeof(USB_CDC_HEADER_FUNCTIONAL_DESCRIPTOR), // Size of the descriptor + USB_CDC_DESC_CS_INTERFACE, // CS_INTERFACE + USB_CDC_FUNCTIONAL_HEADER, // Type of functional descriptor + 0x20,0x01, // CDC spec version + + sizeof(USB_CDC_ACM_FUNCTIONAL_DESCRIPTOR), // Size of the descriptor + USB_CDC_DESC_CS_INTERFACE, // CS_INTERFACE + USB_CDC_FUNCTIONAL_ABSTRACT_CONTROL_MANAGEMENT, // Type of functional descriptor + USB_CDC_ACM_SUPPORT_LINE_CODING_LINE_STATE_AND_NOTIFICATION,// bmCapabilities of ACM + + sizeof(USB_CDC_UNION_FUNCTIONAL_DESCRIPTOR_HEADER) + 1, // Size of the descriptor + USB_CDC_DESC_CS_INTERFACE, // CS_INTERFACE + USB_CDC_FUNCTIONAL_UNION, // Type of functional descriptor + 0, // com interface number + 1, + + sizeof(USB_CDC_CALL_MANAGEMENT_DESCRIPTOR), // Size of the descriptor + USB_CDC_DESC_CS_INTERFACE, // CS_INTERFACE + USB_CDC_FUNCTIONAL_CALL_MANAGEMENT, // Type of functional descriptor + 0x00, // bmCapabilities of CallManagement + 1, // Data interface number + + /* Interrupt Endpoint (IN)Descriptor */ + + 0x07, // Size of this descriptor + USB_DESCRIPTOR_ENDPOINT, // Endpoint Descriptor + 1| USB_EP_DIRECTION_IN, // EndpointAddress ( EP1 IN INTERRUPT) + USB_TRANSFER_TYPE_INTERRUPT, // Attributes type of EP (INTERRUPT) + 0x10,0x00, // Max packet size of this EP + 0x02, // Interval (in ms) + + /* Interface Descriptor */ + + 0x09, // Size of this descriptor in bytes + USB_DESCRIPTOR_INTERFACE, // INTERFACE descriptor type + 1, // Interface Number + 0x00, // Alternate Setting Number + 0x02, // Number of endpoints in this interface + USB_CDC_DATA_INTERFACE_CLASS_CODE, // Class code + 0x00, // Subclass code + USB_CDC_PROTOCOL_NO_CLASS_SPECIFIC, // Protocol code + 0x00, // Interface string index + + /* Bulk Endpoint (OUT)Descriptor */ + + 0x07, // Size of this descriptor + USB_DESCRIPTOR_ENDPOINT, // Endpoint Descriptor + 2|USB_EP_DIRECTION_OUT, // EndpointAddress ( EP2 OUT) + USB_TRANSFER_TYPE_BULK, // Attributes type of EP (BULK) + 0x40,0x00, // Max packet size of this EP + 0x00, // Interval (in ms) + + /* Bulk Endpoint (IN)Descriptor */ + + 0x07, // Size of this descriptor + USB_DESCRIPTOR_ENDPOINT, // Endpoint Descriptor + 2|USB_EP_DIRECTION_IN, // EndpointAddress ( EP2 IN ) + 0x02, // Attributes type of EP (BULK) + 0x40,0x00, // Max packet size of this EP + 0x00, // Interval (in ms) + + +}; + +/******************************************* + * Array of Full speed config descriptors + *******************************************/ +USB_DEVICE_CONFIGURATION_DESCRIPTORS_TABLE fullSpeedConfigDescSet[1] = +{ + fullSpeedConfigurationDescriptor +}; + + +/************************************** + * String descriptors. + *************************************/ + + /******************************************* + * Language code string descriptor + *******************************************/ + const struct + { + uint8_t bLength; + uint8_t bDscType; + uint16_t string[1]; + } + sd000 = + { + sizeof(sd000), // Size of this descriptor in bytes + USB_DESCRIPTOR_STRING, // STRING descriptor type + {0x0409} // Language ID + }; +/******************************************* + * Manufacturer string descriptor + *******************************************/ + const struct + { + uint8_t bLength; // Size of this descriptor in bytes + uint8_t bDscType; // STRING descriptor type + uint16_t string[25]; // String + } + sd001 = + { + sizeof(sd001), + USB_DESCRIPTOR_STRING, + {'M','i','c','r','o','c','h','i','p',' ','T','e','c','h','n','o','l','o','g','y',' ','I','n','c','.'} + + }; + +/******************************************* + * Product string descriptor + *******************************************/ + const struct + { + uint8_t bLength; // Size of this descriptor in bytes + uint8_t bDscType; // STRING descriptor type + uint16_t string[12]; // String + } + sd002 = + { + sizeof(sd002), + USB_DESCRIPTOR_STRING, + {'I','o','T',' ','E','t','h','e','r','n','e','t'} + }; + +/*************************************** + * Array of string descriptors + ***************************************/ +USB_DEVICE_STRING_DESCRIPTORS_TABLE stringDescriptors[3]= +{ + (const uint8_t *const)&sd000, + (const uint8_t *const)&sd001, + (const uint8_t *const)&sd002 +}; + +/******************************************* + * USB Device Layer Master Descriptor Table + *******************************************/ +const USB_DEVICE_MASTER_DESCRIPTOR usbMasterDescriptor = +{ + &deviceDescriptor, /* Full speed descriptor */ + 1, /* Total number of full speed configurations available */ + fullSpeedConfigDescSet, /* Pointer to array of full speed configurations descriptors*/ + NULL, + 0, + NULL, + 3, // Total number of string descriptors available. + stringDescriptors, // Pointer to array of string descriptors. + NULL, + NULL +}; + + +/**************************************************** + * USB Device Layer Initialization Data + ****************************************************/ +const USB_DEVICE_INIT usbDevInitData = +{ + /* System module initialization */ + .moduleInit = {SYS_MODULE_POWER_RUN_FULL}, + + /* Number of function drivers registered to this instance of the + USB device layer */ + .registeredFuncCount = 1, + + /* Function driver table registered to this instance of the USB device layer*/ + .registeredFunctions = (USB_DEVICE_FUNCTION_REGISTRATION_TABLE*)funcRegistrationTable, + + /* Pointer to USB Descriptor structure */ + .usbMasterDescriptor = (USB_DEVICE_MASTER_DESCRIPTOR*)&usbMasterDescriptor, + + /* USB Device Speed */ + .deviceSpeed = USB_SPEED_FULL, + + /* Index of the USB Driver to be used by this Device Layer Instance */ + .driverIndex = DRV_USBHS_INDEX_0, + + /* Pointer to the USB Driver Functions. */ + .usbDriverInterface = DRV_USBHS_DEVICE_INTERFACE, + +}; +// + +// ***************************************************************************** +// ***************************************************************************** +// Section: Static Initialization Functions +// ***************************************************************************** +// ***************************************************************************** + + +// ***************************************************************************** +// ***************************************************************************** +// Section: System Initialization +// ***************************************************************************** +// ***************************************************************************** + +/******************************************************************************* + Function: + void SYS_Initialize ( void *data ) + + Summary: + Initializes the board, services, drivers, application and other modules. + + Remarks: + See prototype in system/common/sys_module.h. + */ + +void SYS_Initialize ( void* data ) +{ + /* Core Processor Initialization */ + SYS_CLK_Initialize( NULL ); + sysObj.sysDevcon = SYS_DEVCON_Initialize(SYS_DEVCON_INDEX_0, (SYS_MODULE_INIT*)&sysDevconInit); + SYS_DEVCON_PerformanceConfig(SYS_CLK_SystemFrequencyGet()); + SYS_PORTS_Initialize(); + + /* Initialize Drivers */ + + /* Initialize ADC */ + DRV_ADC_Initialize(); + + /*Initialize CMP/CVREF */ + DRV_CMP_Initialize(); + /* Configure the Flash Controller Interrupt Priority */ + SYS_INT_VectorPrioritySet(INT_VECTOR_FLASH, INT_PRIORITY_LEVEL3); + + /* Configure the Flash Controller Interrupt Sub Priority */ + SYS_INT_VectorSubprioritySet(INT_VECTOR_FLASH, INT_SUBPRIORITY_LEVEL0); + + /* Initialize the NVM Driver */ + sysObj.drvNvm = DRV_NVM_Initialize(DRV_NVM_INDEX_0, (SYS_MODULE_INIT *)&drvNvmInit); + + sysObj.drvTmr0 = DRV_TMR_Initialize(DRV_TMR_INDEX_0, (SYS_MODULE_INIT *)&drvTmr0InitData); + + SYS_INT_VectorPrioritySet(INT_VECTOR_T2, INT_PRIORITY_LEVEL1); + SYS_INT_VectorSubprioritySet(INT_VECTOR_T2, INT_SUBPRIORITY_LEVEL0); + + + /* Initialize USB Driver */ + sysObj.drvUSBObject = DRV_USBHS_Initialize(DRV_USBHS_INDEX_0, (SYS_MODULE_INIT *) &drvUSBInit); + + /* Initialize System Services */ + + /*** File System Service Initialization Code ***/ + SYS_FS_Initialize( (const void *) sysFSInit ); + + /*** Interrupt Service Initialization Code ***/ + SYS_INT_Initialize(); + + /*** Random Service Initialization Code ***/ + SYS_RANDOM_Initialize(0, 0); + + /*** TMR Service Initialization Code ***/ + sysObj.sysTmr = SYS_TMR_Initialize(SYS_TMR_INDEX_0, (const SYS_MODULE_INIT * const)&sysTmrInitData); + + /* Initialize Middleware */ + sysObj.netPres = NET_PRES_Initialize(0, (SYS_MODULE_INIT*)&netPresInitData); + + /* set priority for ETHERNET interrupt source */ + SYS_INT_VectorPrioritySet(INT_VECTOR_ETH, INT_PRIORITY_LEVEL5); + + /* set sub-priority for ETHERNET interrupt source */ + SYS_INT_VectorSubprioritySet(INT_VECTOR_ETH, INT_SUBPRIORITY_LEVEL3); + + /* TCPIP Stack Initialization */ + sysObj.tcpip = TCPIP_STACK_Init(); + SYS_ASSERT(sysObj.tcpip != SYS_MODULE_OBJ_INVALID, "TCPIP_STACK_Init Failed" ); + + /* Set priority of USB interrupt source */ + SYS_INT_VectorPrioritySet(INT_VECTOR_USB1, INT_PRIORITY_LEVEL1); + + /* Set Sub-priority of USB interrupt source */ + SYS_INT_VectorSubprioritySet(INT_VECTOR_USB1, INT_SUBPRIORITY_LEVEL0); + + /* Set the priority of the USB DMA Interrupt */ + SYS_INT_VectorPrioritySet(INT_VECTOR_USB1_DMA, INT_PRIORITY_LEVEL1); + + /* Set Sub-priority of the USB DMA Interrupt */ + SYS_INT_VectorSubprioritySet(INT_VECTOR_USB1_DMA, INT_SUBPRIORITY_LEVEL0); + + + /* Initialize the USB device layer */ + sysObj.usbDevObject0 = USB_DEVICE_Initialize (USB_DEVICE_INDEX_0 , ( SYS_MODULE_INIT* ) & usbDevInitData); + + + /* Initialize the Application */ + APP_Initialize(); + APP1_Initialize(); + APP2_Initialize(); +} + + +/******************************************************************************* + End of File +*/ + diff --git a/software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/system_interrupt.c b/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/system_interrupt.c similarity index 96% rename from software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/system_interrupt.c rename to software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/system_interrupt.c index 2cd42a5..836e4f3 100644 --- a/software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/system_interrupt.c +++ b/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/system_interrupt.c @@ -63,6 +63,7 @@ SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES #include #include "app.h" #include "app1.h" +#include "app2.h" #include "system_definitions.h" #include "peripheral/cmp/plib_cmp.h" // ***************************************************************************** diff --git a/software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/system_interrupt_a.S b/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/system_interrupt_a.S similarity index 100% rename from software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/system_interrupt_a.S rename to software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/system_interrupt_a.S diff --git a/software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/system_tasks.c b/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/system_tasks.c similarity index 89% rename from software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/system_tasks.c rename to software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/system_tasks.c index 2fe0a3a..78c846b 100644 --- a/software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/system_tasks.c +++ b/software/aws-iot-ethernet/firmware/src/system_config/DM990004_IoT_Ethernet/system_tasks.c @@ -56,6 +56,7 @@ SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES #include "system_definitions.h" #include "app.h" #include "app1.h" +#include "app2.h" // ***************************************************************************** @@ -70,6 +71,7 @@ static void _SYS_Tasks ( void ); static void _APP_Tasks(void); static void _APP1_Tasks(void); +static void _APP2_Tasks(void); // ***************************************************************************** @@ -104,6 +106,11 @@ void SYS_Tasks ( void ) "APP1 Tasks", 512, NULL, 2, NULL); + /* Create OS Thread for APP2 Tasks. */ + xTaskCreate((TaskFunction_t) _APP2_Tasks, + "APP2 Tasks", + 2048, NULL, 2, NULL); + /************** * Start RTOS * **************/ @@ -126,16 +133,12 @@ static void _SYS_Tasks ( void) SYS_DEVCON_Tasks(sysObj.sysDevcon); /* Maintain the file system state machine. */ SYS_FS_Tasks(); - SYS_CONSOLE_Tasks(sysObj.sysConsole0); - /* SYS_COMMAND layer tasks routine */ - SYS_CMD_Tasks(); /* SYS_TMR Device layer tasks routine */ SYS_TMR_Tasks(sysObj.sysTmr); /* Maintain Device Drivers */ /* Maintain Middleware */ - NET_PRES_Tasks(sysObj.netPres); /* USB HS Driver Task Routine */ @@ -146,6 +149,7 @@ static void _SYS_Tasks ( void) /* Maintain the TCP/IP Stack*/ TCPIP_STACK_Task(sysObj.tcpip); + NET_PRES_Tasks(sysObj.netPres); /* Task Delay */ vTaskDelay(1 / portTICK_PERIOD_MS); @@ -190,6 +194,24 @@ static void _APP1_Tasks(void) } +/******************************************************************************* + Function: + void _APP2_Tasks ( void ) + + Summary: + Maintains state machine of APP2. +*/ + +static void _APP2_Tasks(void) +{ + while(1) + { + APP2_Tasks(); + vTaskDelay(1 / portTICK_PERIOD_MS); + } +} + + /******************************************************************************* End of File */ diff --git a/software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/IoT_Ethernet.mhc b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/DM990005_IoT_Ethernet.mhc similarity index 68% rename from software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/IoT_Ethernet.mhc rename to software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/DM990005_IoT_Ethernet.mhc index 31cb3b6..5d03420 100644 --- a/software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/IoT_Ethernet.mhc +++ b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/DM990005_IoT_Ethernet.mhc @@ -1,14 +1,14 @@ # -# Configuration generated by Microchip Harmony Configurator (MHC) v1.0.8.7 +# Configuration generated by Microchip Harmony Configurator (MHC) v1.0.9.2 # Project name: aws-iot-ethernet -# Configuration: IoT_Ethernet +# Configuration: DM990005_IoT_Ethernet # Device: PIC32MZ2048EFM064 -# Harmony version: 1.08.01 +# Harmony version: 1.09 # # -# from $PROJECT_FIRMWARE_DIRECTORY/$PROJECT_NAME.hconfig +# from /Users/c14227/Documents/git-projects/iot-00027--v2.0.0-firmware-and-application-development/software/aws-iot-ethernet/firmware/aws-iot-ethernet.hconfig # -CONFIG_APP_INSTANCES=2 +CONFIG_APP_INSTANCES=3 # # from $HARMONY_VERSION_PATH/utilities/mhc/config/app_name_idx_gencode.ftl # @@ -18,7 +18,7 @@ CONFIG_APP_AUTO_GENERATE_CODE0=n CONFIG_APP_TASK_SIZE_IDX0=2048 CONFIG_APP_TASK_PRIORITY_IDX0=1 CONFIG_APP_TASK_USE_DELAY_IDX0=y -CONFIG_APP_TASK_DELAY_IDX0=1 +CONFIG_APP_TASK_DELAY_IDX0=3 CONFIG_APP_MENU_IDX1=y CONFIG_APP_NAME_1="app1" CONFIG_APP_AUTO_GENERATE_CODE1=n @@ -26,14 +26,21 @@ CONFIG_APP_TASK_SIZE_IDX1=512 CONFIG_APP_TASK_PRIORITY_IDX1=2 CONFIG_APP_TASK_USE_DELAY_IDX1=y CONFIG_APP_TASK_DELAY_IDX1=10 +CONFIG_APP_MENU_IDX2=y +CONFIG_APP_NAME_2="app2" +CONFIG_APP_AUTO_GENERATE_CODE2=n +CONFIG_APP_TASK_SIZE_IDX2=2048 +CONFIG_APP_TASK_PRIORITY_IDX2=2 +CONFIG_APP_TASK_USE_DELAY_IDX2=y +CONFIG_APP_TASK_DELAY_IDX2=1 # -# from $PROJECT_FIRMWARE_DIRECTORY/$PROJECT_NAME.hconfig +# from /Users/c14227/Documents/git-projects/iot-00027--v2.0.0-firmware-and-application-development/software/aws-iot-ethernet/firmware/aws-iot-ethernet.hconfig # CONFIG_USE_EXCEPTION_HANDLER=y CONFIG_EXCEPTION_USE_SYS_DEBUG=y CONFIG_EXCEPTION_BREAKPOINT=y # -# from framework.hconfig +# from $HARMONY_VERSION_PATH/framework/config/framework.hconfig # CONFIG_FW_USE_SYS_TASK=y CONFIG_FW_SYS_TASK_SIZE=4096 @@ -41,33 +48,37 @@ CONFIG_FW_SYS_TASK_PRIORITY=2 CONFIG_FW_SYS_TASK_USE_DELAY=y CONFIG_FW_SYS_TASK_DELAY=1 # -# from bluetooth.hconfig +# from $HARMONY_VERSION_PATH/framework/bluetooth/config/bluetooth.hconfig # CONFIG_USE_BLUETOOTH_LIBRARIES=n # -# from bootloader.hconfig +# from $HARMONY_VERSION_PATH/framework/bootloader/config/bootloader.hconfig # CONFIG_USE_BOOTLOADER=n # -# from crypto.hconfig +# from $HARMONY_VERSION_PATH/framework/classb/config/classb.hconfig +# +CONFIG_USE_CLASSB=n +# +# from $HARMONY_VERSION_PATH/framework/crypto/config/crypto.hconfig # CONFIG_USE_CRYPTO_LIBRARY=y CONFIG_USE_CRYPTO_HW=n # -# from crypto_cipher.hconfig +# from $HARMONY_VERSION_PATH/framework/crypto/config/crypto_cipher.hconfig # CONFIG_USE_CRYPTO_ECC=n CONFIG_USE_CRYPTO_3DES_SW=y CONFIG_USE_CRYPTO_RSA=y # -# from crypto_cipher_aes.hconfig +# from $HARMONY_VERSION_PATH/framework/crypto/config/crypto_cipher_aes.hconfig # CONFIG_USE_CRYPTO_AES_SW=y CONFIG_USE_CRYPTO_AES_CBC_SW=n CONFIG_USE_CRYPTO_AES_COUNTER_SW=n CONFIG_USE_CRYPTO_AES_DIRECT_SW=n # -# from crypto_hash.hconfig +# from $HARMONY_VERSION_PATH/framework/crypto/config/crypto_hash.hconfig # CONFIG_USE_CRYPTO_MD5_SW=n CONFIG_USE_CRYPTO_SHA_SW=n @@ -76,28 +87,28 @@ CONFIG_USE_CRYPTO_SHA_384=n CONFIG_USE_CRYPTO_SHA_512=n CONFIG_USE_CRYPTO_HMAC_SW=y # -# from crypto_compress.hconfig +# from $HARMONY_VERSION_PATH/framework/crypto/config/crypto_compress.hconfig # CONFIG_USE_CRYPTO_COMPRESS=n # -# from crypto_random.hconfig +# from $HARMONY_VERSION_PATH/framework/crypto/config/crypto_random.hconfig # CONFIG_USE_CRYPTO_RANDOM=y # -# from crypto.hconfig +# from $HARMONY_VERSION_PATH/framework/crypto/config/crypto.hconfig # CONFIG_USE_CRYPTO_LIB=n # -# from decoder.hconfig +# from $HARMONY_VERSION_PATH/framework/decoder/config/decoder.hconfig # CONFIG_USE_IMAGE_DECODER=n CONFIG_USE_DECODER=n # -# from drv_adc.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/adc/config/drv_adc.hconfig # CONFIG_USE_DRV_ADC=y # -# from drv_adchs.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/adc/config/drv_adchs.hconfig # CONFIG_DRV_ADCHS_DRIVER_MODE="STATIC" CONFIG_DRV_ADCHS_INTERRUPT_MODE=n @@ -125,11 +136,11 @@ CONFIG_DRV_ADCHS_CHANNEL_CLOCK_DIVIDER_IDX0=4 CONFIG_DRV_ADCHS_SAMPLE_TIME_COUNT_IDX0=32 CONFIG_DRV_ADCHS_TRIGGER_SAMPLE_SELECT_IDX0="ADCHS_CHANNEL_UNSYNC_TRIGGER_UNSYNC_SAMPLING" # -# from drv_adchs.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/adc/config/drv_adchs.hconfig # CONFIG_DRV_ADCHS_POWER_STATE="SYS_MODULE_POWER_RUN_FULL" # -# from drv_adc.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/adc/config/drv_adc.hconfig # CONFIG_USE_DRV_ADCHS_CLASS_2_ANALOG_INPUT_CONVERT=n CONFIG_USE_DRV_ADCHS_SCAN_MODE=n @@ -147,19 +158,19 @@ CONFIG_DRV_ADCHS_DIGITAL_FILTER_OVERSAMPLING_RATIO_IDX0="ADCHS_DIGITAL_FILTER_OV CONFIG_DRV_ADCHS_DIGITAL_FILTER_SIG_BITS_IDX0="ADCHS_DIGITAL_FILTER_SIGNIFICANT_ALL_16BITS" CONFIG_DRV_ADCHS_DIGITAL_FILTER_INST_IDX1=n # -# from drv_adc.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/adc/config/drv_adc.hconfig # CONFIG_USE_DRV_ADCHS_CVD=n # -# from drv_camera.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/camera/config/drv_camera.hconfig # CONFIG_USE_DRV_CAMERA=n # -# from drv_can.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/can/config/drv_can.hconfig # CONFIG_USE_DRV_CAN=n # -# from drv_cmp.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/cmp/config/drv_cmp.hconfig # CONFIG_DRV_CVREF_ENABLE=y CONFIG_DRV_CMP_CVREF_VOLTAGE_SOURCE="CMP_CVREF_VOLTAGE_SOURCE_VDD" @@ -185,22 +196,22 @@ CONFIG_DRV_CMP_OUTPUT_INVERT_IDX0=n CONFIG_DRV_CMP_INVERTING_INPUT_IDX0="CMP_INVERTING_INPUT_EXTERNAL_PIN_B" CONFIG_DRV_CMP_NON_INVERTING_INPUT_IDX0="CMP_NON_INVERTING_INPUT_CVREF" # -# from drv_codec.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/codec/config/drv_codec.hconfig # CONFIG_SELECT_DRV_AK4384=n CONFIG_SELECT_DRV_AK4642=n CONFIG_SELECT_DRV_AK4953=n CONFIG_SELECT_DRV_AK7755=n # -# from drv_encx24j600.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/encx24j600/config/drv_encx24j600.hconfig # CONFIG_DRV_ENCX24J600_USE_DRIVER=n # -# from drv_enc28j60.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/enc28j60/config/drv_enc28j60.hconfig # CONFIG_DRV_ENC28J60_USE_DRIVER=n # -# from tcpip_mac.hconfig +# from $HARMONY_VERSION_PATH/framework/tcpip/config/tcpip_mac.hconfig # CONFIG_TCPIP_USE_ETH_MAC=y CONFIG_TCPIP_EMAC_TX_DESCRIPTORS=8 @@ -254,53 +265,51 @@ CONFIG_DRV_ETHMAC_PERIPHERAL_ID=1 CONFIG_DRV_ETHMAC_INTERRUPT_MODE=y CONFIG_DRV_ETHMAC_POWER_STATE="SYS_MODULE_POWER_RUN_FULL" # -# from drv_flash.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/flash/config/drv_flash.hconfig # CONFIG_USE_DRV_FLASH=n # -# from drv_gfx_glcd.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/gfx/controller/glcd/config/drv_gfx_glcd.hconfig # CONFIG_USE_DRV_GFX_GLCD=n # -# from drv_gfx_lcc.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/gfx/controller/lcc/config/drv_gfx_lcc.hconfig # CONFIG_USE_DRV_GFX_LCC=n # -# from drv_gfx_otm2201a.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/gfx/controller/otm2201a/config/drv_gfx_otm2201a.hconfig # CONFIG_USE_DRV_GFX_OTM2201A=n # -# from drv_gfx_ssd1926.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/gfx/controller/ssd1926/config/drv_gfx_ssd1926.hconfig # CONFIG_USE_DRV_GFX_SSD1926=n # -# from drv_gfx_ssd1289.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/gfx/controller/ssd1289/config/drv_gfx_ssd1289.hconfig # CONFIG_USE_DRV_GFX_SSD1289=n # -# from drv_gfx_s1d13517.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/gfx/controller/s1d13517/config/drv_gfx_s1d13517.hconfig # CONFIG_USE_DRV_GFX_S1D13517=n # -# from drv_gfx_display.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/gfx/display/config/drv_gfx_display.hconfig # CONFIG_USE_DRV_GFX_DISPLAY=n -CONFIG_DRV_GFX_DISP_VSYNC_NEGATIVE_POLARITY=n -CONFIG_DRV_GFX_DISP_HSYNC_NEGATIVE_POLARITY=n # -# from drv_i2c.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/i2c/config/drv_i2c.hconfig # CONFIG_USE_DRV_I2C=n # -# from drv_i2s.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/i2s/config/drv_i2s.hconfig # CONFIG_USE_DRV_I2S=n # -# from drv_ic.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/ic/config/drv_ic.hconfig # CONFIG_USE_DRV_IC=n # -# from drv_nvm.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/nvm/config/drv_nvm.hconfig # CONFIG_USE_DRV_NVM=y CONFIG_DRV_NVM_DRIVER_MODE="DYNAMIC" @@ -317,47 +326,55 @@ CONFIG_USE_DRV_NVM_ERASE_WRITE=y CONFIG_USE_DRV_NVM_SYS_FS_REGISTER=y CONFIG_USE_DRV_NVM_DISABLE_ERROR_CHECK=n # -# from drv_oc.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/oc/config/drv_oc.hconfig # CONFIG_USE_DRV_OC=n # -# from drv_pmp.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/pmp/config/drv_pmp.hconfig # CONFIG_USE_DRV_PMP=n # -# from drv_rtcc.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/rtcc/config/drv_rtcc.hconfig # CONFIG_USE_DRV_RTCC=n # -# from drv_sample.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/sample/config/drv_sample.hconfig # CONFIG_USE_DRV_SAMPLE=n # -# from drv_sdcard.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/sdcard/config/drv_sdcard.hconfig # CONFIG_USE_DRV_SDCARD=n # -# from drv_spi.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/spi/config/drv_spi.hconfig # CONFIG_DRV_SPI_USE_DRIVER=n # -# from drv_sqi.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/sqi/config/drv_sqi.hconfig # CONFIG_DRV_SQI_USE_DRIVER=n # -# from drv_sst25vf016b.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/spi_flash/sst25/config/drv_sst25.hconfig +# +CONFIG_USE_DRV_SST25=n +# +# from $HARMONY_VERSION_PATH/framework/driver/spi_flash/sst25vf016b/config/drv_sst25vf016b.hconfig # CONFIG_USE_DRV_SST25VF016B=n # -# from drv_sst25vf020b.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/spi_flash/sst25vf020b/config/drv_sst25vf020b.hconfig # CONFIG_USE_DRV_SST25VF020B=n # -# from drv_sst25vf064c.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/spi_flash/sst25vf064c/config/drv_sst25vf064c.hconfig # CONFIG_USE_DRV_SST25VF064C=n # -# from drv_tmr.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/sram/config/drv_sram.hconfig +# +CONFIG_USE_DRV_SRAM=n +# +# from $HARMONY_VERSION_PATH/framework/driver/tmr/config/drv_tmr.hconfig # CONFIG_USE_DRV_TMR=y CONFIG_DRV_TMR_DRIVER_MODE="DYNAMIC" @@ -378,49 +395,51 @@ CONFIG_DRV_TMR_OPERATION_MODE_IDX0="DRV_TMR_OPERATION_MODE_16_BIT" CONFIG_DRV_TMR_ASYNC_WRITE_ENABLE_IDX0=n CONFIG_DRV_TMR_POWER_STATE_IDX0="SYS_MODULE_POWER_RUN_FULL" # -# from drv_adc10bit.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/touch/adc10bit/config/drv_adc10bit.hconfig # CONFIG_USE_DRV_TOUCH_ADC10BIT=n # -# from drv_ar1021.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/touch/ar1021/config/drv_ar1021.hconfig # CONFIG_USE_DRV_TOUCH_AR1021=n # -# from drv_mtch6301.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/touch/mtch6301/config/drv_mtch6301.hconfig # CONFIG_USE_DRV_TOUCH_MTCH6301=n # -# from drv_mtch6303.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/touch/mtch6303/config/drv_mtch6303.hconfig # CONFIG_USE_DRV_TOUCH_MTCH6303=n # -# from drv_usart.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/usart/config/drv_usart.hconfig # CONFIG_USE_DRV_USART=n # -# from drv_wifi.hconfig +# from $HARMONY_VERSION_PATH/framework/driver/wifi/config/drv_wifi.hconfig # CONFIG_USE_DRV_WIFI=n # -# from gfx.hconfig +# from $HARMONY_VERSION_PATH/framework/gfx/config/gfx.hconfig # CONFIG_USE_GFX_STACK=n # -# from gfx_segger.hconfig +# from $HARMONY_VERSION_PATH/framework/gfx/config/gfx_segger.hconfig # CONFIG_USE_SEGGER_EMWIN=n # -# from dsp.hconfig +# from $HARMONY_VERSION_PATH/framework/math/dsp/config/dsp.hconfig # CONFIG_USE_DSP=n # -# from libq.hconfig +# from $HARMONY_VERSION_PATH/framework/math/libq/config/libq.hconfig # CONFIG_USE_LIBQ=n +CONFIG_USE_LIBQ_C=n # -# from net_pres.hconfig +# from $HARMONY_VERSION_PATH/framework/net/pres/config/net_pres.hconfig # CONFIG_NET_PRES_USE=y +CONFIG_NET_PRES_RTOS="Combined with System Tasks" CONFIG_NET_PRES_SOCKETS=10 CONFIG_NET_PRES_INSTANCES=1 # @@ -438,7 +457,7 @@ CONFIG_NET_PRES_USE_WOLF_SSL_IDX0=y CONFIG_NET_PRES_SUPPORT_STREAM_ENC_IDX0=y CONFIG_NET_PRES_SUPPORT_CLIENT_ENC_IDX0=y # -# from net_pres.hconfig +# from $HARMONY_VERSION_PATH/framework/net/pres/config/net_pres.hconfig # CONFIG_NET_PRES_BLOB_CERT_REPO=y CONFIG_NET_PRES_BLOB_CLIENT_SUPPORT=y @@ -447,19 +466,19 @@ CONFIG_NET_PRES_BLOB_CLIENT_CERT_VARIABLE="caCert" CONFIG_NET_PRES_BLOB_CLIENT_CERT_LEN_VARIABLE="caCert_len" CONFIG_NET_PRES_BLOB_SERVER_SUPPORT=n # -# from osal.hconfig +# from $HARMONY_VERSION_PATH/framework/osal/config/osal.hconfig # CONFIG_USE_OSAL=y # -# from peripheral.hconfig +# from $HARMONY_VERSION_PATH/framework/peripheral/config/peripheral.hconfig # CONFIG_PERIPHERAL_LIB=y # -# from sample_module.hconfig +# from $HARMONY_VERSION_PATH/framework/sample/config/sample_module.hconfig # CONFIG_USE_SAMPLE_MODULE=n # -# from sys_clk.hconfig +# from $HARMONY_VERSION_PATH/framework/system/clk/config/sys_clk.hconfig # CONFIG_USE_SYS_CLK=y CONFIG_SYS_CLK_MODE="STATIC" @@ -491,82 +510,72 @@ CONFIG_SYS_CLK_PBCLK4_FREQ="100000000" CONFIG_SYS_CLK_PBCLK6_FREQ="200000000" CONFIG_SYS_CLK_PBCLK7_FREQ="200000000" # -# from sys_command.hconfig +# from $HARMONY_VERSION_PATH/framework/system/command/config/sys_command.hconfig # -CONFIG_USE_SYS_COMMAND=y -CONFIG_SYS_COMMAND_RTOS="Combined with System Tasks" -CONFIG_COMMAND_PRINT_BUFFER_SIZE=2048 -CONFIG_REMAP_SYS_DEBUG_MESSAGE=y -CONFIG_REMAP_SYS_CONSOLE_MESSAGE=y +CONFIG_USE_SYS_COMMAND=n # -# from sys_common.hconfig +# from $HARMONY_VERSION_PATH/framework/system/common/config/sys_common.hconfig # CONFIG_USE_SYS_COMMON=y CONFIG_SYS_BUFFER=n CONFIG_SYS_QUEUE=n # -# from sys_console.hconfig +# from $HARMONY_VERSION_PATH/framework/system/console/config/sys_console.hconfig # -CONFIG_USE_SYS_CONSOLE=y -CONFIG_SYS_CONSOLE_MODE="DYNAMIC" -CONFIG_SYS_CONSOLE_OVERRIDE_STDIO=y -CONFIG_SYS_CONSOLE_INSTANCES_NUMBER_DYNAMIC=1 -CONFIG_SYS_CONSOLE_SOURCE_IDX0="USB_CDC_CONSOLE" -CONFIG_SYS_CONSOLE_RTOS_IDX0="Combined with System Tasks" -CONFIG_SYS_CONSOLE_USB_CDC_INSTANCE_1="USB_DEVICE_CDC_INDEX_0" -CONFIG_SYS_CONSOLE_USB_CDC_COMM_BAUD_RATE="230400" -CONFIG_SYS_CONSOLE_USB_CDC_RD_QUEUE_DEPTH=1 -CONFIG_SYS_CONSOLE_USB_CDC_WR_QUEUE_DEPTH=128 +CONFIG_USE_SYS_CONSOLE=n # -# from sys_debug.hconfig +# from $HARMONY_VERSION_PATH/framework/system/debug/config/sys_debug.hconfig # -CONFIG_USE_SYS_DEBUG=y -CONFIG_SYS_ERR_LEVEL="SYS_ERROR_FATAL" -CONFIG_DEBUG_PRINT_BUFFER_SIZE=1024 +CONFIG_USE_SYS_DEBUG=n # -# from sys_devcon.hconfig +# from $HARMONY_VERSION_PATH/framework/system/devcon/config/sys_devcon.hconfig # CONFIG_USE_SYS_DEVCON=y CONFIG_SYS_DEVCON_RTOS="Combined with System Tasks" CONFIG_SYS_DEVCON_USE_JTAG=n CONFIG_SYS_DEVCON_USE_TRACE=n # -# from sys_dma.hconfig +# from $HARMONY_VERSION_PATH/framework/system/dma/config/sys_dma.hconfig # CONFIG_USE_SYS_DMA=n # -# from sys_fs.hconfig +# from $HARMONY_VERSION_PATH/framework/system/fs/config/sys_fs.hconfig # CONFIG_USE_SYS_FS=y CONFIG_SYS_FS_RTOS="Combined with System Tasks" CONFIG_SYS_FS_MAX_FILES=25 CONFIG_SYS_FS_MEDIA_MAX_BLOCK_SIZE=512 CONFIG_SYS_FS_MEDIA_MANAGER_BUFFER_SIZE=2048 -CONFIG_SYS_FS_AUTO_MOUNT=n +CONFIG_SYS_FS_AUTO_MOUNT=y CONFIG_SYS_FS_INSTANCES_NUMBER=1 -CONFIG_SYS_FS_VOLUME_NUMBER=1 # # from $HARMONY_VERSION_PATH/framework/system/fs/config/sys_fs_idx.ftl # CONFIG_SYS_FS_IDX0=y +CONFIG_SYS_FS_MEDIA_TYPE_DEFINE_IDX0="SYS_FS_MEDIA_TYPE_NVM" +CONFIG_SYS_FS_TYPE_DEFINE_IDX0="MPFS2" +CONFIG_SYS_FS_VOLUME_INSTANCES_NUMBER_IDX0=1 +CONFIG_SYS_FS_VOL_1_IDX0=y +CONFIG_SYS_FS_MEDIA_DEVICE_1_NAME_IDX0="/dev/nvma1" +CONFIG_SYS_FS_MEDIA_MOUNT_1_NAME_IDX0="/mnt/myDrive1" # -# from sys_fs.hconfig +# from $HARMONY_VERSION_PATH/framework/system/fs/config/sys_fs.hconfig # CONFIG_SYS_FS_MAX_FILE_SYSTEM_TYPE=1 CONFIG_SYS_FS_FAT=n CONFIG_SYS_FS_MPFS=y CONFIG_SYS_FS_USE_MBR=n # -# from sys_int.hconfig +# from $HARMONY_VERSION_PATH/framework/system/int/config/sys_int.hconfig # CONFIG_USE_SYS_INT=y CONFIG_USE_EXT_INT=n # -# from sys_msg.hconfig +# from $HARMONY_VERSION_PATH/framework/system/msg/config/sys_msg.hconfig # CONFIG_USE_SYS_MSG=n # -# from sys_ports.hconfig +# from $HARMONY_VERSION_PATH/framework/system/ports/config/sys_ports.hconfig # CONFIG_USE_SYS_PORTS=y CONFIG_SYS_PORTS_IMPLEMENTATION="STATIC" @@ -577,7 +586,7 @@ CONFIG_USE_SYS_PORTS_CN_INTERRUPT=n # CONFIG_USE_PORT_B=y CONFIG_SYS_PORT_B_ANSEL=0x1f -CONFIG_SYS_PORT_B_TRIS=0x8f3f +CONFIG_SYS_PORT_B_TRIS=0x873f CONFIG_SYS_PORT_B_LAT=0x4000 CONFIG_SYS_PORT_B_ODC=0x0 CONFIG_SYS_PORT_B_CNPU=0x0 @@ -608,7 +617,7 @@ CONFIG_SYS_PORT_E_CNPD=0x0 CONFIG_SYS_PORT_E_CNEN=0x0 CONFIG_USE_PORT_F=y CONFIG_SYS_PORT_F_ANSEL=0x0 -CONFIG_SYS_PORT_F_TRIS=0x39 +CONFIG_SYS_PORT_F_TRIS=0x31 CONFIG_SYS_PORT_F_LAT=0x0 CONFIG_SYS_PORT_F_ODC=0x0 CONFIG_SYS_PORT_F_CNPU=0x0 @@ -628,25 +637,25 @@ CONFIG_USE_PPS_OUTPUT_0=y CONFIG_SYS_PORT_PPS_OUTPUT_FUNCTION_0="OUTPUT_FUNC_C2OUT" CONFIG_SYS_PORT_PPS_OUTPUT_PIN_0="OUTPUT_PIN_RPB9" # -# from sys_random.hconfig +# from $HARMONY_VERSION_PATH/framework/system/random/config/sys_random.hconfig # CONFIG_USE_SYS_RANDOM=y CONFIG_SYS_RANDOM_CRYPTO_SEED_SIZE=32 CONFIG_SYS_RANDOM_USE_CRYPTO_STRENGTH=n # -# from sys_reset.hconfig +# from $HARMONY_VERSION_PATH/framework/system/reset/config/sys_reset.hconfig # -CONFIG_USE_SYS_RESET=y +CONFIG_USE_SYS_RESET=n # -# from sys_rtcc.hconfig +# from $HARMONY_VERSION_PATH/framework/system/rtcc/config/sys_rtcc.hconfig # CONFIG_USE_SYS_RTCC=n # -# from sys_touch.hconfig +# from $HARMONY_VERSION_PATH/framework/system/touch/config/sys_touch.hconfig # CONFIG_USE_SYS_TOUCH=n # -# from sys_tmr.hconfig +# from $HARMONY_VERSION_PATH/framework/system/tmr/config/sys_tmr.hconfig # CONFIG_USE_SYS_TMR=y CONFIG_SYS_TMR_RTOS="Combined with System Tasks" @@ -659,23 +668,30 @@ CONFIG_SYS_TMR_UNIT_RESOLUTION=10000 CONFIG_SYS_TMR_CLIENT_TOLERANCE=10 CONFIG_SYS_TMR_INTERRUPT_NOTIFICATION=n # -# from sys_wdt.hconfig +# from $HARMONY_VERSION_PATH/framework/system/wdt/config/sys_wdt.hconfig # CONFIG_USE_SYS_WDT=n # -# from test.hconfig +# from $HARMONY_VERSION_PATH/framework/test/config/test.hconfig # CONFIG_USE_TEST_HARNESS=n # -# from tcpip_stack.hconfig +# from $HARMONY_VERSION_PATH/framework/tcpip/config/tcpip_stack.hconfig # CONFIG_USE_TCPIP_STACK=y CONFIG_TCPIP_RTOS="Combined with System Tasks" CONFIG_TCPIP_STACK_USE_IPV4=y +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/ip.hconfig +# +CONFIG_TCPIP_IPV4_FRAGMENTATION=n +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/tcpip_stack.hconfig +# CONFIG_TCPIP_STACK_USE_IPV6=n CONFIG_TCPIP_USE_TCP=y # -# from tcp.hconfig +# from $HARMONY_VERSION_PATH/framework/tcpip/config/tcp.hconfig # CONFIG_TCPIP_TCP_MAX_SEG_SIZE_TX=1460 CONFIG_TCPIP_TCP_MAX_SEG_SIZE_RX_LOCAL=1460 @@ -695,12 +711,14 @@ CONFIG_TCPIP_TCP_AUTO_TRANSMIT_TIMEOUT_VAL=40 CONFIG_TCPIP_TCP_WINDOW_UPDATE_TIMEOUT_VAL=200 CONFIG_TCPIP_TCP_MAX_SOCKETS=15 CONFIG_TCPIP_TCP_TASK_TICK_RATE=5 +CONFIG_TCPIP_TCP_MSL_TIMEOUT=0 +CONFIG_TCPIP_TCP_QUIET_TIME=0 # -# from tcpip_stack.hconfig +# from $HARMONY_VERSION_PATH/framework/tcpip/config/tcpip_stack.hconfig # CONFIG_TCPIP_USE_UDP=y # -# from udp.hconfig +# from $HARMONY_VERSION_PATH/framework/tcpip/config/udp.hconfig # CONFIG_TCPIP_UDP_MAX_SOCKETS=10 CONFIG_TCPIP_UDP_SOCKET_DEFAULT_TX_SIZE=512 @@ -710,7 +728,7 @@ CONFIG_TCPIP_UDP_SOCKET_DEFAULT_TX_QUEUE_LIMIT=3 CONFIG_TCPIP_UDP_SOCKET_DEFAULT_RX_QUEUE_LIMIT=3 CONFIG_TCPIP_UDP_USE_POOL_BUFFERS=n # -# from tcpip_stack.hconfig +# from $HARMONY_VERSION_PATH/framework/tcpip/config/tcpip_stack.hconfig # CONFIG_TCPIP_STACK_NETWORK_CONFIG_NUMBER=1 # @@ -718,7 +736,7 @@ CONFIG_TCPIP_STACK_NETWORK_CONFIG_NUMBER=1 # CONFIG_TCPIP_STACK_NETWORK_CONFIG_IDX0=y CONFIG_TCPIP_NETWORK_DEFAULT_INTERFACE_NAME_IDX0="PIC32INT" -CONFIG_TCPIP_NETWORK_DEFAULT_HOST_NAME_IDX0="AWS_IOT_ETHERNET" +CONFIG_TCPIP_NETWORK_DEFAULT_HOST_NAME_IDX0="IOT_ETHERNET" CONFIG_TCPIP_NETWORK_DEFAULT_MAC_ADDR_IDX0="" CONFIG_TCPIP_NETWORK_DEFAULT_IP_ADDRESS_IDX0="0.0.0.0" CONFIG_TCPIP_NETWORK_DEFAULT_IP_MASK_IDX0="255.255.255.0" @@ -733,7 +751,7 @@ CONFIG_TCPIP_NETWORK_INTERFACE_FLAG_DNS_CLIENT_IDX0=y CONFIG_TCPIP_NETWORK_INTERFACE_FLAG_DNS_SERVER_IDX0=n CONFIG_TCPIP_NETWORK_DEFAULT_MAC_DRIVER_IDX0="DRV_ETHMAC_PIC32MACObject" # -# from tcpip_stack.hconfig +# from $HARMONY_VERSION_PATH/framework/tcpip/config/tcpip_stack.hconfig # CONFIG_TCPIP_STACK_TICK_RATE=5 CONFIG_TCPIP_STACK_USER_NOTIFICATION=n @@ -742,7 +760,7 @@ CONFIG_TCPIP_STACK_IF_UP_DOWN_OPERATION=y CONFIG_TCPIP_STACK_CONFIGURATION_SAVE_RESTORE=y CONFIG_TCPIP_STACK_SECURE_PORT_ENTRIES=10 # -# from tcpip_heap.hconfig +# from $HARMONY_VERSION_PATH/framework/tcpip/config/tcpip_heap.hconfig # CONFIG_TCPIP_USE_HEAP=y CONFIG_TCPIP_STACK_USE_HEAP_CONFIG="TCPIP_STACK_HEAP_TYPE_INTERNAL_HEAP" @@ -756,7 +774,7 @@ CONFIG_TCPIP_STACK_DRAM_SIZE=39250 CONFIG_TCPIP_STACK_DRAM_RUN_LIMIT=2048 CONFIG_TCPIP_STACK_DRAM_DEBUG_ENABLE=n # -# from arp.hconfig +# from $HARMONY_VERSION_PATH/framework/tcpip/config/arp.hconfig # CONFIG_TCPIP_ARP_CACHE_ENTRIES=5 CONFIG_TCPIP_ARP_CACHE_DELETE_OLD=y @@ -770,11 +788,11 @@ CONFIG_TCPIP_ARP_CACHE_ENTRY_RETRIES=3 CONFIG_TCPIP_ARP_GRATUITOUS_PROBE_COUNT=1 CONFIG_TCPIP_ARP_TASK_PROCESS_RATE=2 # -# from berkeley_api.hconfig +# from $HARMONY_VERSION_PATH/framework/tcpip/config/berkeley_api.hconfig # CONFIG_TCPIP_STACK_USE_BERKELEY_API=n # -# from dhcp.hconfig +# from $HARMONY_VERSION_PATH/framework/tcpip/config/dhcp.hconfig # CONFIG_TCPIP_STACK_USE_DHCP_CLIENT=y CONFIG_TCPIP_DHCP_TIMEOUT=10 @@ -784,11 +802,11 @@ CONFIG_TCPIP_DHCP_HOST_NAME_SIZE=20 CONFIG_TCPIP_DHCP_CLIENT_CONNECT_PORT=68 CONFIG_TCPIP_DHCP_SERVER_LISTEN_PORT=67 # -# from dhcps.hconfig +# from $HARMONY_VERSION_PATH/framework/tcpip/config/dhcps.hconfig # CONFIG_TCPIP_STACK_USE_DHCP_SERVER=n # -# from dns.hconfig +# from $HARMONY_VERSION_PATH/framework/tcpip/config/dns.hconfig # CONFIG_TCPIP_USE_DNS_CLIENT=y CONFIG_TCPIP_DNS_CLIENT_SERVER_TMO=60 @@ -806,64 +824,52 @@ CONFIG_TCPIP_DNS_CLIENT_MAX_SELECT_INTERFACES=4 CONFIG_TCPIP_DNS_CLIENT_DELETE_OLD_ENTRIES=y CONFIG_TCPIP_DNS_CLIENT_USER_NOTIFICATION=n # -# from dnss.hconfig +# from $HARMONY_VERSION_PATH/framework/tcpip/config/dnss.hconfig # CONFIG_TCPIP_USE_DNSS=n # -# from ddns.hconfig +# from $HARMONY_VERSION_PATH/framework/tcpip/config/ddns.hconfig # CONFIG_TCPIP_USE_DDNS=n # -# from ftp.hconfig +# from $HARMONY_VERSION_PATH/framework/tcpip/config/ftp.hconfig # CONFIG_TCPIP_USE_FTP_MODULE=n # -# from http.hconfig -# -CONFIG_TCPIP_STACK_USE_HTTP_SERVER=y -CONFIG_TCPIP_HTTP_MAX_HEADER_LEN=15 -CONFIG_TCPIP_HTTP_CACHE_LEN="600" -CONFIG_TCPIP_HTTP_TIMEOUT=45 -CONFIG_TCPIP_HTTP_MAX_CONNECTIONS=1 -CONFIG_TCPIP_HTTP_DEFAULT_FILE="index.htm" -CONFIG_TCPIP_HTTPS_DEFAULT_FILE="index.htm" -CONFIG_TCPIP_HTTP_DEFAULT_LEN=10 -CONFIG_TCPIP_HTTP_FILE_UPLOAD_ENABLE=n -CONFIG_TCPIP_HTTP_USE_POST=y -CONFIG_TCPIP_HTTP_USE_COOKIES=n -CONFIG_TCPIP_HTTP_USE_BASE64_DECODE=n -CONFIG_TCPIP_HTTP_USE_AUTHENTICATION=n -CONFIG_TCPIP_HTTP_NO_AUTH_WITHOUT_SSL=n -CONFIG_TCPIP_HTTP_MAX_DATA_LEN=4096 -CONFIG_TCPIP_HTTP_MIN_CALLBACK_FREE=16 -CONFIG_TCPIP_HTTP_SKT_TX_BUFF_SIZE=0 -CONFIG_TCPIP_HTTP_SKT_RX_BUFF_SIZE=0 -CONFIG_TCPIP_HTTP_CFG_FLAGS="TCPIP_HTTP_MODULE_FLAG_ADJUST_SKT_FIFOS" -CONFIG_TCPIP_HTTP_TASK_RATE=33 -CONFIG_TCPIP_HTTP_CUSTOM_TEMPLATE=n -# -# from icmp.hconfig +# from $HARMONY_VERSION_PATH/framework/tcpip/config/http.hconfig +# +CONFIG_TCPIP_STACK_USE_HTTP_SERVER=n +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/http_net.hconfig +# +CONFIG_TCPIP_STACK_USE_HTTP_NET_SERVER=n +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/icmp.hconfig # CONFIG_TCPIP_STACK_USE_ICMPV4=n # -# from nbns.hconfig +# from $HARMONY_VERSION_PATH/framework/tcpip/config/nbns.hconfig # CONFIG_TCPIP_USE_NBNS=y CONFIG_TCPIP_NBNS_TASK_TICK_RATE=110 # -# from tcpip_reboot.hconfig +# from $HARMONY_VERSION_PATH/framework/tcpip/config/tcpip_reboot.hconfig # CONFIG_TCPIP_USE_REBOOT_SERVER=n # -# from smtp.hconfig +# from $HARMONY_VERSION_PATH/framework/tcpip/config/smtp.hconfig # CONFIG_TCPIP_USE_SMTP_CLIENT=n # -# from snmp.hconfig +# from $HARMONY_VERSION_PATH/framework/tcpip/config/smtpc.hconfig +# +CONFIG_TCPIP_USE_SMTPC_CLIENT=n +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/snmp.hconfig # CONFIG_TCPIP_USE_SNMP=n # -# from sntp.hconfig +# from $HARMONY_VERSION_PATH/framework/tcpip/config/sntp.hconfig # CONFIG_TCPIP_USE_SNTP_CLIENT=y CONFIG_TCPIP_NTP_DEFAULT_IF="PIC32INT" @@ -880,78 +886,33 @@ CONFIG_TCPIP_NTP_FAST_QUERY_INTERVAL="14" CONFIG_TCPIP_NTP_TASK_TICK_RATE="1100" CONFIG_TCPIP_NTP_RX_QUEUE_LIMIT="2" # -# from telnet.hconfig +# from $HARMONY_VERSION_PATH/framework/tcpip/config/telnet.hconfig # CONFIG_TCPIP_USE_TELNET=n # -# from zeroconf.hconfig -# -CONFIG_TCPIP_USE_LINK_ZERO_CONFIG=y -CONFIG_TCPIP_ZC_WARN_ZCLL=n -CONFIG_TCPIP_ZC_INFO_ZCLL=n -CONFIG_TCPIP_ZC_DEBUG_ZCLL=n -CONFIG_TCPIP_ZC_LL_PROBE_WAIT=1 -CONFIG_TCPIP_ZC_LL_PROBE_MIN=1 -CONFIG_TCPIP_ZC_LL_PROBE_MAX=2 -CONFIG_TCPIP_ZC_LL_PROBE_NUM=3 -CONFIG_TCPIP_ZC_LL_ANNOUNCE_WAIT=2 -CONFIG_TCPIP_ZC_LL_ANNOUNCE_NUM=2 -CONFIG_TCPIP_ZC_LL_ANNOUNCE_INTERVAL=2 -CONFIG_TCPIP_ZC_LL_MAX_CONFLICTS=10 -CONFIG_TCPIP_ZC_LL_RATE_LIMIT_INTERVAL=60 -CONFIG_TCPIP_ZC_LL_DEFEND_INTERVAL=10 -CONFIG_TCPIP_ZC_LL_IPV4_LLBASE=0xa9fe0100 -CONFIG_TCPIP_ZC_LL_IPV4_LLBASE_MASK=0x0000FFFF -CONFIG_TCPIP_ZC_LL_TASK_TICK_RATE=333 -CONFIG_TCPIP_USE_MULTI_CAST_DNS_ZERO_CONFIG=y -CONFIG_TCPIP_ZC_INFO_MDNS=n -CONFIG_TCPIP_ZC_WARN_MDNS=n -CONFIG_TCPIP_ZC_DEBUG_MDNS=n -CONFIG_TCPIP_ZC_MDNS_TASK_TICK_RATE=63 -CONFIG_TCPIP_ZC_MDNS_PORT=5353 -CONFIG_TCPIP_ZC_MDNS_MAX_HOST_NAME_SIZE=32 -CONFIG_TCPIP_ZC_MDNS_MAX_LABEL_SIZE=64 -CONFIG_TCPIP_ZC_MDNS_MAX_RR_NAME_SIZE=256 -CONFIG_TCPIP_ZC_MDNS_MAX_SRV_TYPE_SIZE=32 -CONFIG_TCPIP_ZC_MDNS_MAX_SRV_NAME_SIZE=64 -CONFIG_TCPIP_ZC_MDNS_MAX_TXT_DATA_SIZE=128 -CONFIG_TCPIP_ZC_MDNS_RESOURCE_RECORD_TTL_VAL=3600 -CONFIG_TCPIP_ZC_MDNS_MAX_RR_NUM=4 -CONFIG_TCPIP_ZC_MDNS_PROBE_WAIT=750 -CONFIG_TCPIP_ZC_MDNS_PROBE_INTERVAL=250 -CONFIG_TCPIP_ZC_MDNS_PROBE_NUM=3 -CONFIG_TCPIP_ZC_MDNS_MAX_PROBE_CONFLICT_NUM=30 -CONFIG_TCPIP_ZC_MDNS_ANNOUNCE_NUM=3 -CONFIG_TCPIP_ZC_MDNS_ANNOUNCE_INTERVAL=250 -CONFIG_TCPIP_ZC_MDNS_ANNOUNCE_WAIT=250 -# -# from tcpip_announce.hconfig -# -CONFIG_TCPIP_USE_ANNOUNCE=y -CONFIG_TCPIP_ANNOUNCE_MAX_PAYLOAD=512 -CONFIG_TCPIP_ANNOUNCE_TASK_RATE=333 -# -# from iperf.hconfig +# from $HARMONY_VERSION_PATH/framework/tcpip/config/zeroconf.hconfig +# +CONFIG_TCPIP_USE_LINK_ZERO_CONFIG=n +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/tcpip_announce.hconfig +# +CONFIG_TCPIP_USE_ANNOUNCE=n +# +# from $HARMONY_VERSION_PATH/framework/tcpip/config/iperf.hconfig # CONFIG_TCPIP_USE_IPERF=n # -# from tcpip_cmd.hconfig +# from $HARMONY_VERSION_PATH/framework/tcpip/config/tcpip_cmd.hconfig # CONFIG_TCPIP_STACK_USE_COMMANDS=n +CONFIG_TCPIP_STACK_COMMANDS_ICMP_ECHO_REQUEST_BUFF_SIZE=2000 +CONFIG_TCPIP_STACK_COMMANDS_ICMP_ECHO_REQUEST_DATA_SIZE=100 # -# from tftpc.hconfig +# from $HARMONY_VERSION_PATH/framework/tcpip/config/tftpc.hconfig # CONFIG_TCPIP_USE_TFTPC_MODULE=n # -# from sys_fs_wrapper.hconfig -# -CONFIG_TCPIP_SYS_FS_MAX_PATH=80 -CONFIG_TCPIP_LOCAL_WEBSITE_PATH="/mnt/mchpSite1" -CONFIG_TCPIP_SYS_FS_DRIVE="FLASH" -CONFIG_TCPIP_SYS_FS_NVM_VOL="/dev/nvma1" -CONFIG_TCPIP_SYS_FS_SD_VOL="/dev/mmcblka1" -# -# from usb.hconfig +# from $HARMONY_VERSION_PATH/framework/usb/config/usb.hconfig # CONFIG_USE_USB_STACK=y CONFIG_USB_RTOS="Combined with System Tasks" @@ -975,8 +936,8 @@ CONFIG_USB_DEVICE_FUNCTION_1_DEVICE_CLASS_IDX0="CDC" CONFIG_USB_DEVICE_FUNCTION_1_CONFIGURATION_IDX0=1 CONFIG_USB_DEVICE_FUNCTION_1_INTERFACE_NUMBER_IDX0=0 CONFIG_USB_DEVICE_FUNCTION_1_SPEED_HS_IDX0="USB_SPEED_HIGH|USB_SPEED_FULL" -CONFIG_USB_DEVICE_FUNCTION_1_CDC_READ_Q_SIZE_IDX0=1 -CONFIG_USB_DEVICE_FUNCTION_1_CDC_WRITE_Q_SIZE_IDX0=128 +CONFIG_USB_DEVICE_FUNCTION_1_CDC_READ_Q_SIZE_IDX0=512 +CONFIG_USB_DEVICE_FUNCTION_1_CDC_WRITE_Q_SIZE_IDX0=512 CONFIG_USB_DEVICE_FUNCTION_1_CDC_SERIAL_NOTIFIACATION_Q_SIZE_IDX0=1 CONFIG_USB_DEVICE_FUNCTION_1_CDC_INT_ENDPOINT_NUMBER_IDX0=1 CONFIG_USB_DEVICE_FUNCTION_1_CDC_BULK_ENDPOINT_NUMBER_IDX0=2 @@ -987,33 +948,33 @@ CONFIG_USB_DEVICE_PRODUCT_ID_SELECT_IDX0="cdc_com_port_single_demo" CONFIG_USB_DEVICE_VENDOR_ID_IDX0="0x04D8" CONFIG_USB_DEVICE_PRODUCT_ID_IDX0="0x000A" CONFIG_USB_DEVICE_MANUFACTURER_STRING_IDX0="Microchip Technology Inc." -CONFIG_USB_DEVICE_PRODUCT_STRING_DESCRIPTOR_IDX0="Simple CDC Device Demo" +CONFIG_USB_DEVICE_PRODUCT_STRING_DESCRIPTOR_IDX0="IoT Ethernet" CONFIG_USB_DEVICE_SUSPEND_IN_SLEEP_IDX0=n -CONFIG_DRV_USB_INTERRUPT_PRIORITY_IDX0="INT_PRIORITY_LEVEL4" +CONFIG_DRV_USB_INTERRUPT_PRIORITY_IDX0="INT_PRIORITY_LEVEL1" CONFIG_DRV_USB_INTERRUPT_SUB_PRIORITY_IDX0="INT_SUBPRIORITY_LEVEL0" -CONFIG_DRV_USBDMA_INTERRUPT_PRIORITY_IDX0="INT_PRIORITY_LEVEL4" +CONFIG_DRV_USBDMA_INTERRUPT_PRIORITY_IDX0="INT_PRIORITY_LEVEL1" CONFIG_DRV_USBDMA_INTERRUPT_SUB_PRIORITY_IDX0="INT_SUBPRIORITY_LEVEL0" CONFIG_USB_DEVICE_POWER_STATE_IDX0="SYS_MODULE_POWER_RUN_FULL" # -# from usb.hconfig +# from $HARMONY_VERSION_PATH/framework/usb/config/usb.hconfig # -CONFIG_USB_DEVICE_SOF_EVENT_ENABLE=n +CONFIG_USB_DEVICE_SOF_EVENT_ENABLE=y CONFIG_USB_DEVICE_SET_DESCRIPTOR_EVENT_ENABLE=n CONFIG_USB_DEVICE_SYNCH_FRAME_EVENT_ENABLE=n CONFIG_USB_DEVICE_REMOTE_WAKEUP=n CONFIG_USB_DEVICE_BOS_DESCRIPTOR_SUPPORT=n CONFIG_USB_DEVICE_STRING_DESCRIPTOR_TABLE_ADVANCED=n # -# from bsp.hconfig +# from $HARMONY_VERSION_PATH/bsp/config/bsp.hconfig # CONFIG_USE_BSP=n # -# from rtos.hconfig +# from $HARMONY_VERSION_PATH/third_party/rtos/config/rtos.hconfig # CONFIG_USE_3RDPARTY_RTOS=y -CONFIG_3RDPARTY_RTOS_USED="FreeRTOS_V8.x.x" +CONFIG_3RDPARTY_RTOS_USED="FreeRTOS" # -# from freertos_menu.hconfig +# from $HARMONY_VERSION_PATH/third_party/rtos/FreeRTOS/config/freertos_menu.hconfig # CONFIG_FREERTOS_PREEMPTIVE_SCHEDULER=y CONFIG_FREERTOS_COOPERATIVE_SCHEDULER=n @@ -1028,6 +989,8 @@ CONFIG_FREERTOS_TICK_RATE_HZ=1000 CONFIG_FREERTOS_MAX_PRIORITIES=5 CONFIG_FREERTOS_MINIMAL_STACK_SIZE=512 CONFIG_FREERTOS_ISR_STACK_SIZE=1024 +CONFIG_FREERTOS_DYNAMIC_ALLOC=y +CONFIG_FREERTOS_STATIC_ALLOC=n CONFIG_FREERTOS_HEAP_1=n CONFIG_FREERTOS_HEAP_2=y CONFIG_FREERTOS_HEAP_3=n @@ -1065,7 +1028,6 @@ CONFIG_FREERTOS_MAX_SYSCALL_INTERRUPT_PRIORITY=3 CONFIG_FREERTOS_INCLUDE_VTASKPRIORITYSET=y CONFIG_FREERTOS_INCLUDE_UXTASKPRIORITYGET=y CONFIG_FREERTOS_INCLUDE_VTASKDELETE=y -CONFIG_FREERTOS_INCLUDE_VTASKCLEANUPRESOURCES=n CONFIG_FREERTOS_INCLUDE_VTASKSUSPEND=y CONFIG_FREERTOS_INCLUDE_VTASKDELAYUNTIL=y CONFIG_FREERTOS_INCLUDE_VTASKDELAY=y @@ -1073,15 +1035,13 @@ CONFIG_FREERTOS_INCLUDE_UXTASKGETSTACKHIGHWATERMARK=n CONFIG_FREERTOS_INCLUDE_XTASKGETSCHEDULERSTATE=n CONFIG_FREERTOS_INCLUDE_XTASKGETCURRENTTASKHANDLE=n CONFIG_FREERTOS_INCLUDE_XTASKGETIDLETASKHANDLE=n -CONFIG_FREERTOS_INCLUDE_XTASKGETTIMERDAEMONTASKHANDLE=n -CONFIG_FREERTOS_INCLUDE_XQUEUEGETMUTEXHOLDER=n -CONFIG_FREERTOS_INCLUDE_XSEMAPHOREGETMUTEXHOLDER=n -CONFIG_FREERTOS_INCLUDE_PCTASKGETTASKNAME=n CONFIG_FREERTOS_INCLUDE_ETASKGETSTATE=n CONFIG_FREERTOS_INCLUDE_XEVENTGROUPSETBITFROMISR=n CONFIG_FREERTOS_INCLUDE_XTIMERPENDFUNCTIONCALL=n +CONFIG_FREERTOS_INCLUDE_XTASKABORTDELAY=n +CONFIG_FREERTOS_INCLUDE_XTASKGETHANDLE=n # -# from wolfssl.hconfig +# from $HARMONY_VERSION_PATH/third_party/tcpip/config/wolfssl.hconfig # CONFIG_USE_3RDPARTY_WOLFSSL=y CONFIG_WOLFSSL_MULTI_THREAD_SUPPORT=n @@ -1123,27 +1083,27 @@ CONFIG_WOLFSSL_DEBUG_SUPPORT=n CONFIG_WOLFSSL_OPENSSL_EXTRA=n CONFIG_WOLFSSL_OLD_TLS_SUPPORT=y # -# from embtcp.hconfig +# from $HARMONY_VERSION_PATH/third_party/tcpip/iniche/config/embtcp.hconfig # CONFIG_IN_EMB_TCPIP_USE_TCP=n # -# from embdual.hconfig +# from $HARMONY_VERSION_PATH/third_party/tcpip/iniche/config/embdual.hconfig # CONFIG_IN_EMB_DUAL_USE_TCP=n # -# from stack.hconfig +# from $HARMONY_VERSION_PATH/third_party/tcpip/iniche/config/stack.hconfig # CONFIG_IN_TCPIP=n # -# from gfxtp.hconfig +# from $HARMONY_VERSION_PATH/third_party/gfx/config/gfxtp.hconfig # CONFIG_3RDPARTY_SEGGER_EMWIN_LIBRARY=n # -# from harmony.hconfig +# from $HARMONY_VERSION_PATH/config/harmony.hconfig # CONFIG_DEVICE_CONFIGURATION=y # -# from PIC32MZ2048EFM064.hconfig +# from $HARMONY_VERSION_PATH/utilities/mhc/config/PIC32MZ2048EFM064.hconfig # CONFIG_USERID=0xffff CONFIG_FMIIEN="OFF" @@ -1151,7 +1111,7 @@ CONFIG_FETHIO="ON" CONFIG_PGL1WAY="ON" CONFIG_PMDL1WAY="ON" CONFIG_IOL1WAY="ON" -CONFIG_FUSBIDIO="ON" +CONFIG_FUSBIDIO="OFF" CONFIG_FPLLIDIV="DIV_3" CONFIG_FPLLRNG="RANGE_8_16_MHZ" CONFIG_FPLLICLK="PLL_POSC" @@ -1191,15 +1151,15 @@ CONFIG_CP="OFF" CONFIG_TSEQ=0x0000 CONFIG_CSEQ=0xffff # -# from harmony.hconfig +# from $HARMONY_VERSION_PATH/config/harmony.hconfig # CONFIG_PROJECT_STANDALONE=n # -# from project.hconfig +# from $HARMONY_VERSION_PATH/utilities/mhc/config/project.hconfig # CONFIG_XC32_HEAP="262144" # -# from isa.hconfig +# from $HARMONY_VERSION_PATH/utilities/mhc/config/isa.hconfig # CONFIG_ISA_MIPS32_MODE=y CONFIG_ISA_MICROMIPS_MODE=n diff --git a/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/FreeRTOSConfig.h b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/FreeRTOSConfig.h new file mode 100644 index 0000000..5139e5f --- /dev/null +++ b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/FreeRTOSConfig.h @@ -0,0 +1,162 @@ +/* + FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd. + All rights reserved + + VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. + + *************************************************************************** + * * + * FreeRTOS provides completely free yet professionally developed, * + * robust, strictly quality controlled, supported, and cross * + * platform software that has become a de facto standard. * + * * + * Help yourself get started quickly and support the FreeRTOS * + * project by purchasing a FreeRTOS tutorial book, reference * + * manual, or both from: http://www.FreeRTOS.org/Documentation * + * * + * Thank you! * + * * + *************************************************************************** + + This file is part of the FreeRTOS distribution. + + FreeRTOS is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License (version 2) as published by the + Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. + + >>! NOTE: The modification to the GPL is included to allow you to !<< + >>! distribute a combined work that includes FreeRTOS without being !<< + >>! obliged to provide the source code for proprietary components !<< + >>! outside of the FreeRTOS kernel. !<< + + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. Full license text is available from the following + link: http://www.freertos.org/a00114.html + + 1 tab == 4 spaces! + + *************************************************************************** + * * + * Having a problem? Start by reading the FAQ "My application does * + * not run, what could be wrong?" * + * * + * http://www.FreeRTOS.org/FAQHelp.html * + * * + *************************************************************************** + + http://www.FreeRTOS.org - Documentation, books, training, latest versions, + license and Real Time Engineers Ltd. contact details. + + http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, + including FreeRTOS+Trace - an indispensable productivity tool, a DOS + compatible FAT file system, and our tiny thread aware UDP/IP stack. + + http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High + Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS + licenses offer ticketed support, indemnification and middleware. + + http://www.SafeRTOS.com - High Integrity Systems also provide a safety + engineered and independently SIL3 certified version for use in safety and + mission critical applications that require provable dependability. + + 1 tab == 4 spaces! +*/ + +#ifndef FREERTOS_CONFIG_H +#define FREERTOS_CONFIG_H + +#include + +/*----------------------------------------------------------- + * Application specific definitions. + * + * These definitions should be adjusted for your particular hardware and + * application requirements. + * + * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE + * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE. + * + * See http://www.freertos.org/a00110.html. + *----------------------------------------------------------*/ + + +#define configUSE_PREEMPTION 1 +#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1 +#define configUSE_TICKLESS_IDLE 0 +#define configCPU_CLOCK_HZ ( 200000000UL ) +#define configPERIPHERAL_CLOCK_HZ ( 100000000UL ) +#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) +#define configMAX_PRIORITIES ( 5UL ) +#define configMINIMAL_STACK_SIZE ( 512 ) +#define configISR_STACK_SIZE ( 1024 ) +#define configSUPPORT_DYNAMIC_ALLOCATION 1 +#define configSUPPORT_STATIC_ALLOCATION 0 +#define configTOTAL_HEAP_SIZE ( ( size_t ) 131072 ) +#define configMAX_TASK_NAME_LEN ( 16 ) +#define configUSE_16_BIT_TICKS 0 +#define configIDLE_SHOULD_YIELD 1 +#define configUSE_MUTEXES 1 +#define configUSE_RECURSIVE_MUTEXES 0 +#define configUSE_COUNTING_SEMAPHORES 1 +#define configUSE_TASK_NOTIFICATIONS 1 +#define configQUEUE_REGISTRY_SIZE 0 +#define configUSE_QUEUE_SETS 0 +#define configUSE_TIME_SLICING 0 +#define configUSE_NEWLIB_REENTRANT 0 +#define configENABLE_BACKWARD_COMPATIBILITY 0 +#define configUSE_TASK_FPU_SUPPORT 0 + +/* Hook function related definitions. */ +#define configUSE_IDLE_HOOK 0 +#define configUSE_TICK_HOOK 0 +#define configCHECK_FOR_STACK_OVERFLOW 2 +#define configUSE_MALLOC_FAILED_HOOK 1 + +/* Run time and task stats gathering related definitions. */ +#define configGENERATE_RUN_TIME_STATS 0 +#define configUSE_TRACE_FACILITY 0 +#define configUSE_STATS_FORMATTING_FUNCTIONS 0 + +/* Co-routine related definitions. */ +#define configUSE_CO_ROUTINES 0 +#define configMAX_CO_ROUTINE_PRIORITIES 2 + +/* Software timer related definitions. */ +#define configUSE_TIMERS 0 +#define configTIMER_TASK_PRIORITY +#define configTIMER_QUEUE_LENGTH +#define configTIMER_TASK_STACK_DEPTH +#define configUSE_DAEMON_TASK_STARTUP_HOOK 0 + +/* Misc */ +#define configUSE_APPLICATION_TASK_TAG 0 + + +/* Interrupt nesting behaviour configuration. */ + +/* The priority at which the tick interrupt runs. This should probably be kept at 1. */ +#define configKERNEL_INTERRUPT_PRIORITY 1 + +/* The maximum interrupt priority from which FreeRTOS.org API functions can be called. +Only API functions that end in ...FromISR() can be used within interrupts. */ +#define configMAX_SYSCALL_INTERRUPT_PRIORITY 3 + +/* Optional functions - most linkers will remove unused functions anyway. */ +#define INCLUDE_vTaskPrioritySet 1 +#define INCLUDE_uxTaskPriorityGet 1 +#define INCLUDE_vTaskDelete 1 +#define INCLUDE_vTaskSuspend 1 +#define INCLUDE_vTaskDelayUntil 1 +#define INCLUDE_vTaskDelay 1 +#define INCLUDE_xTaskGetSchedulerState 0 +#define INCLUDE_xTaskGetCurrentTaskHandle 0 +#define INCLUDE_uxTaskGetStackHighWaterMark 0 +#define INCLUDE_xTaskGetIdleTaskHandle 0 +#define INCLUDE_eTaskGetState 0 +#define INCLUDE_xEventGroupSetBitFromISR 0 +#define INCLUDE_xTimerPendFunctionCall 0 +#define INCLUDE_xTaskAbortDelay 0 +#define INCLUDE_xTaskGetHandle 0 + +#endif /* FREERTOS_CONFIG_H */ diff --git a/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/bsp_config.h b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/bsp_config.h new file mode 100755 index 0000000..01ff3dc --- /dev/null +++ b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/bsp_config.h @@ -0,0 +1,612 @@ +/******************************************************************************* + Board Support Package Header File. + + Company: + Microchip Technology Inc. + + File Name: + bsp_config.h + + Summary: + Board Support Package Header file for IoT Ethernet + + Description: + This file contains constants, macros, type defintions and function + declarations required by the IoT Ethernet + +*******************************************************************************/ + +// DOM-IGNORE-BEGIN +/******************************************************************************* +Copyright (c) 2013 released Microchip Technology Inc. All rights reserved. + +Microchip licenses to you the right to use, modify, copy and distribute +Software only when embedded on a Microchip microcontroller or digital signal +controller that is integrated into your product or third party product +(pursuant to the sublicense terms in the accompanying license agreement). + +You should refer to the license agreement accompanying this Software for +additional information regarding your rights and obligations. + +SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF +MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. +IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER +CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR +OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES +INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR +CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF +SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES +(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS. +*******************************************************************************/ +// DOM-IGNORE-END + +#ifndef _BSP_CONFIG_H +#define _BSP_CONFIG_H + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** + +#include +#include +#include +#include +#include +#include "peripheral/ports/plib_ports.h" + +// ***************************************************************************** +// ***************************************************************************** +// Section: Constants and Type Definitions. +// ***************************************************************************** +// ***************************************************************************** + +// ***************************************************************************** +/* Oscillator Frequency + + Summary: + Defines frequency value of crystal/oscillator used on the board + + Description: + Defines frequency value of crystal/oscillator used on the board +*/ + +#define BSP_OSC_FREQUENCY 24000000 + + +#define BSP_POTENTIOMETER PORTS_BIT_POS_3 + +typedef enum +{ + BSP_LED_EASY_CONFIGURATION, + BSP_LED_CONNECTING_TO_AP, + BSP_LED_CONNECTION_FAILED, + BSP_LED_SERVER_CONNECT_FAILED, + BSP_LED_AP_CONNECTED, + BSP_LED_ALL_GOOD, + BSP_LED_TX, + BSP_LED_RX, + BSP_LED_DNS_FAILED, + BSP_LED_TCPIP_STACK_INIT_FAILURE, + BSP_LED_NVM_FAILED_MOUNT, + BSP_LED_INTIAL_CONNECT, + BSP_LED_ALL_OFF +} BSP_LED_LIGHT_SHOW; + +// ********************** ******************************************************* +/* BSP Switch. + + Summary: + Defines the switches available on this board. + + Description: + This enumeration defines the switches available on this board. + + Remarks: + None. +*/ + +typedef enum +{ + + /* SWITCH 1 */ + BSP_SWITCH_1_PORT = /*DOM-IGNORE-BEGIN*/PORTS_BIT_POS_10/*DOM-IGNORE-END*/, + + /* SWITCH 2 */ + BSP_SWITCH_2_PORT = /*DOM-IGNORE-BEGIN*/PORTS_BIT_POS_8/*DOM-IGNORE-END*/, + + /* SWITCH 3 */ + BSP_SWITCH_3_PORT = /*DOM-IGNORE-BEGIN*/PORTS_BIT_POS_0/*DOM-IGNORE-END*/, + + /* SWITCH 4 */ + BSP_SWITCH_4_PORT = /*DOM-IGNORE-BEGIN*/PORTS_BIT_POS_5/*DOM-IGNORE-END*/, + +} BSP_SWITCH_PORT; + +typedef enum +{ + + /* SWITCH 1 */ + BSP_SWITCH_1_CHANNEL = /*DOM-IGNORE-BEGIN*/PORT_CHANNEL_B/*DOM-IGNORE-END*/, + + /* SWITCH 2 */ + BSP_SWITCH_2_CHANNEL = /*DOM-IGNORE-BEGIN*/PORT_CHANNEL_B/*DOM-IGNORE-END*/, + + /* SWITCH 3 */ + BSP_SWITCH_3_CHANNEL = /*DOM-IGNORE-BEGIN*/PORT_CHANNEL_F/*DOM-IGNORE-END*/, + + /* SWITCH 4 */ + BSP_SWITCH_4_CHANNEL = /*DOM-IGNORE-BEGIN*/PORT_CHANNEL_D/*DOM-IGNORE-END*/, + +} BSP_SWITCH_CHANNEL; + +typedef enum +{ + + BSP_SWITCH_1 = 1, + BSP_SWITCH_2 = 2, + BSP_SWITCH_3 = 3, + BSP_SWITCH_4 = 4, + +} BSP_SWITCH_ENUM; + +// ***************************************************************************** +/* BSP Switch state. + + Summary: + Defines possible states of the switches on this board. + + Description: + This enumeration defines the possible states of the switches on this board. + + Remarks: + None. +*/ + +typedef enum +{ + /* Switch pressed */ + BSP_SWITCH_STATE_ASSERTED = /*DOM-IGNORE-BEGIN*/0/*DOM-IGNORE-END*/, + + /* Switch not pressed */ + BSP_SWITCH_STATE_DEASSERTED = /*DOM-IGNORE-BEGIN*/1/*DOM-IGNORE-END*/ + +} BSP_SWITCH_STATE; + +#define BSP_SWITCH_BUSY -1 + +//DGC_FINISH Comment these +typedef struct +{ + int32_t prevValue; + int32_t timerActive; + int32_t duration; // In milliseconds + uint32_t startTick; + uint32_t endTick; + +}BSP_SWITCH_DEBOUNCE_T; + +#define BSP_MAX_SWITCHES 4 +#define BSP_SWITCH_DEBOUNCE_TIME 60 + +typedef struct +{ + BSP_LED_LIGHT_SHOW light_show; + BSP_SWITCH_STATE s1, s2, s3, s4; + BSP_SWITCH_STATE previousStateS1; + BSP_SWITCH_STATE previousStateS2; + BSP_SWITCH_STATE previousStateS3; + BSP_SWITCH_STATE previousStateS4; + BSP_SWITCH_DEBOUNCE_T switches[BSP_MAX_SWITCHES]; +} BSP_DATA; + +// ***************************************************************************** +/* LED Number. + + Summary: + Defines the LEDs available on this board. + + Description: + This enumeration defines the LEDs available on this board. + + Remarks: + None. +*/ + +typedef enum +{ + /* LED 1 */ + BSP_LED_1_PORT = PORTS_BIT_POS_13, + + /* LED 2 */ + BSP_LED_2_PORT = PORTS_BIT_POS_12, + + /* LED 3 */ + BSP_LED_3_PORT = PORTS_BIT_POS_11, + + /* LED 4 */ + BSP_LED_4_PORT = PORTS_BIT_POS_15, + + /* LED 5 */ + BSP_LED_5_PORT = PORTS_BIT_POS_6, + + /* LED 6 */ + BSP_LED_6_PORT = PORTS_BIT_POS_3, + + /* LED 7 */ + BSP_LED_7_PORT = PORTS_BIT_POS_9, + +} BSP_LED_PORT; + +typedef enum +{ + /* LED 1 */ + BSP_LED_1_CHANNEL = PORT_CHANNEL_B, + + /* LED 2 */ + BSP_LED_2_CHANNEL = PORT_CHANNEL_B, + + /* LED 3 */ + BSP_LED_3_CHANNEL = PORT_CHANNEL_B, + + /* LED 4 */ + BSP_LED_4_CHANNEL = PORT_CHANNEL_C, + + /* LED 5 */ + BSP_LED_5_CHANNEL = PORT_CHANNEL_B, + + /* LED 6 */ + BSP_LED_6_CHANNEL = PORT_CHANNEL_F, + + /* LED 7 */ + BSP_LED_7_CHANNEL = PORT_CHANNEL_B, + +} BSP_LED_CHANNEL; + +// ***************************************************************************** +/* LED State + + Summary: + Enumerates the supported LED states. + + Description: + This enumeration defines the supported LED states. + + Remarks: + None. +*/ + +typedef enum +{ + /* LED State is on */ + BSP_LED_STATE_OFF = 0, + /* LED State is off */ + BSP_LED_STATE_ON = 1, +} BSP_LED_STATE; + +// ***************************************************************************** +// ***************************************************************************** +// ***************************************************************************** +// Section: Interface Routines +// ***************************************************************************** +// ***************************************************************************** + +// ***************************************************************************** +/* Function: + void BSP_Initialize(void) + + Summary: + Performs the necessary actions to initialize a board + + Description: + This function initializes the LED and Switch ports on the board. This + function must be called by the user before using any APIs present on this + BSP. + + Precondition: + None. + + Parameters: + None + + Returns: + None. + + Example: + + //Initialize the BSP + BSP_Initialize(); + + + Remarks: + None +*/ + +void BSP_Initialize(void); + +// ***************************************************************************** +/* Function: + void BSP_LEDStateSet(BSP_LED led, BSP_LED_STATE state); + + Summary: + Controls the state of the LED. + + Description: + This function allows the application to specify the state of the LED. + + Precondition: + BSP_Initialize() should have been called. + + Parameters: + led - The LED to operate on. + state - The state to be set. + + Returns: + None. + + Example: + + + // Initialize the BSP + BSP_Initialize(); + + // Switch on LED3 on the board + BSP_LEDStateSet(BSP_LED_3, BSP_LED_STATE_ON); + + // Switch off LED4 on the board + BSP_LEDStateSet(BSP_LED_4, BSP_LED_STATE_OFF); + + + + Remarks: + None +*/ + +void BSP_LEDStateSet(BSP_LED_PORT led_port, BSP_LED_CHANNEL led_channel, BSP_LED_STATE led_state); + +// ***************************************************************************** +/* Function: + BSP_LED_STATE BSP_LEDStateGet(BSP_LED led); + + Summary: + Returns the present state of the LED. + + Description: + This function returns the present state of the LED. + + Precondition: + BSP_Initialize() should have been called. + + Parameters: + led - The LED to whose status needs to be obtained. + + Returns: + The ON/OFF state of the LED. + + Example: + + + // Initialize the BSP + BSP_Initialize(); + + // Check if LED3 is off + if(BSP_LED_STATE_OFF == BSP_LEDStateGet(BSP_LED_3) + { + // Switch on the LED. + BSP_LEDStateSet(BSP_LED_3, BSP_LED_STATE_ON); + } + + + + Remarks: + None +*/ + +BSP_LED_STATE BSP_LEDStateGet(BSP_LED_CHANNEL led_channel, BSP_LED_PORT led_port); + +// ***************************************************************************** +/* Function: + void BSP_LEDToggle(BSP_LED led); + + Summary: + Toggles the state of the LED between BSP_LED_STATE_ON and BSP_LED_STATE_OFF. + + Description: + This function toggles the state of the LED between BSP_LED_STATE_ON and + BSP_LED_STATE_OFF. + + Precondition: + BSP_Initialize() should have been called. + + Parameters: + led - The LED to toggle. + + Returns: + None. + + Example: + + + // Initialize the BSP + BSP_Initialize(); + + // Switch on LED3 on the board + BSP_LEDStateSet(BSP_LED_3, BSP_LED_STATE_ON); + + // Switch off LED4 on the board + BSP_LEDStateSet(BSP_LED_4, BSP_LED_STATE_OFF); + + // Toggle state of LED3 + BSP_LEDToggle(BSP_LED_3); + + + Remarks: + None +*/ + +void BSP_LEDToggle(BSP_LED_CHANNEL led_channel, BSP_LED_PORT led_port); + +// ***************************************************************************** +/* Function: + void BSP_LEDOn(BSP_LED led); + + Summary: + Switches ON the specified LED. + + Description: + This function switches ON the specified LED. + + Precondition: + BSP_Initialize() should have been called. + + Parameters: + led - The LED to switch on. + + Returns: + None. + + Example: + + + // Initialize the BSP + BSP_Initialize(); + + // Switch on LED D3 on the board + BSP_LEDOn(BSP_LED_3); + + + + Remarks: + None +*/ + +void BSP_LEDOn(BSP_LED_CHANNEL led_channel, BSP_LED_PORT led_port); + +// ***************************************************************************** +/* Function: + void BSP_LEDOff(BSP_LED led); + + Summary: + Switches OFF the specified LED. + + Description: + This function switches OFF the specified LED. + + Precondition: + BSP_Initialize() should have been called. + + Parameters: + led - The LED to switch off. + + Returns: + None. + + Example: + + + // Initialize the BSP + BSP_Initialize(); + + // Switch off LED D3 on the board + BSP_LEDOff(BSP_LED_3); + + + + Remarks: + None +*/ + +void BSP_LEDOff(BSP_LED_CHANNEL led_channel, BSP_LED_PORT led_port); + +// ***************************************************************************** +/* Function: + void BSP_LEDAllOff(); + + Summary: + Switches OFF all LEDs. + + Description: + This function switches OFF all LEDs. + + Precondition: + BSP_Initialize() should have been called. + + Parameters: + None. + + Returns: + None. + + Example: + + + // Initialize the BSP + BSP_Initialize(); + + // Switch off all LEDs + BSP_LEDAllOff(); + + + + Remarks: + None +*/ + +void BSP_LEDAllOff(); + +// ***************************************************************************** +/* Function: + BSP_SWITCH_STATE BSP_SwitchStateGet(BSP_SWITCH switch); + + Summary: + Returns the present state (pressed or not pressed) of the specified switch. + + Description: + This function returns the present state (pressed or not pressed) of the + specified switch. + + Precondition: + BSP_Initialize() should have been called. + + Parameters: + switch - The switch whose state needs to be obtained. + + Returns: + The pressed released state of the switch. + + Example: + + + // Initialize the BSP + BSP_Initialize(); + + // Check the state of the switch. + if(BSP_SWITCH_STATE_PRESSED == BSP_SwitchStateGet(BSP_SWITCH_3)) + { + // This means that Switch 3 on the board is pressed. + } + + + + Remarks: + None +*/ + +BSP_SWITCH_STATE BSP_SWITCH_StateGet(BSP_SWITCH_CHANNEL bspSwitchChannel, BSP_SWITCH_PORT bspSwitchPort); + +//DGC_FINISH Comment this function prototype +void BSP_LED_LightShow(BSP_LED_LIGHT_SHOW lightShow); +void BSP_LED_LightShowSet(BSP_LED_LIGHT_SHOW lightshow); +void BSP_SYS_Tasks (); +int32_t BSP_SWITCH_DeviceDebounce(BSP_SWITCH_DEBOUNCE_T *handle, uint32_t curVal); +BSP_SWITCH_STATE BSP_SWITCH_SwitchGetState(BSP_SWITCH_PORT switchId); +void BSP_SWITCH_Tasks(void); +void BSP_SWITCH_SwitchSetPreviousState(BSP_SWITCH_PORT switchId, BSP_SWITCH_STATE var); + +#endif //_BSP_CONFIG_H + +/******************************************************************************* + End of File +*/ diff --git a/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/config.h b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/config.h new file mode 100644 index 0000000..5a9c800 --- /dev/null +++ b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/config.h @@ -0,0 +1,78 @@ +/******************************************************************************* + Application Header + + File Name: + config.h + + Summary: + config file for CyaSSL to avoid custom build options + + Description: + config file for CyaSSL to avoid custom build options + *******************************************************************************/ + +//DOM-IGNORE-BEGIN +/******************************************************************************* +Copyright (c) 2011-2012 released Microchip Technology Inc. All rights reserved. + +Microchip licenses to you the right to use, modify, copy and distribute +Software only when embedded on a Microchip microcontroller or digital signal +controller that is integrated into your product or third party product +(pursuant to the sublicense terms in the accompanying license agreement). + +You should refer to the license agreement accompanying this Software for +additional information regarding your rights and obligations. + +SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF +MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. +IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER +CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR +OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES +INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR +CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF +SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES +(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS. + *******************************************************************************/ +//DOM-IGNORE-END + + +#ifndef CONFIG_H +#define CONFIG_H + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined(INLINE) +#undef INLINE +#define INLINE inline +#endif + +#define MICROCHIP_MPLAB_HARMONY +#define MICROCHIP_TCPIP +#define WOLFSSL_HAVE_MIN +#define WOLFSSL_HAVE_MAX + +#define MICROCHIP_PIC32_RNG +#define NEED_AES_TABLES +#define SIZEOF_LONG_LONG 8 +#define WOLFSSL_USER_IO +#define NO_WRITEV +#define NO_DEV_RANDOM +#define NO_FILESYSTEM +#define WOLFSSL_STATIC_RSA + + +#define SINGLE_THREADED + +#define USE_FAST_MATH +#define TFM_TIMING_RESISTANT + + + +#ifdef __cplusplus +} +#endif + +#endif /* CONFIG_H */ diff --git a/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/configuration.xml b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/configuration.xml new file mode 100644 index 0000000..575c358 --- /dev/null +++ b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/configuration.xml @@ -0,0 +1,2405 @@ + + + + + + + + + + + + + + + + tfm.h + Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + + + dhcp_private.h + Header Files/framework/tcpip/src + + + ecdsa.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + + ecc.c + Source Files/framework/crypto/src + + + helpers.h + Header Files/framework/tcpip/src/common + + + usb_device_local.h + Header Files/framework/usb/src + + + dsa.c + Source Files/third_party/wolfssl/wolfcrypt + + + evp.h + Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + + echoclient.h + Header Files/third_party/tcpip/wolfssl/examples/echoclient + + + list.h + Header Files/FreeRTOS + + + pwdbased.h + Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + + + pkcs7.c + Source Files/third_party/wolfssl/wolfcrypt + + + usb_device.c + Source Files/framework/usb/src/dynamic + + + mem_track.h + Header Files/third_party/tcpip/wolfssl/wolfssl + + + ipv6_manager.h + Header Files/framework/tcpip/src + + + blake2-impl.h + Header Files/third_party/wolfssl/wolfcrypt + + + conf.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + + sha512.c + Source Files/framework/crypto/src + + + tcp_private.h + Header Files/framework/tcpip/src + + + tls.h + Header Files/framework/tcpip + + + zero_conf_helper.h + Header Files/framework/tcpip/src + + + settings.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + drv_extphy_smsc8700.h + Header Files/framework/driver/ethphy/src/dynamic + + + system.h + Header Files/framework/system + + + unit.h + Header Files/third_party/tcpip/wolfssl/tests + + + oahash.c + Source Files/framework/tcpip/src + + + sys_fs_media_manager.h + Header Files/framework/system/fs + + + crl.h + Header Files/third_party/wolfssl + + + drv_nvm_variant_mapping.h + Header Files/framework/driver/nvm/src + + + peripheral_common_32bit.h + Header Files/framework/peripheral + + + dns_private.h + Header Files/framework/tcpip/src + + + version.h + Header Files/third_party/tcpip/wolfssl/cyassl + + + drv_tmr.h + Header Files/framework/driver/tmr + + + srp.h + Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + + + net_pres_certstore.h + Header Files/framework/net/pres + + + internal.h + Header Files/framework/crypto/src + + + compress.h + Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + + + stack.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + + sha.h + Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + + + des3.h + Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + + + hash.c + Source Files/framework/crypto/src + + + rand.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + + hc128.h + Header Files/framework/crypto/src + + + logging.c + Source Files/framework/crypto/src + + + asn.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + tcpip_reboot.h + Header Files/framework/tcpip + + + md4.h + Header Files/framework/crypto/src + + + ipv4_manager.h + Header Files/framework/tcpip/src + + + ui.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + + chacha.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + timers.c + Source Files/FreeRTOS + + + error-crypt.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + net_pres_local.h + Header Files/framework/net/pres/priv + + + arc4.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + heap_2.c + Source Files/FreeRTOS/portable/MemMang + + + ecdh.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + + rabbit.h + Header Files/third_party/wolfssl/wolfcrypt + + + tcpip_announce.h + Header Files/framework/tcpip + + + drv_tmr_mapping.h + Header Files/framework/driver/tmr + + + blake2-int.h + Header Files/third_party/wolfssl/wolfcrypt + + + md4.c + Source Files/third_party/wolfssl/wolfcrypt + + + dsa.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + + hmac.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + + net_pres_socketapiconversion.h + Header Files/framework/net/pres + + + lhash.h + Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + + fips_test.h + Header Files/third_party/wolfssl/wolfcrypt + + + tcpip_commands_manager.h + Header Files/framework/tcpip/src + + + driver.h + Header Files/framework/driver + + + peripheral_common.h + Header Files/framework/peripheral + + + sys_int_pic32.c + Source Files/framework/system/int/src + + + md2.h + Header Files/third_party/wolfssl/wolfcrypt + + + net_pres.h + Header Files/framework/net/pres + + + aes.h + Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + + + rsa.h + Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + + rsa.h + Header Files/framework/crypto/src + + + aes.h + Header Files/framework/crypto/src + + + usb_device.h + Header Files/framework/usb + + + aes_cbc.h + Header Files/framework/tcpip/src/crypto + + + sys_tmr_local.h + Header Files/framework/system/tmr/src + + + tcpip_mac_object.h + Header Files/framework/tcpip + + + md5.h + Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + + ocsp.h + Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + + asn1.h + Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + + lldp_private.h + Header Files/framework/tcpip/src + + + sys_fs.c + Source Files/framework/system/fs/src/dynamic + + + usb_cdc.h + Header Files/framework/usb + + + zero_conf_multicast_dns.h + Header Files/framework/tcpip + + + fe_low_mem.c + Source Files/third_party/wolfssl/wolfcrypt + + + blake2-impl.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + mpfs.h + Header Files/framework/system/fs + + + drv_nvm_local.h + Header Files/framework/driver/nvm/src + + + ocsp.c + Source Files/third_party/wolfssl + + + wc_encrypt.h + Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + + + port.c + Source Files/framework/crypto/src + + + sys_int.h + Header Files/framework/system/int + + + client.h + Header Files/third_party/tcpip/wolfssl/examples/client + + + ndp_manager.h + Header Files/framework/tcpip/src + + + error-crypt.h + Header Files/third_party/wolfssl/wolfcrypt + + + sha256.h + Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + + + ripemd.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + crypto.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + + tasks.c + Source Files/FreeRTOS + + + usb_common.h + Header Files/framework/usb + + + hmac.c + Source Files/framework/crypto/src + + + poly1305.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + rabbit.h + Header Files/framework/crypto/src + + + dh.h + Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + + drv_ethmac_lib.h + Header Files/framework/driver/ethmac/src/dynamic + + + bn.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + + osal_impl_none.h + Header Files/framework/osal/src + + + tftpc_manager.h + Header Files/framework/tcpip/src + + + ec.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + + dhcpv6.h + Header Files/framework/tcpip + + + misc.c + Source Files/framework/crypto/src + + + sys_devcon_cache_pic32mz.S + Source Files/framework/system/devcon/src + + + aes_ecb_pic32.h + Header Files/framework/tcpip/src/crypto + + + rsa.h + Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + + + md2.h + Header Files/framework/crypto/src + + + drv_extphy_smsc8720.h + Header Files/framework/driver/ethphy/src/dynamic + + + md4.h + Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + + md5.c + Source Files/framework/crypto/src + + + ripemd.h + Header Files/framework/crypto/src + + + camellia.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + sys_module.h + Header Files/framework/system/common + + + sys_devcon_pic32mz.c + Source Files/framework/system/devcon/src + + + sys_fs_media_manager_local.h + Header Files/framework/system/fs/src + + + nbns_manager.h + Header Files/framework/tcpip/src + + + dsa.h + Header Files/framework/crypto/src + + + tcpip.h + Header Files/framework/tcpip + + + ge_operations.h + Header Files/third_party/wolfssl/wolfcrypt + + + sys_queue.h + Header Files/framework/system/common + + + md2.c + Source Files/third_party/wolfssl/wolfcrypt + + + ripemd.h + Header Files/third_party/wolfssl/wolfcrypt + + + dhcps_private.h + Header Files/framework/tcpip/src + + + net_pres_socketapi.h + Header Files/framework/net/pres + + + hash.h + Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + + + ipv4_private.h + Header Files/framework/tcpip/src + + + sys_fs.h + Header Files/framework/system/fs + + + version.h + Header Files/third_party/tcpip/wolfssl/wolfssl + + + tcpip_commands.h + Header Files/framework/tcpip + + + zero_conf_link_local.h + Header Files/framework/tcpip + + + md4.h + Header Files/third_party/wolfssl/wolfcrypt + + + engine.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + + certs_test.h + Header Files/framework/crypto/src + + + sys_devcon_cache.h + Source Files/framework/system/devcon/src + + + tcpip_types.h + Header Files/framework/tcpip/src + + + berkeley_manager.h + Header Files/framework/tcpip/src + + + http_manager.h + Header Files/framework/tcpip/src + + + smtp.h + Header Files/framework/tcpip + + + sha.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + md4.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + + ndp.h + Header Files/framework/tcpip + + + net_pres.c + Source Files/framework/net/pres + + + wc_port.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + port.h + Header Files/framework/crypto/src + + + camellia.c + Source Files/third_party/wolfssl/wolfcrypt + + + smtpc_manager.h + Header Files/framework/tcpip/src + + + blake2-int.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + sys_devcon.c + Source Files/framework/system/devcon/src + + + hash_fnv.c + Source Files/framework/tcpip/src + + + sha.h + Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + + error-ssl.h + Header Files/third_party/wolfssl + + + sys_tmr.h + Header Files/framework/system/tmr + + + ocsp.h + Header Files/third_party/tcpip/wolfssl/cyassl + + + rsa.c + Source Files/framework/crypto/src + + + server.h + Header Files/third_party/tcpip/wolfssl/examples/server + + + compress.h + Header Files/framework/crypto/src + + + udp.c + Source Files/framework/tcpip/src + + + ocsp.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + + tcpip_notify.c + Source Files/framework/tcpip/src + + + projdefs.h + Header Files/FreeRTOS + + + sha256.h + Header Files/framework/crypto/src + + + x509.h + Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + + poly1305.c + Source Files/third_party/wolfssl/wolfcrypt + + + lldp_manager.h + Header Files/framework/tcpip/src + + + http.h + Header Files/framework/tcpip + + + integer.h + Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + + + tcpip_manager_control.h + Header Files/framework/tcpip/src + + + osal_definitions.h + Header Files/framework/osal + + + dsa.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + tcpip_heap.h + Header Files/framework/tcpip + + + dsa.h + Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + + md5.h + Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + + + drv_nvm.c + Source Files/framework/driver/nvm/src/dynamic + + + aes_cfb.h + Header Files/framework/tcpip/src/crypto + + + port_asm.S + Source Files/FreeRTOS/portable/MPLAB/PIC32MZ + + + usb_device_cdc_acm.c + Source Files/framework/usb/src/dynamic + + + tfm.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + sys_devcon_local.h + Header Files/framework/system/devcon/src + + + hash_fnv.h + Header Files/framework/tcpip/src + + + drv_ethmac.h + Header Files/framework/driver/ethmac + + + usb_device_cdc.c + Source Files/framework/usb/src/dynamic + + + crypto.c + Source Files/framework/crypto/src + + + rsa.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + + blake2.h + Header Files/third_party/wolfssl/wolfcrypt + + + ossl_typ.h + Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + + sys_tmr.c + Source Files/framework/system/tmr/src + + + tcp_manager.h + Header Files/framework/tcpip/src + + + ec.h + Header Files/framework/crypto/src + + + test.h + Header Files/third_party/wolfssl + + + asn.c + Source Files/framework/crypto/src + + + drv_wifi.h + Header Files/framework/driver/wifi/mrf24w + + + des3.c + Source Files/framework/crypto/src + + + callbacks.h + Header Files/third_party/wolfssl + + + dhcp_manager.h + Header Files/framework/tcpip/src + + + crypto.h + Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + + sntp.h + Header Files/framework/tcpip + + + sha256.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + bio.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + + tcpip_announce_manager.h + Header Files/framework/tcpip/src + + + sys_clk.h + Header Files/framework/system/clk + + + dhcps.h + Header Files/framework/tcpip + + + types.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + dnss_private.h + Header Files/framework/tcpip/src + + + hmac.h + Header Files/framework/crypto/src + + + ssl.h + Header Files/framework/crypto/src + + + tcpip_heap_internal.c + Source Files/framework/tcpip/src + + + evp.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + + drv_tmr.c + Source Files/framework/driver/tmr/src/dynamic + + + drv_extphy_smsc8740.h + Header Files/framework/driver/ethphy/src/dynamic + + + mpfs_local.h + Header Files/framework/system/fs/mpfs/src + + + rand.h + Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + + zero_conf_manager.h + Header Files/framework/tcpip/src + + + opensslconf.h + Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + + port.c + Source Files/FreeRTOS/portable/MPLAB/PIC32MZ + + + sniffer.h + Header Files/third_party/tcpip/wolfssl/cyassl + + + ecc.h + Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + + + crl.c + Source Files/third_party/wolfssl + + + drv_tmr_variant_mapping.h + Header Files/framework/driver/tmr/src + + + sntp_manager.h + Header Files/framework/tcpip/src + + + coding.h + Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + + + drv_ethphy.h + Header Files/framework/driver/ethphy + + + wc_port.h + Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + + + mpi_superclass.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + x509v3.h + Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + + sys_ports.h + Header Files/framework/system/ports + + + dnss.h + Header Files/framework/tcpip + + + usb_device_mapping.h + Header Files/framework/usb/src + + + error-crypt.h + Header Files/framework/crypto/src + + + ecdh.h + Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + + asm.c + Source Files/third_party/wolfssl/wolfcrypt + + + visibility.h + Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + + + gfx_palette.h + Header Files/framework/gfx + + + rabbit.c + Source Files/third_party/wolfssl/wolfcrypt + + + dhcpv6_private.h + Header Files/framework/tcpip/src + + + ftp_manager.h + Header Files/framework/tcpip/src + + + md5.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + + sha.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + + oahash.h + Header Files/framework/tcpip/src + + + hc128.h + Header Files/third_party/wolfssl/wolfcrypt + + + ipv6_private.h + Header Files/framework/tcpip/src + + + sha256.c + Source Files/framework/crypto/src + + + sys_random.c + Source Files/framework/system/random/src + + + camellia.h + Header Files/framework/crypto/src + + + semphr.h + Header Files/FreeRTOS + + + tcpip_helper_c32.S + Source Files/framework/tcpip/src + + + bn.h + Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + + asn_public.h + Header Files/framework/crypto/src + + + snmpv3.h + Header Files/framework/tcpip + + + ge_low_mem.c + Source Files/third_party/wolfssl/wolfcrypt + + + echoserver.h + Header Files/third_party/tcpip/wolfssl/examples/echoserver + + + chacha.h + Header Files/third_party/wolfssl/wolfcrypt + + + err.h + Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + + dhcp.c + Source Files/framework/tcpip/src + + + tcpip_mac.h + Header Files/framework/tcpip + + + helpers.c + Source Files/framework/tcpip/src/common + + + signature.h + Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + + + tcpip_heap_alloc.c + Source Files/framework/tcpip/src + + + tftpc_private.h + Header Files/framework/tcpip/src + + + mpu_prototypes.h + Header Files/FreeRTOS + + + portmacro.h + Header Files/FreeRTOS/portable/MPLAB/PIC32MZ + + + sha512.h + Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + + + chacha20_poly1305.c + Source Files/third_party/wolfssl/wolfcrypt + + + random.h + Header Files/framework/crypto/src + + + curve25519.c + Source Files/third_party/wolfssl/wolfcrypt + + + tcpip_helpers_private.h + Header Files/framework/tcpip/src + + + tcpip_packet.c + Source Files/framework/tcpip/src + + + crl.h + Header Files/third_party/tcpip/wolfssl/cyassl + + + dh.h + Header Files/framework/crypto/src + + + arc4.h + Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + + + smtpc.h + Header Files/framework/tcpip + + + dnss_manager.h + Header Files/framework/tcpip/src + + + tcpip_manager.h + Header Files/framework/tcpip + + + tcpip_common_ports.h + Header Files/framework/tcpip + + + ndp_private.h + Header Files/framework/tcpip/src + + + snmp.h + Header Files/framework/tcpip + + + timers.h + Header Files/FreeRTOS + + + io.c + Source Files/third_party/wolfssl + + + ec.h + Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + + task.h + Header Files/FreeRTOS + + + dhcp.h + Header Files/framework/tcpip + + + ipv4.h + Header Files/framework/tcpip + + + snmpv3_private.h + Header Files/framework/tcpip/src + + + opensslconf.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + + osal_impl_basic.h + Header Files/framework/osal/src + + + udp_private.h + Header Files/framework/tcpip/src + + + list.c + Source Files/FreeRTOS + + + osal.h + Header Files/framework/osal + + + usb_device_cdc.h + Header Files/framework/usb + + + ec25519.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + + test.h + Header Files/third_party/tcpip/wolfssl/cyassl + + + dns_manager.h + Header Files/framework/tcpip/src + + + http_net_private.h + Header Files/framework/tcpip/src + + + ISR_Support.h + Header Files/FreeRTOS/portable/MPLAB/PIC32MZ + + + chacha.c + Source Files/third_party/wolfssl/wolfcrypt + + + mpi_class.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + portable.h + Header Files/FreeRTOS + + + dns.h + Header Files/framework/tcpip + + + md2.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + error.c + Source Files/framework/crypto/src + + + iperf_manager.h + Header Files/framework/tcpip/src + + + visibility.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + internal.h + Header Files/third_party/tcpip/wolfssl/wolfssl + + + sys_int_mapping.h + Header Files/framework/system/int + + + des3.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + logging.h + Header Files/framework/crypto/src + + + sys_devcon.h + Header Files/framework/system/devcon + + + internal.c + Source Files/third_party/wolfssl + + + nbns.h + Header Files/framework/tcpip + + + tcpip_packet.h + Header Files/framework/tcpip/src + + + sys_debug.h + Header Files/framework/system/debug + + + tls.c + Source Files/third_party/wolfssl + + + drv_extphy_regs.h + Header Files/framework/driver/ethphy/src/dynamic + + + icmpv6_manager.h + Header Files/framework/tcpip/src + + + misc.h + Header Files/framework/crypto/src + + + ipv4.c + Source Files/framework/tcpip/src + + + mpu_wrappers.h + Header Files/FreeRTOS + + + peripheral.h + Header Files/framework/peripheral + + + queue.c + Source Files/FreeRTOS + + + ecc.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + options.h + Header Files/third_party/tcpip/wolfssl/cyassl + + + tcp.c + Source Files/framework/tcpip/src + + + logging.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + arp.c + Source Files/framework/tcpip/src + + + md5.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + crypto.h + Header Files/framework/crypto + + + settings.h + Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + + + snmp_manager.h + Header Files/framework/tcpip/src + + + queue.h + Header Files/FreeRTOS + + + settings.h + Header Files/framework/crypto/src + + + mpi_superclass.h + Header Files/framework/crypto/src + + + certs_test.h + Header Files/third_party/wolfssl + + + chacha20_poly1305.h + Header Files/third_party/wolfssl/wolfcrypt + + + sys_fs_media_manager.c + Source Files/framework/system/fs/src/dynamic + + + tcp.h + Header Files/framework/tcpip + + + drv_ethphy_local.h + Header Files/framework/driver/ethphy/src + + + visibility.h + Header Files/framework/crypto/src + + + ssl.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + + dh.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + + tfm.c + Source Files/framework/crypto/src + + + arp.h + Header Files/framework/tcpip + + + aes_ofb.h + Header Files/framework/tcpip/src/crypto + + + coding.h + Header Files/framework/crypto/src + + + coding.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + aes.h + Header Files/framework/tcpip/src/crypto + + + arc4.c + Source Files/framework/crypto/src + + + types.h + Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + + + asn_public.h + Header Files/third_party/wolfssl/wolfcrypt + + + types.h + Header Files/framework/crypto/src + + + drv_tmr_compatibility.h + Header Files/framework/driver/tmr + + + tcpip_notify.h + Header Files/framework/tcpip/src + + + ti-ccm.h + Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/port/ti + + + rsa.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + pkcs12.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + + dhcps_manager.h + Header Files/framework/tcpip/src + + + usb_device_cdc_local.h + Header Files/framework/usb/src + + + blake2.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + icmpv6.h + Header Files/framework/tcpip + + + ipv6.h + Header Files/framework/tcpip + + + telnet.h + Header Files/framework/tcpip + + + certs_test.h + Header Files/third_party/tcpip/wolfssl/cyassl + + + osal_freertos.h + Header Files/framework/osal/src + + + drv_usb.h + Header Files/framework/driver/usb + + + pkcs7.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + smtp_manager.h + Header Files/framework/tcpip/src + + + pwdbased.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + stack.h + Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + + nbns.c + Source Files/framework/tcpip/src + + + blake2b.c + Source Files/third_party/wolfssl/wolfcrypt + + + ui.h + Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + + md4.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + berkeley_api.h + Header Files/framework/tcpip + + + ed25519.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + + link_list.h + Header Files/framework/tcpip/src + + + pem.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + + lldp_tlv.h + Header Files/framework/tcpip/src + + + tcpip_module_manager.h + Header Files/framework/tcpip/src + + + aes.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + osal_freertos.c + Source Files/framework/osal/src + + + drv_extphy_dp83848.h + Header Files/framework/driver/ethphy/src/dynamic + + + tcpip_manager.c + Source Files/framework/tcpip/src + + + sniffer_error.h + Header Files/third_party/wolfssl + + + camellia.h + Header Files/third_party/wolfssl/wolfcrypt + + + asn.h + Header Files/framework/crypto/src + + + tcpip_heap_alloc.h + Header Files/framework/tcpip/src + + + des3.h + Header Files/framework/crypto/src + + + arp_manager.h + Header Files/framework/tcpip/src + + + rabbit.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + hash.h + Header Files/framework/crypto/src + + + dsa.h + Header Files/third_party/wolfssl/wolfcrypt + + + sys_common.h + Header Files/framework/system/common + + + sys_buffer.h + Header Files/framework/system/common + + + udp.h + Header Files/framework/tcpip + + + compress.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + tcpip_helpers.h + Header Files/framework/tcpip + + + arp_private.h + Header Files/framework/tcpip/src + + + sys_clk_mapping.h + Header Files/framework/system/clk + + + ed25519.c + Source Files/third_party/wolfssl/wolfcrypt + + + pwdbased.h + Header Files/framework/crypto/src + + + drv_extphy_ip101gr.h + Header Files/framework/driver/ethphy/src/dynamic + + + poly1305.h + Header Files/third_party/wolfssl/wolfcrypt + + + ssl.h + Header Files/third_party/tcpip/wolfssl/cyassl + + + drv_nvm.h + Header Files/framework/driver/nvm + + + des.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + + sha.c + Source Files/framework/crypto/src + + + ripemd.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + + coding.c + Source Files/framework/crypto/src + + + opensslv.h + Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + + sha.h + Header Files/framework/crypto/src + + + lhash.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + + drv_tmr_local.h + Header Files/framework/driver/tmr/src + + + hmac.h + Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + + + hmac.h + Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + + aes.c + Source Files/framework/crypto/src + + + sys_fs_local.h + Header Files/framework/system/fs/src + + + dh.c + Source Files/third_party/wolfssl/wolfcrypt + + + drv_usbhs.h + Header Files/framework/driver/usb/usbhs + + + mpi_class.h + Header Files/third_party/wolfssl/wolfcrypt + + + opensslv.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + + mpfs.c + Source Files/framework/system/fs + + + bio.h + Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + + usb_chapter_9.h + Header Files/framework/usb + + + random.h + Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + + + icmp_manager.h + Header Files/framework/tcpip/src + + + fe_operations.h + Header Files/third_party/wolfssl/wolfcrypt + + + x509v3.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + + hmac.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + drv_extphy_dp83640.h + Header Files/framework/driver/ethphy/src/dynamic + + + icmp.h + Header Files/framework/tcpip + + + ed25519.h + Header Files/third_party/wolfssl/wolfcrypt + + + idea.h + Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + + + x509.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + + ec25519.h + Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + + snmp_private.h + Header Files/framework/tcpip/src + + + ripemd.h + Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + + asn.h + Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + + + udp_manager.h + Header Files/framework/tcpip/src + + + drv_ethphy.c + Source Files/framework/driver/ethphy + + + hc128.c + Source Files/third_party/wolfssl/wolfcrypt + + + net_pres_transportapi.h + Header Files/framework/net/pres + + + sys_random_local.h + Header Files/framework/system/random/src + + + ssl.c + Source Files/third_party/wolfssl + + + event_groups.h + Header Files/FreeRTOS + + + tcpip_helpers.c + Source Files/framework/tcpip/src + + + sys_random.h + Header Files/framework/system/random + + + sniffer_error.h + Header Files/third_party/tcpip/wolfssl/cyassl + + + settings_comp.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + ti-hash.h + Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/port/ti + + + asn1.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + + ddns.h + Header Files/framework/tcpip + + + drv_extphy_smsc8740.c + Source Files/framework/driver/ethphy + + + tcpip_private.h + Header Files/framework/tcpip/src + + + aes_ecb.h + Header Files/framework/tcpip/src/crypto + + + random.c + Source Files/framework/crypto/src + + + hc128.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + integer.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + memory.h + Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + + + lldp.h + Header Files/framework/tcpip + + + driver_common.h + Header Files/framework/driver + + + drv_extphy_smsc9303.h + Header Files/framework/driver/ethphy/src/dynamic + + + des.h + Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + + sniffer.c + Source Files/third_party/wolfssl + + + croutine.c + Source Files/FreeRTOS + + + ssl.h + Header Files/third_party/wolfssl + + + drv_usbhs.c + Source Files/framework/driver/usb/usbhs/src/dynamic + + + drv_ethmac.c + Source Files/framework/driver/ethmac + + + ddns_manager.h + Header Files/framework/tcpip/src + + + ftp.h + Header Files/framework/tcpip + + + memory.c + Source Files/framework/crypto/src + + + callbacks.h + Header Files/third_party/tcpip/wolfssl/cyassl + + + drv_ethmac_lib.c + Source Files/framework/driver/ethmac + + + ecdsa.h + Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + + http_net.h + Header Files/framework/tcpip + + + dh.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + ecc_fp.c + Source Files/third_party/wolfssl/wolfcrypt + + + conf.h + Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + + ecc.h + Header Files/framework/crypto/src + + + dh.h + Header Files/third_party/wolfssl/wolfcrypt + + + dns.c + Source Files/framework/tcpip/src + + + aes_ctr.h + Header Files/framework/tcpip/src/crypto + + + md5.h + Header Files/framework/crypto/src + + + sys_int_private.h + Header Files/framework/system/int/src + + + deprecated_definitions.h + Header Files/FreeRTOS + + + sntp.c + Source Files/framework/tcpip/src + + + err.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + + misc.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + iperf.h + Header Files/framework/tcpip + + + tcpip_ethernet.h + Header Files/framework/tcpip + + + net_pres_encryptionproviderapi.h + Header Files/framework/net/pres + + + mpi_superclass.h + Header Files/third_party/wolfssl/wolfcrypt + + + pkcs7.h + Header Files/third_party/wolfssl/wolfcrypt + + + error-ssl.h + Header Files/third_party/tcpip/wolfssl/cyassl + + + zero_conf_link_local_private.h + Header Files/framework/tcpip/src + + + compress.c + Source Files/framework/crypto/src + + + _eth_dcpt_lists.h + Header Files/framework/driver/ethmac/src/dynamic + + + usb_billboard.h + Header Files/framework/usb + + + ripemd.c + Source Files/third_party/wolfssl/wolfcrypt + + + memory.h + Header Files/framework/crypto/src + + + drv_usbhs_variant_mapping.h + Header Files/framework/driver/usb/usbhs/src + + + ossl_typ.h + Header Files/third_party/tcpip/wolfssl/cyassl/openssl + + + arc4.h + Header Files/framework/crypto/src + + + http_net_manager.h + Header Files/framework/tcpip/src + + + StackMacros.h + Header Files/FreeRTOS + + + integer.c + Source Files/framework/crypto/src + + + sha512.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + tfm.h + Header Files/framework/crypto/src + + + sha512.h + Header Files/framework/crypto/src + + + tftpc.h + Header Files/framework/tcpip + + + ftp_private.h + Header Files/framework/tcpip/src + + + ge_operations.c + Source Files/third_party/wolfssl/wolfcrypt + + + sniffer.h + Header Files/third_party/wolfssl + + + integer.h + Header Files/framework/crypto/src + + + tcpip_reboot_manager.h + Header Files/framework/tcpip/src + + + croutine.h + Header Files/FreeRTOS + + + random.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + engine.h + Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + + logging.h + Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + + + nrf51.h + Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt/port + + + fips_test.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + version.h + Header Files/framework/crypto/src + + + options.h + Header Files/third_party/wolfssl + + + dhcpv6_manager.h + Header Files/framework/tcpip/src + + + drv_ethmac_local.h + Header Files/framework/driver/ethmac/src + + + ssl.h + Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + + pkcs12.h + Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + + drv_usbhs_local.h + Header Files/framework/driver/usb/usbhs/src + + + pem.h + Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + + drv_usbhs_device.c + Source Files/framework/driver/usb/usbhs/src/dynamic + + + FreeRTOS.h + Header Files/FreeRTOS + + + drv_nvm_erasewrite.c + Source Files/framework/driver/nvm/src/dynamic + + + internal.h + Header Files/third_party/tcpip/wolfssl/cyassl + + + curve25519.h + Header Files/third_party/wolfssl/wolfcrypt + + + fe_operations.c + Source Files/third_party/wolfssl/wolfcrypt + + + event_groups.c + Source Files/FreeRTOS + + + pwdbased.c + Source Files/framework/crypto/src + + + keys.c + Source Files/third_party/wolfssl + + + asn_public.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + mpi_class.h + Header Files/framework/crypto/src + + + ed25519.h + Header Files/third_party/tcpip/wolfssl/wolfssl/openssl + + + ocsp.h + Header Files/third_party/wolfssl + + + http_private.h + Header Files/framework/tcpip/src + + + telnet_manager.h + Header Files/framework/tcpip/src + + + memory.h + Header Files/third_party/tcpip/wolfssl/cyassl/ctaocrypt + + + misc.h + Header Files/third_party/tcpip/wolfssl/wolfssl/wolfcrypt + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/driver/adc/drv_adc_static.h b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/driver/adc/drv_adc_static.h new file mode 100644 index 0000000..84040db --- /dev/null +++ b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/driver/adc/drv_adc_static.h @@ -0,0 +1,105 @@ +/******************************************************************************* + ADC Driver Interface Declarations for Static Single Instance Driver + + Company: + Microchip Technology Inc. + + File Name: + drv_adc_static.h + + Summary: + ADC driver interface declarations for the static single instance driver. + + Description: + The ADC device driver provides a simple interface to manage the ADC + modules on Microchip microcontrollers. This file defines the interface + Declarations for the ADC driver. + + Remarks: + Static interfaces incorporate the driver instance number within the names + of the routines, eliminating the need for an object ID or object handle. + + Static single-open interfaces also eliminate the need for the open handle. +*******************************************************************************/ + +//DOM-IGNORE-BEGIN +/******************************************************************************* +Copyright (c) 2013 released Microchip Technology Inc. All rights reserved. + +Microchip licenses to you the right to use, modify, copy and distribute +Software only when embedded on a Microchip microcontroller or digital signal +controller that is integrated into your product or third party product +(pursuant to the sublicense terms in the accompanying license agreement). + +You should refer to the license agreement accompanying this Software for +additional information regarding your rights and obligations. + +SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF +MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. +IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER +CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR +OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES +INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR +CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF +SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES +(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS. +*******************************************************************************/ +//DOM-IGNORE-END + +#ifndef _DRV_ADC_STATIC_H +#define _DRV_ADC_STATIC_H + +#include +#include "system_config.h" +#include "peripheral/adchs/plib_adchs.h" + +typedef enum { + + DRV_ADC_ID_1 = ADCHS_ID_0, + DRV_ADCHS_NUMBER_OF_MODULES + +} DRV_ADC_MODULE_ID; + +// ***************************************************************************** +// ***************************************************************************** +// Section: Interface Headers for ADC Static Driver +// ***************************************************************************** +// ***************************************************************************** +void DRV_ADC_Initialize(void); + +inline void DRV_ADC_DeInitialize(void); + +inline void DRV_ADC0_Open(void); + +inline void DRV_ADC0_Close(void); + +inline void DRV_ADC_Start(void); + +inline void DRV_ADC_Stop(void); + + +uint32_t DRV_ADC_SamplesRead(uint8_t bufIndex); + +bool DRV_ADC_SamplesAvailable(uint8_t bufIndex); + + + + + +inline void DRV_ADC_DigitalFilter0_Open(void); + +inline void DRV_ADC_DigitalFilter0_Close(void); + +inline bool DRV_ADC_DigitalFilter0_DataIsReady(void); + +inline int16_t DRV_ADC_DigitalFilter0_DataRead(void); + + + + +#endif // #ifndef _DRV_ADC_STATIC_H + +/******************************************************************************* + End of File +*/ diff --git a/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/driver/adc/src/drv_adc_static.c b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/driver/adc/src/drv_adc_static.c new file mode 100644 index 0000000..2e07f73 --- /dev/null +++ b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/driver/adc/src/drv_adc_static.c @@ -0,0 +1,268 @@ +/******************************************************************************* + ADC Driver Initialization File + + File Name: + drv_adc_static_hs.c + + Summary: + This file contains source code necessary to initialize the IC driver. + + Description: + This file contains source code necessary to initialize the system. It + implements the "DRV_ADC_Initialize" function, configuration bits, and allocates + any necessary global system resources, such as the systemObjects structure + that contains the object handles to all the MPLAB Harmony module objects in + the system. + *******************************************************************************/ + +/******************************************************************************* +Copyright (c) 2013-2014 released Microchip Technology Inc. All rights reserved. + +Microchip licenses to you the right to use, modify, copy and distribute +Software only when embedded on a Microchip microcontroller or digital signal +controller that is integrated into your product or third party product +(pursuant to the sublicense terms in the accompanying license agreement). + +You should refer to the license agreement accompanying this Software for +additional information regarding your rights and obligations. + +SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF +MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. +IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER +CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR +OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES +INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR +CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF +SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES +(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS. + *******************************************************************************/ + +// ***************************************************************************** +// ***************************************************************************** +// Section: Include Files +// ***************************************************************************** +// ***************************************************************************** +#include "framework/driver/adc/drv_adc_static.h" + +// ***************************************************************************** +// ***************************************************************************** +// Section: ADC Static Driver Functions +// ***************************************************************************** +// ***************************************************************************** +void DRV_ADC_Initialize(void) +{ + /* Select Power Mode */ + PLIB_ADCHS_Setup( + DRV_ADC_ID_1, + ADCHS_VREF_AVDD_AVSS, + ADCHS_CHARGEPUMP_DISABLE, + ADCHS_OUTPUT_DATA_FORMAT_INTEGER, + false, + ADCHS_FAST_SYNC_SYSTEM_CLOCK_DISABLE, + ADCHS_FAST_SYNC_PERIPHERAL_CLOCK_DISABLE, + 0, + 0, + ADCHS_CLOCK_SOURCE_PBCLK, + 16, + ADCHS_WARMUP_CLOCK_32768 + ); + + PLIB_ADCHS_ChannelSetup( + DRV_ADC_ID_1, + ADCHS_CHANNEL_3, + ADCHS_DATA_RESOLUTION_12BIT, + 4, + 32, + 0 + ); + + if(false == PLIB_ADCHS_ChannelTriggerSampleSelect( + DRV_ADC_ID_1, + ADCHS_CHANNEL_3, + ADCHS_CHANNEL_UNSYNC_TRIGGER_UNSYNC_SAMPLING + )) + { while(1);} +/* Since configuration of analog inputs (dedicated and alternate) for dedicated ADC channel */ +/* is done via selection of dedicated channel only, here, the analog input for a dedicated */ +/* ADC channel number is fixed */ + + if(false == PLIB_ADCHS_ChannelInputSelect( + DRV_ADC_ID_1, + ADCHS_CHANNEL_3, + (ADCHS_CHANNEL_INP_SEL)ADCHS_DEFAULT_CLASS1_AN3 + )) + { while(1);} + + + PLIB_ADCHS_AnalogInputModeSelect( + DRV_ADC_ID_1, + ADCHS_AN3, + ADCHS_INPUT_MODE_SINGLE_ENDED_UNIPOLAR + ); + + PLIB_ADCHS_AnalogInputEdgeTriggerSet( DRV_ADC_ID_1, ADCHS_CLASS12_AN3 ); + + PLIB_ADCHS_AnalogInputTriggerSourceSelect( + DRV_ADC_ID_1, + ADCHS_CLASS12_AN3, + ADCHS_TRIGGER_SOURCE_GLOBAL_SOFTWARE_EDGE + ); + + + + + + + + + /* Digital filter initialization */ + PLIB_ADCHS_DigitalFilterOversamplingModeSetup + ( + DRV_ADC_ID_1, + ADCHS_DIGITAL_FILTER_1, + ADCHS_AN3, + ADCHS_DIGITAL_FILTER_SIGNIFICANT_ALL_16BITS, + ADCHS_DIGITAL_FILTER_OVERSAMPLE_RATIO_256X, + false + ); + + + + + /* Enable ADC */ + PLIB_ADCHS_Enable(DRV_ADC_ID_1); + + /* Check Vref to be ready */ + while(!PLIB_ADCHS_VREFIsReady(DRV_ADC_ID_1)); + + /* Check for Vref Fault */ + while(PLIB_ADCHS_VREFFaultHasOccurred(DRV_ADC_ID_1)); + + + + + /* Enable analog feature for the specified channel */ + PLIB_ADCHS_ChannelAnalogFeatureEnable + ( + DRV_ADC_ID_1, + ADCHS_CHANNEL_3 + ); + + /* Wait for the modules to be ready */ + while(!PLIB_ADCHS_ChannelIsReady + ( + DRV_ADC_ID_1, + ADCHS_CHANNEL_3 + ) + ); + +} + + +inline void DRV_ADC_DeInitialize(void) +{ + /* Enable ADC */ + PLIB_ADCHS_Disable(DRV_ADC_ID_1); +} + + +inline void DRV_ADC0_Open(void) +{ + /* Enable digital feature for the specified channel */ + PLIB_ADCHS_ChannelDigitalFeatureEnable + ( + DRV_ADC_ID_1, + ADCHS_CHANNEL_3 + ); +} + +inline void DRV_ADC0_Close(void) +{ + /* Disable digital feature for the specified channel */ + PLIB_ADCHS_ChannelDigitalFeatureDisable + ( + DRV_ADC_ID_1, + ADCHS_CHANNEL_3 + ); +} + + +inline void DRV_ADC_Start(void) +{ + /* Start ADC */ + //PLIB_ADCHS_SoftwareSamplingStart(DRV_ADC_ID_1); + PLIB_ADCHS_GlobalSoftwareTriggerEnable(DRV_ADC_ID_1); +} + +inline void DRV_ADC_Stop(void) +{ + /* Stop ADC */ + PLIB_ADCHS_SoftwareSamplingStop(DRV_ADC_ID_1); +} + +uint32_t DRV_ADC_SamplesRead(uint8_t bufIndex) +{ + /* Read Result */ + return PLIB_ADCHS_AnalogInputResultGet + ( + DRV_ADC_ID_1, + (ADCHS_AN0 + bufIndex) + ); +} + +bool DRV_ADC_SamplesAvailable(uint8_t bufIndex) +{ + /* Check if data is available or not */ + return PLIB_ADCHS_AnalogInputDataIsReady + ( + DRV_ADC_ID_1, + (ADCHS_AN0 + bufIndex) + ); +} + + + + +inline void DRV_ADC_DigitalFilter0_Open(void) +{ + /* Enable digital comparator */ + PLIB_ADCHS_DigitalFilterEnable + ( + DRV_ADC_ID_1, + ADCHS_DIGITAL_FILTER_1 + ); +} + +inline void DRV_ADC_DigitalFilter0_Close(void) +{ + /* Disable digital comparator */ + PLIB_ADCHS_DigitalFilterDisable + ( + DRV_ADC_ID_1, + ADCHS_DIGITAL_FILTER_1 + ); +} + +inline bool DRV_ADC_DigitalFilter0_DataIsReady(void) +{ + + return(PLIB_ADCHS_DigitalFilterDataIsReady + ( + DRV_ADC_ID_1, + ADCHS_DIGITAL_FILTER_1 + )); +} + +inline int16_t DRV_ADC_DigitalFilter0_DataRead(void) +{ + + return(PLIB_ADCHS_DigitalFilterDataGet + ( + DRV_ADC_ID_1, + ADCHS_DIGITAL_FILTER_1 + )); +} + + + diff --git a/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/driver/cmp/drv_cmp_static.h b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/driver/cmp/drv_cmp_static.h new file mode 100644 index 0000000..fd24681 --- /dev/null +++ b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/driver/cmp/drv_cmp_static.h @@ -0,0 +1,68 @@ +/******************************************************************************* + CMP Driver Interface Declarations for Static Single Instance Driver + + Company: + Microchip Technology Inc. + + File Name: + drv_cmp_static.h + + Summary: + CMP driver interface declarations for the static single instance driver. + + Description: + The CMP device driver provides a simple interface to manage the CMP + modules on Microchip microcontrollers. This file defines the interface + Declarations for the IC driver. + + Remarks: + Static interfaces incorporate the driver instance number within the names + of the routines, eliminating the need for an object ID or object handle. + + Static single-open interfaces also eliminate the need for the open handle. +*******************************************************************************/ + +//DOM-IGNORE-BEGIN +/******************************************************************************* +Copyright (c) 2013 released Microchip Technology Inc. All rights reserved. + +Microchip licenses to you the right to use, modify, copy and distribute +Software only when embedded on a Microchip microcontroller or digital signal +controller that is integrated into your product or third party product +(pursuant to the sublicense terms in the accompanying license agreement). + +You should refer to the license agreement accompanying this Software for +additional information regarding your rights and obligations. + +SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF +MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. +IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER +CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR +OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES +INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR +CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF +SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES +(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS. +*******************************************************************************/ +//DOM-IGNORE-END + +#ifndef _DRV_CMP_STATIC_H +#define _DRV_CMP_STATIC_H + +#include "peripheral/cmp/plib_cmp.h" +#include "peripheral/int/plib_int.h" + +// ***************************************************************************** +// ***************************************************************************** +// Section: Interface Headers for the static driver +// ***************************************************************************** +// ***************************************************************************** + +void DRV_CMP_Initialize(void); + +#endif // #ifndef _DRV_CMP_STATIC_H + +/******************************************************************************* + End of File +*/ diff --git a/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/driver/cmp/src/drv_cmp_static.c b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/driver/cmp/src/drv_cmp_static.c new file mode 100644 index 0000000..f26707e --- /dev/null +++ b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/driver/cmp/src/drv_cmp_static.c @@ -0,0 +1,111 @@ +/******************************************************************************* + CMP Driver Functions for Static Single Instance Driver + + Company: + Microchip Technology Inc. + + File Name: + drv_cmp_static.c + + Summary: + CMP driver implementation for the static single instance driver. + + Description: + The CMP device driver provides a simple interface to manage the CMP + modules on Microchip microcontrollers. + + Remarks: + Static interfaces incorporate the driver instance number within the names + of the routines, eliminating the need for an object ID or object handle. + Static single-open interfaces also eliminate the need for the open handle. +*******************************************************************************/ + +//DOM-IGNORE-BEGIN +/******************************************************************************* +Copyright (c) 2013 released Microchip Technology Inc. All rights reserved. + +Microchip licenses to you the right to use, modify, copy and distribute +Software only when embedded on a Microchip microcontroller or digital signal +controller that is integrated into your product or third party product +(pursuant to the sublicense terms in the accompanying license agreement). + +You should refer to the license agreement accompanying this Software for +additional information regarding your rights and obligations. + +SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF +MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. +IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER +CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR +OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES +INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR +CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF +SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES +(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS. +*******************************************************************************/ +//DOM-IGNORE-END + +// ***************************************************************************** +// ***************************************************************************** +// Header Includes +// ***************************************************************************** +// ***************************************************************************** +#include "framework/driver/cmp/drv_cmp_static.h" + + +// ***************************************************************************** +// ***************************************************************************** +// Section: CMP static driver functions +// ***************************************************************************** +// ***************************************************************************** +void DRV_CMP_Initialize(void) +{ + + /* Configure CVREF for comparator use. */ + PLIB_CMP_CVREF_SourceVoltageSelect(CMP_ID_1, CMP_CVREF_VOLTAGE_SOURCE_VDD); + #if defined(PLIB_CMP_ExistsCVREFRefVoltageRangeSelect ) + if ( PLIB_CMP_ExistsCVREFRefVoltageRangeSelect ( CMP_ID_1 ) ) + { + PLIB_CMP_CVREF_ReferenceVoltageSelect ( CMP_ID_1, CMP_CVREF_RESISTOR_LADDER_VOLTAGE ); + } + else + { + /* If Voltage reference selection for CVref feature doesn't exist + on CVREF module instance, + then by default Resister Latter Network is selected as reference, so do nothing */ + } + #endif + PLIB_CMP_CVREF_ValueSelect(CMP_ID_1, CMP_CVREF_VALUE_11); + #if defined(PLIB_CMP_ExistsCVREFBGRefVoltageRangeSelect ) + if ( PLIB_CMP_ExistsCVREFBGRefVoltageRangeSelect ( CMP_ID_1 ) ) + { + PLIB_CMP_CVREF_BandGapReferenceSourceSelect ( CMP_ID_1, CMP_CVREF_BANDGAP_1_2V ); + } + else + { + /* If Voltage reference selection for IVref feature doesn't exist + on CVREF module instance, + then by default internal 1.2V is selected as reference, so do nothing */ + } + #endif + PLIB_CMP_CVREF_Enable(CMP_ID_1); + + PLIB_CMP_NonInvertingInputChannelSelect(CMP_ID_2, CMP_NON_INVERTING_INPUT_CVREF); + PLIB_CMP_InvertingInputChannelSelect(CMP_ID_2, CMP_INVERTING_INPUT_EXTERNAL_PIN_B); + + PLIB_CMP_OutputInvertDisable(CMP_ID_2); + PLIB_CMP_OutputEnable(CMP_ID_2); + + /* Setup Interrupt */ + PLIB_CMP_InterruptEventSelect(CMP_ID_2, CMP_INTERRUPT_GENERATION_LOW_TO_HIGH); + PLIB_INT_SourceEnable(INT_ID_0, INT_SOURCE_COMPARATOR_2); + PLIB_INT_VectorPrioritySet(INT_ID_0, INT_VECTOR_CMP2, INT_PRIORITY_LEVEL1); + PLIB_INT_VectorSubPrioritySet(INT_ID_0, INT_VECTOR_CMP2, INT_SUBPRIORITY_LEVEL0); + + PLIB_CMP_Enable(CMP_ID_2); + +} + +/******************************************************************************* + End of File +*/ diff --git a/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/net/pres/net_pres_cert_store.c b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/net/pres/net_pres_cert_store.c new file mode 100644 index 0000000..88d1b31 --- /dev/null +++ b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/net/pres/net_pres_cert_store.c @@ -0,0 +1,45 @@ +/******************************************************************************* + Source file for the Net Pres Certificate Store functions to work with Harmony + + + Summary: + + + Description: + +*******************************************************************************/ + +/******************************************************************************* +File Name: net_pres_cert_stroe.c +Copyright (c) 2015 released Microchip Technology Inc. All rights +reserved. + +Microchip licenses to you the right to use, modify, copy and distribute +Software only when embedded on a Microchip microcontroller or digital signal +controller that is integrated into your product or third party product +(pursuant to the sublicense terms in the accompanying license agreement). + +You should refer to the license agreement accompanying this Software for +additional information regarding your rights and obligations. + +SOFTWARE AND DOCUMENTATION ARE PROVIDED ?AS IS? WITHOUT WARRANTY OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF +MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. +IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER +CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR +OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES +INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR +CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF +SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES +(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS. +*******************************************************************************/ +#include "net/pres/net_pres_certstore.h" +#define USE_CERT_BUFFERS_2048 +#include "ca-certs.h" + +bool NET_PRES_CertStoreGetCACerts(const uint8_t ** certPtr, int32_t * certSize, uint8_t certIndex) +{ + *certPtr = caCert; + *certSize = sizeof_caCert; + return true; +} diff --git a/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/net/pres/net_pres_enc_glue.c b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/net/pres/net_pres_enc_glue.c new file mode 100644 index 0000000..74d3ab8 --- /dev/null +++ b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/net/pres/net_pres_enc_glue.c @@ -0,0 +1,296 @@ +/******************************************************************************* + Source file for the Net Pres Encryption glue functions to work with Harmony + + + Summary: + + + Description: + +*******************************************************************************/ + +/******************************************************************************* +File Name: net_pres_enc_glue.c +Copyright (c) 2013 released Microchip Technology Inc. All rights +reserved. + +Microchip licenses to you the right to use, modify, copy and distribute +Software only when embedded on a Microchip microcontroller or digital signal +controller that is integrated into your product or third party product +(pursuant to the sublicense terms in the accompanying license agreement). + +You should refer to the license agreement accompanying this Software for +additional information regarding your rights and obligations. + +SOFTWARE AND DOCUMENTATION ARE PROVIDED ?AS IS? WITHOUT WARRANTY OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF +MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. +IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER +CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR +OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES +INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR +CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF +SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES +(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS. +*******************************************************************************/ + +#include "net_pres_enc_glue.h" +#include "net/pres/net_pres_transportapi.h" +#include "net/pres/net_pres_certstore.h" + +#include "config.h" +#include "wolfssl/ssl.h" +#include "wolfssl/wolfcrypt/logging.h" +#include "wolfssl/wolfcrypt/random.h" + +#include "app.h" + +extern APP_DATA appData; + +static uint8_t _net_pres_wolfsslUsers = 0; +typedef struct +{ + WOLFSSL_CTX* context; + NET_PRES_TransportObject * transObject; + bool isInited; +}net_pres_wolfsslInfo; + +// Temporary fix till crypto library is upgraded to recent wolfssl versions. +int InitRng(RNG* rng) +{ + return wc_InitRng(rng); +} + + +NET_PRES_EncProviderObject net_pres_EncProviderStreamClient0 = +{ + .fpInit = NET_PRES_EncProviderStreamClientInit0, + .fpDeinit = NET_PRES_EncProviderStreamClientDeinit0, + .fpOpen = NET_PRES_EncProviderStreamClientOpen0, + .fpConnect = NET_PRES_EncProviderClientConnect0, + .fpClose = NET_PRES_EncProviderConnectionClose0, + .fpWrite = NET_PRES_EncProviderWrite0, + .fpWriteReady = NET_PRES_EncProviderWriteReady0, + .fpRead = NET_PRES_EncProviderRead0, + .fpReadReady = NET_PRES_EncProviderReadReady0, + .fpPeek = NET_PRES_EncProviderPeek0, + .fpIsInited = NET_PRES_EncProviderStreamClientIsInited0, +}; +net_pres_wolfsslInfo net_pres_wolfSSLInfoStreamClient0; +int NET_PRES_EncGlue_StreamClientReceiveCb0(void *sslin, char *buf, int sz, void *ctx) +{ + int fd = *(int *)ctx; + uint16_t bufferSize; + bufferSize = (*net_pres_wolfSSLInfoStreamClient0.transObject->fpReadyToRead)((uintptr_t)fd); + if (bufferSize == 0) + { + return WOLFSSL_CBIO_ERR_WANT_READ; + } + bufferSize = (*net_pres_wolfSSLInfoStreamClient0.transObject->fpRead)((uintptr_t)fd, (uint8_t*)buf, sz); + return bufferSize; +} +int NET_PRES_EncGlue_StreamClientSendCb0(void *sslin, char *buf, int sz, void *ctx) +{ + int fd = *(int *)ctx; + uint16_t bufferSize; + bufferSize = (*net_pres_wolfSSLInfoStreamClient0.transObject->fpReadyToWrite)((uintptr_t)fd); + if (bufferSize == 0) + { + return WOLFSSL_CBIO_ERR_WANT_WRITE; + } + + bufferSize = (*net_pres_wolfSSLInfoStreamClient0.transObject->fpWrite)((uintptr_t)fd, (uint8_t*)buf, (uint16_t)sz); + return bufferSize; +} +bool NET_PRES_EncProviderStreamClientInit0(NET_PRES_TransportObject * transObject) +{ + const uint8_t * caCertsPtr; + int32_t caCertsLen; + if (!NET_PRES_CertStoreGetCACerts(&caCertsPtr, &caCertsLen, 0)) + { + return false; + } + if (_net_pres_wolfsslUsers == 0) + { + wolfSSL_Init(); + _net_pres_wolfsslUsers++; + } + net_pres_wolfSSLInfoStreamClient0.transObject = transObject; + net_pres_wolfSSLInfoStreamClient0.context = wolfSSL_CTX_new(wolfSSLv23_client_method()); + if (net_pres_wolfSSLInfoStreamClient0.context == 0) + { + return false; + } + wolfSSL_SetIORecv(net_pres_wolfSSLInfoStreamClient0.context, (CallbackIORecv)&NET_PRES_EncGlue_StreamClientReceiveCb0); + wolfSSL_SetIOSend(net_pres_wolfSSLInfoStreamClient0.context, (CallbackIOSend)&NET_PRES_EncGlue_StreamClientSendCb0); + + // Turn off verification, because SNTP is usually blocked by a firewall + wolfSSL_CTX_set_verify(net_pres_wolfSSLInfoStreamClient0.context, SSL_VERIFY_NONE, 0); + + if (wolfSSL_CTX_load_verify_buffer(net_pres_wolfSSLInfoStreamClient0.context, caCertsPtr, caCertsLen, SSL_FILETYPE_ASN1) != SSL_SUCCESS) + { + // Couldn't load the certificates + wolfSSL_CTX_free(net_pres_wolfSSLInfoStreamClient0.context); + return false; + } + + if(wolfSSL_CTX_use_PrivateKey_buffer(net_pres_wolfSSLInfoStreamClient0.context, (unsigned char *)appData.clientKey, strlen((char *)appData.clientKey), SSL_FILETYPE_PEM) != SSL_SUCCESS) + { + // Couldn't load the private key + wolfSSL_CTX_free(net_pres_wolfSSLInfoStreamClient0.context); + return false; + } + + // Loading the client cert so that the server can authenticate us (client authentication)) + if(wolfSSL_CTX_use_certificate_buffer(net_pres_wolfSSLInfoStreamClient0.context, (unsigned char *)appData.clientCert, strlen((char *)appData.clientCert), SSL_FILETYPE_PEM) != SSL_SUCCESS) + { + // Couldn't load the client certificate + wolfSSL_CTX_free(net_pres_wolfSSLInfoStreamClient0.context); + return false; + } + + // Turn off verification, because SNTP is usually blocked by a firewall + wolfSSL_CTX_set_verify(net_pres_wolfSSLInfoStreamClient0.context, SSL_VERIFY_NONE, 0); + net_pres_wolfSSLInfoStreamClient0.isInited = true; + return true; +} +bool NET_PRES_EncProviderStreamClientDeinit0() +{ + wolfSSL_CTX_free(net_pres_wolfSSLInfoStreamClient0.context); + net_pres_wolfSSLInfoStreamClient0.isInited = false; + _net_pres_wolfsslUsers--; + if (_net_pres_wolfsslUsers == 0) + { + wolfSSL_Cleanup(); + } + return true; +} +bool NET_PRES_EncProviderStreamClientOpen0(uintptr_t transHandle, void * providerData) +{ + WOLFSSL* ssl = wolfSSL_new(net_pres_wolfSSLInfoStreamClient0.context); + if (ssl == NULL) + { + return false; + } + if (wolfSSL_set_fd(ssl, transHandle) != SSL_SUCCESS) + { + wolfSSL_free(ssl); + return false; + } + memcpy(providerData, &ssl, sizeof(WOLFSSL*)); + return true; +} +bool NET_PRES_EncProviderStreamClientIsInited0() +{ + return net_pres_wolfSSLInfoStreamClient0.isInited; +} +NET_PRES_EncSessionStatus NET_PRES_EncProviderClientConnect0(void * providerData) +{ + WOLFSSL* ssl; + memcpy(&ssl, providerData, sizeof(WOLFSSL*)); + int result = wolfSSL_connect(ssl); + switch (result) + { + case SSL_SUCCESS: + return NET_PRES_ENC_SS_OPEN; + default: + { + int error = wolfSSL_get_error(ssl, result); + switch (error) + { + case SSL_ERROR_WANT_READ: + case SSL_ERROR_WANT_WRITE: + return NET_PRES_ENC_SS_CLIENT_NEGOTIATING; + default: + return NET_PRES_ENC_SS_FAILED; + } + } + } +} +NET_PRES_EncSessionStatus NET_PRES_EncProviderConnectionClose0(void * providerData) +{ + WOLFSSL* ssl; + memcpy(&ssl, providerData, sizeof(WOLFSSL*)); + wolfSSL_free(ssl); + return NET_PRES_ENC_SS_CLOSED; +} +int32_t NET_PRES_EncProviderWrite0(void * providerData, const uint8_t * buffer, uint16_t size) +{ + WOLFSSL* ssl; + memcpy(&ssl, providerData, sizeof(WOLFSSL*)); + int ret = wolfSSL_write(ssl, buffer, size); + if (ret < 0) + { + return ret; // DGC_modified + } + return ret; +} +uint16_t NET_PRES_EncProviderWriteReady0(void * providerData, uint16_t reqSize, uint16_t minSize) +{ + extern int CheckAvailableSize(WOLFSSL *ssl, int size); + char buffer; + WOLFSSL* ssl; + memcpy(&ssl, providerData, sizeof(WOLFSSL*)); + + int ret = wolfSSL_write(ssl, &buffer, 0); + if(ret < 0) + { + return ret; // DGC_modified + } + + ret = CheckAvailableSize(ssl, reqSize); + if(ret == 0) + { // success + return reqSize; + } + if(minSize != 0) + { + ret = CheckAvailableSize(ssl, minSize); + if(ret == 0) + { // success + return minSize; + } + } + + return 0; +} +int32_t NET_PRES_EncProviderRead0(void * providerData, uint8_t * buffer, uint16_t size) +{ + WOLFSSL* ssl; + memcpy(&ssl, providerData, sizeof(WOLFSSL*)); + int ret = wolfSSL_read(ssl, buffer, size); + if (ret < 0) + { + return 0; + } + return ret; +} + +int32_t NET_PRES_EncProviderReadReady0(void * providerData) +{ + WOLFSSL* ssl; + memcpy(&ssl, providerData, sizeof(WOLFSSL*)); + int32_t ret = wolfSSL_pending(ssl); + if (ret == 0) // wolfSSL_pending() doesn't check the underlying layer. + { + char buffer; + if (wolfSSL_peek(ssl, &buffer, 1) == 0) + { + return 0; + } + ret = wolfSSL_pending(ssl); + } + return ret; +} + +int32_t NET_PRES_EncProviderPeek0(void * providerData, uint8_t * buffer, uint16_t size) +{ + WOLFSSL* ssl; + memcpy(&ssl, providerData, sizeof(WOLFSSL*)); + int ret = wolfSSL_peek(ssl, buffer, size); + if (ret < 0) + { + return 0; + } + return ret; +} diff --git a/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/net/pres/net_pres_enc_glue.h b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/net/pres/net_pres_enc_glue.h new file mode 100644 index 0000000..deded9c --- /dev/null +++ b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/net/pres/net_pres_enc_glue.h @@ -0,0 +1,61 @@ +/******************************************************************************* + Header file for the wolfSSL glue functions to work with Harmony + + + Summary: + + + Description: + +*******************************************************************************/ + +/******************************************************************************* +File Name: net_tls_wolfssl_glue.h +Copyright (c) 2013 released Microchip Technology Inc. All rights +reserved. + +Microchip licenses to you the right to use, modify, copy and distribute +Software only when embedded on a Microchip microcontroller or digital signal +controller that is integrated into your product or third party product +(pursuant to the sublicense terms in the accompanying license agreement). + +You should refer to the license agreement accompanying this Software for +additional information regarding your rights and obligations. + +SOFTWARE AND DOCUMENTATION ARE PROVIDED ?AS IS? WITHOUT WARRANTY OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF +MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. +IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER +CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR +OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES +INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR +CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF +SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES +(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS. +*******************************************************************************/ + +#ifndef _NET_TLS_WOLFSSL_GLUE_H_ +#define _NET_TLS_WOLFSSL_GLUE_H_ + +#include "system_config.h" +#include "net/pres/net_pres.h" +#include "net/pres/net_pres_encryptionproviderapi.h" +#ifdef __CPLUSPLUS +extern "c" { +#endif +extern NET_PRES_EncProviderObject net_pres_EncProviderStreamClient0; +bool NET_PRES_EncProviderStreamClientInit0(struct _NET_PRES_TransportObject * transObject); +bool NET_PRES_EncProviderStreamClientDeinit0(); +bool NET_PRES_EncProviderStreamClientOpen0(uintptr_t transHandle, void * providerData); +bool NET_PRES_EncProviderStreamClientIsInited0(); +NET_PRES_EncSessionStatus NET_PRES_EncProviderClientConnect0(void * providerData); +NET_PRES_EncSessionStatus NET_PRES_EncProviderConnectionClose0(void * providerData); +int32_t NET_PRES_EncProviderWrite0(void * providerData, const uint8_t * buffer, uint16_t size); +uint16_t NET_PRES_EncProviderWriteReady0(void * providerData, uint16_t reqSize, uint16_t minSize); +int32_t NET_PRES_EncProviderRead0(void * providerData, uint8_t * buffer, uint16_t size); +int32_t NET_PRES_EncProviderReadReady0(void * providerData); +int32_t NET_PRES_EncProviderPeek0(void * providerData, uint8_t * buffer, uint16_t size); +#ifdef __CPLUSPLUS +} +#endif +#endif //_NET_TLS_WOLFSSL_GLUE_H_ diff --git a/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/system/clk/src/sys_clk_static.c b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/system/clk/src/sys_clk_static.c new file mode 100644 index 0000000..013c70e --- /dev/null +++ b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/system/clk/src/sys_clk_static.c @@ -0,0 +1,371 @@ +/******************************************************************************* + SYS CLK Static Functions for Clock System Service + + Company: + Microchip Technology Inc. + + File Name: + sys_clk_static.c + + Summary: + SYS CLK static function implementations for the Clock System Service. + + Description: + The Clock System Service provides a simple interface to manage the oscillators + on Microchip microcontrollers. This file defines the static implementation for the + Clock System Service. + + Remarks: + Static functions incorporate all system clock configuration settings as + determined by the user via the Microchip Harmony Configurator GUI. It provides + static version of the routines, eliminating the need for an object ID or + object handle. + + Static single-open interfaces also eliminate the need for the open handle. +*******************************************************************************/ + +//DOM-IGNORE-BEGIN +/******************************************************************************* +Copyright (c) 2014 released Microchip Technology Inc. All rights reserved. + +Microchip licenses to you the right to use, modify, copy and distribute +Software only when embedded on a Microchip microcontroller or digital signal +controller that is integrated into your product or third party product +(pursuant to the sublicense terms in the accompanying license agreement). + +You should refer to the license agreement accompanying this Software for +additional information regarding your rights and obligations. + +SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF +MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. +IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER +CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR +OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES +INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR +CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF +SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES +(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS. +*******************************************************************************/ +//DOM-IGNORE-END + +// ***************************************************************************** +// ***************************************************************************** +// Section: Include Files +// ***************************************************************************** +// ***************************************************************************** + +#include "system_config.h" +#include "system_definitions.h" +#include "peripheral/osc/plib_osc.h" +#include "system/devcon/sys_devcon.h" + +// ***************************************************************************** +// ***************************************************************************** +// Section: File Scope Functions +// ***************************************************************************** +// ***************************************************************************** + +// ***************************************************************************** +/* Function: + void SYS_CLK_Static_Initialize ( const SYS_CLK_INIT const * clkInit ) + + Summary: + Initializes hardware and internal data structure of the System Clock. + + Description: + This function initializes the hardware and internal data structure of System + Clock Service. + + Remarks: + This is configuration values for the static version of the Clock System Service + module is determined by the user via the Microchip Harmony Configurator GUI. + This template will build a sys_clk_static.h and sys_clk_static.c file with + the configuration per the user's choice. + + The objective is to eliminate the user's need to be knowledgeable in the function of + the 'configuration bits' to configure the system oscillators. +*/ + +void SYS_CLK_Initialize( const SYS_CLK_INIT const * clkInit ) +{ + SYS_DEVCON_SystemUnlock ( ); + + PLIB_OSC_FRCDivisorSelect( OSC_ID_0, OSC_FRC_DIV_1); + + /* Enable Peripheral Bus 1 */ + PLIB_OSC_PBClockDivisorSet (OSC_ID_0, 0, 2 ); + PLIB_OSC_PBOutputClockEnable (OSC_ID_0, 0 ); + /* Enable Peripheral Bus 2 */ + PLIB_OSC_PBClockDivisorSet (OSC_ID_0, 1, 2 ); + PLIB_OSC_PBOutputClockEnable (OSC_ID_0, 1 ); + /* Enable Peripheral Bus 3 */ + PLIB_OSC_PBClockDivisorSet (OSC_ID_0, 2, 2 ); + PLIB_OSC_PBOutputClockEnable (OSC_ID_0, 2 ); + /* Enable Peripheral Bus 4 */ + PLIB_OSC_PBClockDivisorSet (OSC_ID_0, 3, 2 ); + PLIB_OSC_PBOutputClockEnable (OSC_ID_0, 3 ); + /* Enable Peripheral Bus 5 */ + PLIB_OSC_PBClockDivisorSet (OSC_ID_0, 4, 2 ); + PLIB_OSC_PBOutputClockEnable (OSC_ID_0, 4 ); + /* Enable Peripheral Bus 7 */ + PLIB_OSC_PBClockDivisorSet (OSC_ID_0, 6, 1 ); + PLIB_OSC_PBOutputClockEnable (OSC_ID_0, 6 ); + /* Enable Peripheral Bus 8 */ + PLIB_OSC_PBClockDivisorSet (OSC_ID_0, 7, 1 ); + PLIB_OSC_PBOutputClockEnable (OSC_ID_0, 7 ); + /* Disable REFCLKO1*/ + PLIB_OSC_ReferenceOscDisable ( OSC_ID_0, OSC_REFERENCE_1 ); + /* Disable REFCLK1_OE*/ + PLIB_OSC_ReferenceOutputDisable ( OSC_ID_0, OSC_REFERENCE_1 ); + /* Disable REFCLKO2*/ + PLIB_OSC_ReferenceOscDisable ( OSC_ID_0, OSC_REFERENCE_2 ); + /* Disable REFCLK2_OE*/ + PLIB_OSC_ReferenceOutputDisable ( OSC_ID_0, OSC_REFERENCE_2 ); + /* Disable REFCLKO3*/ + PLIB_OSC_ReferenceOscDisable ( OSC_ID_0, OSC_REFERENCE_3 ); + /* Disable REFCLK3_OE*/ + PLIB_OSC_ReferenceOutputDisable ( OSC_ID_0, OSC_REFERENCE_3 ); + /* Disable REFCLKO4*/ + PLIB_OSC_ReferenceOscDisable ( OSC_ID_0, OSC_REFERENCE_4 ); + /* Disable REFCLK4_OE*/ + PLIB_OSC_ReferenceOutputDisable ( OSC_ID_0, OSC_REFERENCE_4 ); + + SYS_DEVCON_SystemLock ( ); +} + +//****************************************************************************** +/* Function: + inline uint32_t SYS_CLK_SystemFrequencyGet ( void ) + + Summary: + Gets the system clock frequency in Hertz. + + Description: + This function gets the System clock frequency in Hertz. + + Precondition: + None. + + Parameters: + None. + + Returns: + System clock frequency in Hertz. + + Example: + + uint32_t sysClockHz; + + sysClockHz = SYS_CLK_SystemFrequencyGet ( ); + + + Remarks: + */ + +inline uint32_t SYS_CLK_SystemFrequencyGet ( void ) +{ + return SYS_CLK_FREQ; +} + +//****************************************************************************** +/* Function: + inline uint32_t SYS_CLK_PeripheralFrequencyGet ( CLK_BUSES_PERIPHERAL peripheralBus ) + + Summary: + Gets the selected clock peripheral bus frequency in Hertz. + + Description: + This function gets the selected peripheral bus clock frequency in Hertz. + + Precondition: + None. + + Parameters: + peripheralBus - Reference clock bus selection. One of the possible value from + CLK_BUSES_PERIPHERAL enum. For devices that do not have multiple + clock channels for Reference clock, CLK_BUS_PERIPHERAL_1 should be + the selection. + + Returns: + Clock frequency in Hertz. + + Example: + + unsigned long peripheralClockHz; + + peripheralClockHz = SYS_CLK_PeripheralFrequencyGet ( CLK_BUS_PERIPHERAL_5 ); + + + Remarks: + Most of the devices doesn't have multiple Peripheral clock buses. In that case, + pass CLK_USB_PERIPHERAL_1 as the bus number. + */ + +inline uint32_t SYS_CLK_PeripheralFrequencyGet ( CLK_BUSES_PERIPHERAL peripheralBus ) +{ + uint32_t freq = 0; + + switch (peripheralBus) + { + case CLK_BUS_PERIPHERAL_1: + freq = SYS_CLK_BUS_PERIPHERAL_1; + break; + case CLK_BUS_PERIPHERAL_2: + freq = SYS_CLK_BUS_PERIPHERAL_2; + break; + case CLK_BUS_PERIPHERAL_3: + freq = SYS_CLK_BUS_PERIPHERAL_3; + break; + case CLK_BUS_PERIPHERAL_4: + freq = SYS_CLK_BUS_PERIPHERAL_4; + break; + case CLK_BUS_PERIPHERAL_5: + freq = SYS_CLK_BUS_PERIPHERAL_5; + break; + case CLK_BUS_PERIPHERAL_6: + break; + case CLK_BUS_PERIPHERAL_7: + freq = SYS_CLK_BUS_PERIPHERAL_7; + break; + case CLK_BUS_PERIPHERAL_8: + freq = SYS_CLK_BUS_PERIPHERAL_8; + break; + default: + break; + } + + return freq; +} + + +//****************************************************************************** +/* Function: + inline uint32_t SYS_CLK_ReferenceClockFrequencyGet ( CLK_BUSES_REFERENCE referenceBus ) + + Summary: + Gets the selected Reference clock bus frequency in Hertz. + + Description: + This function gets frequency of the selected Reference clock bus in Hertz. + + Precondition: + None. + + Parameters: + peripheralBus - Reference clock bus selection. One of the possible value from + CLK_BUSES_REFERENCE enum. For devices that do not have multiple + clock channels for Reference clock, CLK_BUS_REFERENCE_1 should be + the selection. + + Returns: + Clock frequency in Hz. + + Example: + + unsigned long sysClockOutputHz; + + sysClockOutputHz = SYS_CLK_ReferenceClockFrequencyGet ( CLK_BUS_REFERENCE_3 ); + + + Remarks: + */ + +inline uint32_t SYS_CLK_ReferenceClockFrequencyGet ( CLK_BUSES_REFERENCE referenceBus ) +{ + uint32_t freq = 0; + + switch (referenceBus) + { + case CLK_BUS_REFERENCE_1: + break; + case CLK_BUS_REFERENCE_2: + break; + case CLK_BUS_REFERENCE_3: + break; + case CLK_BUS_REFERENCE_4: + break; + case CLK_BUS_REFERENCE_5: + break; + default: + break; + } + + return freq; +} + +/****************************************************************************** + Function: + void SYS_CLK_SecondaryOscillatorEnable ( void ) + + Summary: + Enables the secondary oscillator. + + Description: + This function enables the secondary oscillator. + + Remarks: + For more details refer sys_clk.h. +*/ + +void SYS_CLK_SecondaryOscillatorEnable ( void ) +{ + /* Check for secondary oscillator status */ + if (!PLIB_OSC_SecondaryIsEnabled(OSC_ID_0)) + { + /* Unlock and enable secondary oscillator */ + SYS_DEVCON_SystemUnlock(); + + PLIB_OSC_SecondaryEnable(OSC_ID_0); + + SYS_DEVCON_SystemLock(); + } +} + +/****************************************************************************** + Function: + void SYS_CLK_SecondaryOscillatorDisable ( void ) + + Summary: + Disables the secondary oscillator. + + Description: + This function disables the secondary oscillator. + + Remarks: + For more details refer sys_clk.h. +*/ + +void SYS_CLK_SecondaryOscillatorDisable ( void ) +{ + /* Check for secondary oscillator status */ + if (PLIB_OSC_SecondaryIsEnabled(OSC_ID_0)) + { + /* Unlock and disable secondary oscillator*/ + SYS_DEVCON_SystemUnlock(); + + PLIB_OSC_SecondaryDisable(OSC_ID_0); + + SYS_DEVCON_SystemLock(); + } +} + +/****************************************************************************** + Function: + bool SYS_CLK_SecondaryOscillatorIsEnabled ( void ) + + Summary: + Identifies whether secondary oscillator is enabled or disabled. + + Description: + This function identifies whether the secondary oscillator is enabled or + disabled. + + Remarks: + For more details refer sys_clk.h. +*/ + +bool SYS_CLK_SecondaryOscillatorIsEnabled ( void ) +{ + return (PLIB_OSC_SecondaryIsEnabled(OSC_ID_0)); +} diff --git a/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/system/clk/sys_clk_static.h b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/system/clk/sys_clk_static.h new file mode 100644 index 0000000..34500a7 --- /dev/null +++ b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/system/clk/sys_clk_static.h @@ -0,0 +1,81 @@ +/******************************************************************************* + SYS CLK Static Interface Declarations for Clock System Service + + Company: + Microchip Technology Inc. + + File Name: + sys_clk_static.h + + Summary: + SYS CLK interface declarations for the static system service. + + Description: + The Clock System Service provides a simple interface to manage the oscillators + on Microchip microcontrollers. This file defines the interface + Declarations for the SYS CLK system service. + + Remarks: + Static interfaces incorporate all system clock configuration settings as + determined by the user via the Microchip Harmony Configurator GUI. It provides + static version of the routines, eliminating the need for an object ID or + object handle. + + Static single-open interfaces also eliminate the need for the open handle. +*******************************************************************************/ + +//DOM-IGNORE-BEGIN +/******************************************************************************* +Copyright (c) 2014 released Microchip Technology Inc. All rights reserved. + +Microchip licenses to you the right to use, modify, copy and distribute +Software only when embedded on a Microchip microcontroller or digital signal +controller that is integrated into your product or third party product +(pursuant to the sublicense terms in the accompanying license agreement). + +You should refer to the license agreement accompanying this Software for +additional information regarding your rights and obligations. + +SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF +MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. +IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER +CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR +OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES +INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR +CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF +SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES +(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS. +*******************************************************************************/ +//DOM-IGNORE-END + +// DOM-IGNORE-BEGIN +#ifdef __cplusplus // Provide C++ Compatibility + + extern "C" { + +#endif +// DOM-IGNORE-END + + +#ifndef _SYS_CLK_STATIC_H +#define _SYS_CLK_STATIC_H + +// ***************************************************************************** +// ***************************************************************************** +// Section: SYS CLK Module Initialization Routine (Static Version) +// ***************************************************************************** +// ***************************************************************************** + +#endif // #ifndef _SYS_CLK_STATIC_H + +//DOM-IGNORE-BEGIN +#ifdef __cplusplus +} +#endif +//DOM-IGNORE-END + + +/******************************************************************************* + End of File +*/ diff --git a/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/system/ports/src/sys_ports_static.c b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/system/ports/src/sys_ports_static.c new file mode 100644 index 0000000..b130f8f --- /dev/null +++ b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/framework/system/ports/src/sys_ports_static.c @@ -0,0 +1,901 @@ +/******************************************************************************* + SYS PORTS Static Functions for PORTS System Service + + Company: + Microchip Technology Inc. + + File Name: + sys_ports_static.c + + Summary: + SYS PORTS static function implementations for the Ports System Service. + + Description: + The Ports System Service provides a simple interface to manage the ports + on Microchip microcontrollers. This file defines the static implementation for the + Ports System Service. + + Remarks: + Static functions incorporate all system ports configuration settings as + determined by the user via the Microchip Harmony Configurator GUI. It provides + static version of the routines, eliminating the need for an object ID or + object handle. + +*******************************************************************************/ + +//DOM-IGNORE-BEGIN +/******************************************************************************* +Copyright (c) 2013 released Microchip Technology Inc. All rights reserved. + +Microchip licenses to you the right to use, modify, copy and distribute +Software only when embedded on a Microchip microcontroller or digital signal +controller that is integrated into your product or third party product +(pursuant to the sublicense terms in the accompanying license agreement). + +You should refer to the license agreement accompanying this Software for +additional information regarding your rights and obligations. + +SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF +MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. +IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER +CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR +OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES +INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR +CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF +SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES +(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS. +*******************************************************************************/ +//DOM-IGNORE-END + +#include "system_config.h" +#include "system/ports/sys_ports.h" +#include "peripheral/devcon/plib_devcon.h" +#include "peripheral/ports/plib_ports.h" +#include "peripheral/int/plib_int.h" + +/****************************************************************************** + Function: + SYS_PORTS_Initialize(void) + + Summary: + Initializes Ports System Service + + Description: + This function initializes different port pins/channels to the desired state. + It also remaps the pins to the desired specific function. + + Remarks: + None. +*/ +void SYS_PORTS_Initialize(void) +{ + + /* PORT B Initialization */ + PLIB_PORTS_OpenDrainEnable(PORTS_ID_0, PORT_CHANNEL_B, SYS_PORT_B_ODC); + PLIB_PORTS_Write( PORTS_ID_0, PORT_CHANNEL_B, SYS_PORT_B_LAT); + PLIB_PORTS_DirectionOutputSet( PORTS_ID_0, PORT_CHANNEL_B, SYS_PORT_B_TRIS ^ 0xFFFF); + PLIB_PORTS_ChangeNoticePerPortTurnOn(PORTS_ID_0, PORT_CHANNEL_B); + PLIB_PORTS_ChannelModeSelect(PORTS_ID_0, PORT_CHANNEL_B, SYS_PORT_B_ANSEL ^ 0xFFFF, PORTS_PIN_MODE_DIGITAL); + PLIB_PORTS_ChannelChangeNoticeEnable(PORTS_ID_0, PORT_CHANNEL_B, SYS_PORT_B_CNEN); + PLIB_PORTS_ChannelChangeNoticePullUpEnable(PORTS_ID_0, PORT_CHANNEL_B, SYS_PORT_B_CNPU); + PLIB_PORTS_ChannelChangeNoticePullDownEnable(PORTS_ID_0, PORT_CHANNEL_B, SYS_PORT_B_CNPD); + + /* PORT C Initialization */ + PLIB_PORTS_OpenDrainEnable(PORTS_ID_0, PORT_CHANNEL_C, SYS_PORT_C_ODC); + PLIB_PORTS_Write( PORTS_ID_0, PORT_CHANNEL_C, SYS_PORT_C_LAT); + PLIB_PORTS_DirectionOutputSet( PORTS_ID_0, PORT_CHANNEL_C, SYS_PORT_C_TRIS ^ 0xFFFF); + PLIB_PORTS_ChangeNoticePerPortTurnOn(PORTS_ID_0, PORT_CHANNEL_C); + PLIB_PORTS_ChannelModeSelect(PORTS_ID_0, PORT_CHANNEL_C, SYS_PORT_C_ANSEL ^ 0xFFFF, PORTS_PIN_MODE_DIGITAL); + PLIB_PORTS_ChannelChangeNoticeEnable(PORTS_ID_0, PORT_CHANNEL_C, SYS_PORT_C_CNEN); + PLIB_PORTS_ChannelChangeNoticePullUpEnable(PORTS_ID_0, PORT_CHANNEL_C, SYS_PORT_C_CNPU); + PLIB_PORTS_ChannelChangeNoticePullDownEnable(PORTS_ID_0, PORT_CHANNEL_C, SYS_PORT_C_CNPD); + + /* PORT E Initialization */ + PLIB_PORTS_OpenDrainEnable(PORTS_ID_0, PORT_CHANNEL_E, SYS_PORT_E_ODC); + PLIB_PORTS_Write( PORTS_ID_0, PORT_CHANNEL_E, SYS_PORT_E_LAT); + PLIB_PORTS_DirectionOutputSet( PORTS_ID_0, PORT_CHANNEL_E, SYS_PORT_E_TRIS ^ 0xFFFF); + PLIB_PORTS_ChangeNoticePerPortTurnOn(PORTS_ID_0, PORT_CHANNEL_E); + PLIB_PORTS_ChannelModeSelect(PORTS_ID_0, PORT_CHANNEL_E, SYS_PORT_E_ANSEL ^ 0xFFFF, PORTS_PIN_MODE_DIGITAL); + PLIB_PORTS_ChannelChangeNoticeEnable(PORTS_ID_0, PORT_CHANNEL_E, SYS_PORT_E_CNEN); + PLIB_PORTS_ChannelChangeNoticePullUpEnable(PORTS_ID_0, PORT_CHANNEL_E, SYS_PORT_E_CNPU); + PLIB_PORTS_ChannelChangeNoticePullDownEnable(PORTS_ID_0, PORT_CHANNEL_E, SYS_PORT_E_CNPD); + + /* PORT F Initialization */ + PLIB_PORTS_OpenDrainEnable(PORTS_ID_0, PORT_CHANNEL_F, SYS_PORT_F_ODC); + PLIB_PORTS_Write( PORTS_ID_0, PORT_CHANNEL_F, SYS_PORT_F_LAT); + PLIB_PORTS_DirectionOutputSet( PORTS_ID_0, PORT_CHANNEL_F, SYS_PORT_F_TRIS ^ 0xFFFF); + PLIB_PORTS_ChangeNoticePerPortTurnOn(PORTS_ID_0, PORT_CHANNEL_F); + PLIB_PORTS_ChannelModeSelect(PORTS_ID_0, PORT_CHANNEL_F, SYS_PORT_F_ANSEL ^ 0xFFFF, PORTS_PIN_MODE_DIGITAL); + PLIB_PORTS_ChannelChangeNoticeEnable(PORTS_ID_0, PORT_CHANNEL_F, SYS_PORT_F_CNEN); + PLIB_PORTS_ChannelChangeNoticePullUpEnable(PORTS_ID_0, PORT_CHANNEL_F, SYS_PORT_F_CNPU); + PLIB_PORTS_ChannelChangeNoticePullDownEnable(PORTS_ID_0, PORT_CHANNEL_F, SYS_PORT_F_CNPD); + + + /* PPS Input Remapping */ + + /* PPS Output Remapping */ + PLIB_PORTS_RemapOutput(PORTS_ID_0, OUTPUT_FUNC_C2OUT, OUTPUT_PIN_RPB9 ); + + +} + +/****************************************************************************** + Function: + PORTS_DATA_TYPE SYS_PORTS_Read( PORTS_MODULE_ID index, PORTS_CHANNEL channel ) + + Summary: + Reads the data from the I/O port. + + Description: + This function reads the data from the I/O port. + + Remarks: + None. +*/ + +PORTS_DATA_TYPE SYS_PORTS_Read( PORTS_MODULE_ID index, PORTS_CHANNEL channel ) +{ + return PLIB_PORTS_Read( index, channel ); +} + + +/****************************************************************************** + Function: + void SYS_PORTS_Write( PORTS_MODULE_ID index, PORTS_CHANNEL channel, + PORTS_DATA_TYPE value ) + + Summary: + Writes the data from the I/O port. + + Description: + This function writes the data to the I/O port. + + Remarks: + None. +*/ + +void SYS_PORTS_Write( PORTS_MODULE_ID index, + PORTS_CHANNEL channel, + PORTS_DATA_TYPE value ) +{ + PLIB_PORTS_Write( index, channel, value ); +} + + +/****************************************************************************** + Function: + void SYS_PORTS_Set( PORTS_MODULE_ID index, PORTS_CHANNEL channel, + PORTS_DATA_TYPE value, + PORTS_DATA_MASK mask ) + + Summary: + Sets the selected digital port/latch based on the mask. + + Description: + This function sets the selected digital port/latch relative to the mask. + + Remarks: + None. +*/ + +void SYS_PORTS_Set( PORTS_MODULE_ID index, PORTS_CHANNEL channel, + PORTS_DATA_TYPE value, + PORTS_DATA_MASK mask ) +{ + PLIB_PORTS_Set( index, channel, value, mask ); +} + + +/****************************************************************************** + Function: + void SYS_PORTS_Clear ( PORTS_MODULE_ID index, PORTS_CHANNEL channel, + PORTS_DATA_MASK clearMask ) + + Summary: + Clears the selected digital port. + + Description: + This function clears the selected digital port. + + Remarks: + None. +*/ + +void SYS_PORTS_Clear ( PORTS_MODULE_ID index, PORTS_CHANNEL channel, + PORTS_DATA_MASK clearMask ) +{ + PLIB_PORTS_Clear ( index, channel, clearMask ); +} + + +/****************************************************************************** + Function: + void SYS_PORTS_DirectionSelect( PORTS_MODULE_ID index, + SYS_PORTS_PIN_DIRECTION pinDir, + PORTS_CHANNEL channel, + PORTS_DATA_MASK mask ) + Summary: + Enables the direction for the selected port. + + Description: + This function enables the direction for the selected port. + + Remarks: + None. +*/ + +void SYS_PORTS_DirectionSelect( PORTS_MODULE_ID index, + SYS_PORTS_PIN_DIRECTION pinDir, + PORTS_CHANNEL channel, + PORTS_DATA_MASK mask ) +{ + if (pinDir == SYS_PORTS_DIRECTION_INPUT) + { + PLIB_PORTS_DirectionInputSet(index, channel, mask); + } + else + { + PLIB_PORTS_DirectionOutputSet(index, channel, mask); + } +} + + +/****************************************************************************** + Function: + PORTS_DATA_MASK SYS_PORTS_DirectionGet( PORTS_MODULE_ID index, + PORTS_CHANNEL channel ) + + Summary: + Reads the port direction for the selected port. + + Description: + This function reads the port direction for the selected port. + + Remarks: + None. +*/ + +PORTS_DATA_MASK SYS_PORTS_DirectionGet( PORTS_MODULE_ID index, PORTS_CHANNEL channel ) +{ + return PLIB_PORTS_DirectionGet( index, channel ); +} + + +/****************************************************************************** + Function: + void SYS_PORTS_Toggle( PORTS_MODULE_ID index, PORTS_CHANNEL channel, + PORTS_DATA_MASK toggleMask ) + + Summary: + Toggles the selected digital port pins. + + Description: + This function toggles the selected digital port pins. + + Remarks: + None. +*/ + +void SYS_PORTS_Toggle( PORTS_MODULE_ID index, PORTS_CHANNEL channel, + PORTS_DATA_MASK toggleMask ) +{ + PLIB_PORTS_Toggle( index, channel, toggleMask ); +} + + +/****************************************************************************** + Function: + void SYS_PORTS_OpenDrainEnable( PORTS_MODULE_ID index, PORTS_CHANNEL channel, + PORTS_DATA_MASK mask ) + + Summary: + Enables the open drain functionality for the selected port. + + Description: + This function enables the open drain functionality for the selected port. + + Remarks: + None. +*/ + +void SYS_PORTS_OpenDrainEnable( PORTS_MODULE_ID index, PORTS_CHANNEL channel, + PORTS_DATA_MASK mask ) +{ +#if defined(PLIB_PORTS_ExistsPortsOpenDrain) + if(PLIB_PORTS_ExistsPortsOpenDrain(index)) + { + PLIB_PORTS_OpenDrainEnable( index, channel, mask ); + } +#endif +} + + +/****************************************************************************** + Function: + void SYS_PORTS_OpenDrainDisable( PORTS_MODULE_ID index, PORTS_CHANNEL channel, + PORTS_DATA_MASK mask ) + + Summary: + Disables the open drain functionality for the selected port. + + Description: + This function disables the open drain functionality for the selected port. + + Remarks: + None. +*/ + +void SYS_PORTS_OpenDrainDisable( PORTS_MODULE_ID index, PORTS_CHANNEL channel, + PORTS_DATA_MASK mask ) +{ +#if defined(PLIB_PORTS_ExistsPortsOpenDrain) + if(PLIB_PORTS_ExistsPortsOpenDrain(index)) + { + PLIB_PORTS_OpenDrainDisable( index, channel, mask ); + } +#endif +} + + +// ***************************************************************************** +// ***************************************************************************** +// Section: SYS Change Notification Pins Routines +// ***************************************************************************** +// ***************************************************************************** + +/****************************************************************************** + Function: + void SYS_PORTS_ChangeNotificationGlobalEnable( PORTS_MODULE_ID index ) + + Summary: + Globally enables the change notification. + + Description: + This function globally enables the change notification. + + Remarks: + None. +*/ + +void SYS_PORTS_ChangeNotificationGlobalEnable( PORTS_MODULE_ID index ) +{ +#if defined(PLIB_PORTS_ExistsChangeNotice) + if(PLIB_PORTS_ExistsChangeNotice(index)) + { + PLIB_PORTS_ChangeNoticeEnable( index ); + } +#endif +} + +/****************************************************************************** + Function: + void SYS_PORTS_ChangeNotificationGlobalDisable( PORTS_MODULE_ID index ) + + Summary: + Globally disables the change notification. + + Description: + This function globally disables the change notification. + + Remarks: + None. +*/ + +void SYS_PORTS_ChangeNotificationGlobalDisable( PORTS_MODULE_ID index ) +{ +#if defined(PLIB_PORTS_ExistsChangeNotice) + if(PLIB_PORTS_ExistsChangeNotice(index)) + { + PLIB_PORTS_ChangeNoticeDisable( index ); + } +#endif +} + +/****************************************************************************** + Function: + void SYS_PORTS_GlobalChangeNotificationDisable( PORTS_MODULE_ID index ) + + Summary: + Globally disables the change notification for the selected port. + + Description: + This function globally disables the change notification for the selected port. + + Remarks: + None. +*/ + +void SYS_PORTS_GlobalChangeNotificationDisable( PORTS_MODULE_ID index ) +{ +#if defined(PLIB_PORTS_ExistsChangeNotice) + if(PLIB_PORTS_ExistsChangeNotice(index)) + { + PLIB_PORTS_ChangeNoticeDisable( index ); + } +#endif +} + + +/****************************************************************************** + Function: + void SYS_PORTS_ChangeNotificationEnable( PORTS_MODULE_ID index, + PORTS_CHANGE_NOTICE_PIN pinNum, + SYS_PORTS_PULLUP_PULLDOWN_STATUS value ) + + Summary: + Enables the change notification for the selected port. + + Description: + This function enables the change notification for the selected port. + + Remarks: + None. +*/ + +void SYS_PORTS_ChangeNotificationEnable( PORTS_MODULE_ID index, + PORTS_CHANGE_NOTICE_PIN pinNum, + SYS_PORTS_PULLUP_PULLDOWN_STATUS value ) +{ +#if defined(PLIB_PORTS_ExistsChangeNoticePullUp) + if(PLIB_PORTS_ExistsChangeNoticePullUp(index)) + { + switch(value) + { + case SYS_PORTS_PULLUP_DISABLE: + PLIB_PORTS_ChangeNoticePullUpDisable(index, pinNum); + break; + case SYS_PORTS_PULLUP_ENABLE: + PLIB_PORTS_ChangeNoticePullUpEnable(index, pinNum); + break; + } + } +#endif + +#if defined(PLIB_PORTS_ExistsPinChangeNotice) + if(PLIB_PORTS_ExistsPinChangeNotice(index)) + { + PLIB_PORTS_PinChangeNoticeEnable( index, pinNum ); + } +#endif +} + + +/****************************************************************************** + Function: + void SYS_PORTS_ChangeNotificationDisable( PORTS_MODULE_ID index, + PORTS_CHANGE_NOTICE_PIN pinNum ) + + Summary: + Disables the change notification for the selected port. + + Description: + This function disables the change notification for the selected port. + + Remarks: + None. +*/ + +void SYS_PORTS_ChangeNotificationDisable( PORTS_MODULE_ID index, + PORTS_CHANGE_NOTICE_PIN pinNum ) +{ +#if defined(PLIB_PORTS_ExistsPinChangeNotice) + if(PLIB_PORTS_ExistsPinChangeNotice(index)) + { + PLIB_PORTS_PinChangeNoticeDisable( index, pinNum ); + } +#endif +} + + +/****************************************************************************** + Function: + void SYS_PORTS_ChangeNotificationInIdleModeEnable( PORTS_MODULE_ID index ) + + Summary: + Enables the change notification for the selected port in Sleep or Idle mode. + + Description: + This function enables the change notification for the selected port in Sleep + or Idle mode. + + Remarks: + None. +*/ + +void SYS_PORTS_ChangeNotificationInIdleModeEnable( PORTS_MODULE_ID index ) +{ +#if defined(PLIB_PORTS_ExistsChangeNoticeInIdle) + if(PLIB_PORTS_ExistsChangeNoticeInIdle(index)) + { + PLIB_PORTS_ChangeNoticeInIdleEnable( index ); + } +#endif +} + + +// ***************************************************************************** +/* Function: + void SYS_PORTS_ChangeNotificationInIdleModeDisable( PORTS_MODULE_ID index) + + Summary: + Disables the change notification for the selected port in Sleep or Idle mode. + + Description: + This function disables the change notification for the selected port in Sleep + or Idle mode. + + Remarks: + None. +*/ + +void SYS_PORTS_ChangeNotificationInIdleModeDisable( PORTS_MODULE_ID index ) +{ +#if defined(PLIB_PORTS_ExistsChangeNoticeInIdle) + if(PLIB_PORTS_ExistsChangeNoticeInIdle(index)) + { + PLIB_PORTS_ChangeNoticeInIdleDisable( index ); + } +#endif +} + + +// ***************************************************************************** +/* Function: + void SYS_PORTS_ChangeNotificationPullUpEnable ( PORTS_MODULE_ID index, + PORTS_CHANGE_NOTICE_PIN pinNum ) + + Summary: + Enables weak pull-up on change notification pin. + + Description: + This function enables weak pull-up on change notification pin. + + Remarks: + None. +*/ + +void SYS_PORTS_ChangeNotificationPullUpEnable ( PORTS_MODULE_ID index, + PORTS_CHANGE_NOTICE_PIN pinNum ) +{ +#if defined(PLIB_PORTS_ExistsChangeNoticePullUp) + if(PLIB_PORTS_ExistsChangeNoticePullUp(index)) + { + PLIB_PORTS_ChangeNoticePullUpEnable ( index, pinNum ); + } +#endif +} + + +// ***************************************************************************** +/* Function: + void SYS_PORTS_ChangeNotificationPullUpDisable ( PORTS_MODULE_ID index, + PORTS_CHANGE_NOTICE_PIN pinNum ) + + Summary: + Disables pull-up on input change. + + Description: + This function disables pull-up on input change. + + Remarks: + None. +*/ + +void SYS_PORTS_ChangeNotificationPullUpDisable ( PORTS_MODULE_ID index, + PORTS_CHANGE_NOTICE_PIN pinNum ) +{ +#if defined(PLIB_PORTS_ExistsChangeNoticePullUp) + if(PLIB_PORTS_ExistsChangeNoticePullUp(index)) + { + PLIB_PORTS_ChangeNoticePullUpDisable ( index, pinNum ); + } +#endif +} + + +// ***************************************************************************** +// ***************************************************************************** +// Section: SYS PORT PINS Control Routines +// ***************************************************************************** +// ***************************************************************************** + +// ***************************************************************************** +/* Function: + void SYS_PORTS_PinModeSelect ( PORTS_MODULE_ID index, PORTS_ANALOG_PIN pin, + PORTS_PIN_MODE mode) + + Summary: + Enables the selected pin as analog or digital. + + Description: + This function enables the selected pin as analog or digital. + + Remarks: + None. +*/ + +void SYS_PORTS_PinModeSelect ( PORTS_MODULE_ID index, PORTS_ANALOG_PIN pin, + PORTS_PIN_MODE mode) +{ +#if defined(PLIB_PORTS_ExistsPinMode) + if(PLIB_PORTS_ExistsPinMode(index)) + { + PLIB_PORTS_PinModeSelect ( index, pin, mode); + } +#endif +} + + +// ***************************************************************************** +/* Function: + void SYS_PORTS_PinWrite ( PORTS_MODULE_ID index, + PORTS_CHANNEL channel, + PORTS_BIT_POS bitPos + bool value ) + Summary: + Writes the selected digital pin. + + Description: + This function writes the selected digital pin. + + Remarks: + None. +*/ + +void SYS_PORTS_PinWrite ( PORTS_MODULE_ID index, + PORTS_CHANNEL channel, + PORTS_BIT_POS bitPos, + bool value ) +{ + PLIB_PORTS_PinWrite ( index, channel, bitPos, value ); +} + + +// ***************************************************************************** +/* Function: + bool SYS_PORTS_PinRead ( PORTS_MODULE_ID index, + PORTS_CHANNEL channel, + PORTS_BIT_POS bitPos ) + + Summary: + Reads the selected digital pin. + + Description: + This function reads the selected digital pin. + + Remarks: + None. +*/ + +bool SYS_PORTS_PinRead ( PORTS_MODULE_ID index, + PORTS_CHANNEL channel, + PORTS_BIT_POS bitPos ) +{ + return PLIB_PORTS_PinGet ( index, channel, bitPos ); +} + + +// ***************************************************************************** +/* Function: + void SYS_PORTS_PinToggle ( PORTS_MODULE_ID index, + PORTS_CHANNEL channel, + PORTS_BIT_POS bitPos ) + + Summary: + Toggles the selected digital pin. + + Description: + This function toggles the selected digital pin. + + Remarks: + None. +*/ + +void SYS_PORTS_PinToggle ( PORTS_MODULE_ID index, + PORTS_CHANNEL channel, + PORTS_BIT_POS bitPos ) +{ + PLIB_PORTS_PinToggle ( index, channel, bitPos ); +} + + +// ***************************************************************************** +/* Function: + void SYS_PORTS_PinSet( PORTS_MODULE_ID index, + PORTS_CHANNEL channel, + PORTS_BIT_POS bitPos ) + + Summary: + Sets the selected digital pin/latch. + + Description: + This function sets the selected digital pin/latch. + + Remarks: + None. +*/ + +void SYS_PORTS_PinSet( PORTS_MODULE_ID index, + PORTS_CHANNEL channel, + PORTS_BIT_POS bitPos ) +{ + PLIB_PORTS_PinSet( index, channel, bitPos ); +} + + +// ***************************************************************************** +/* Function: + void SYS_PORTS_PinClear ( PORTS_MODULE_ID index, + PORTS_CHANNEL channel, + PORTS_BIT_POS bitPos ) + + Summary: + Clears the selected digital pin. + + Description: + This function clears the selected digital pin. + + Remarks: + None. +*/ + +void SYS_PORTS_PinClear ( PORTS_MODULE_ID index, + PORTS_CHANNEL channel, + PORTS_BIT_POS bitPos ) +{ + PLIB_PORTS_PinClear ( index, channel, bitPos ); +} + + +// ***************************************************************************** +/* Function: + void SYS_PORTS_PinDirectionSelect ( PORTS_MODULE_ID index, + SYS_PORTS_PIN_DIRECTION pinDir, + PORTS_CHANNEL channel, + PORTS_BIT_POS bitPos ) + Summary: + Enables the direction for the selected pin. + + Description: + This function enables the direction for the selected pin. + + Remarks: + None. +*/ + +void SYS_PORTS_PinDirectionSelect ( PORTS_MODULE_ID index, + SYS_PORTS_PIN_DIRECTION pinDir, + PORTS_CHANNEL channel, + PORTS_BIT_POS bitPos ) +{ + if (pinDir == SYS_PORTS_DIRECTION_OUTPUT) + { + PLIB_PORTS_PinDirectionOutputSet(index, channel, bitPos); + } + else + { + PLIB_PORTS_PinDirectionInputSet(index, channel, bitPos); + } +} + + +// ***************************************************************************** +/* Function: + void SYS_PORTS_PinOpenDrainEnable ( PORTS_MODULE_ID index, + PORTS_CHANNEL channel, + PORTS_BIT_POS bitPos ) + + Summary: + Enables the open-drain functionality for the selected pin. + + Description: + This function enables the open-drain functionality for the selected pin. + + Remarks: + None. +*/ + +void SYS_PORTS_PinOpenDrainEnable ( PORTS_MODULE_ID index, + PORTS_CHANNEL channel, + PORTS_BIT_POS bitPos ) +{ +#if defined(PLIB_PORTS_ExistsPortsOpenDrain) + if(PLIB_PORTS_ExistsPortsOpenDrain(index)) + { + PLIB_PORTS_PinOpenDrainEnable ( index, channel, bitPos ); + } +#endif +} + + +// ***************************************************************************** +/* Function: + void SYS_PORTS_PinOpenDrainDisable ( PORTS_MODULE_ID index, + PORTS_CHANNEL channel, + PORTS_BIT_POS bitPos ) + + Summary: + Disables the open-drain functionality for the selected pin. + + Description: + This function disables the open-drain functionality for the selected pin. + + Remarks: + None. +*/ + +void SYS_PORTS_PinOpenDrainDisable ( PORTS_MODULE_ID index, + PORTS_CHANNEL channel, + PORTS_BIT_POS bitPos ) +{ +#if defined(PLIB_PORTS_ExistsPortsOpenDrain) + if(PLIB_PORTS_ExistsPortsOpenDrain(index)) + { + PLIB_PORTS_PinOpenDrainDisable ( index, channel, bitPos ); + } +#endif +} + + +// ***************************************************************************** +/* Function: + void SYS_PORTS_RemapInput( PORTS_MODULE_ID index, + PORTS_REMAP_INPUT_FUNCTION function, + PORTS_REMAP_INPUT_PIN remapPin ) + + Summary: + Input/Output (I/O) function remapping. + + Description: + This function controls the I/O function remapping. + + Precondition: + None. +*/ +void SYS_PORTS_RemapInput( PORTS_MODULE_ID index, + PORTS_REMAP_INPUT_FUNCTION function, + PORTS_REMAP_INPUT_PIN remapPin ) +{ +#if defined(PLIB_PORTS_ExistsRemapInput) + if(PLIB_PORTS_ExistsRemapInput(index)) + { + PLIB_DEVCON_SystemUnlock(DEVCON_ID_0); + PLIB_DEVCON_DeviceRegistersUnlock(DEVCON_ID_0, DEVCON_PPS_REGISTERS); + PLIB_PORTS_RemapInput( index, function, remapPin); + } +#endif +} + +// ***************************************************************************** +/* Function: + void SYS_PORTS_RemapOutput( PORTS_MODULE_ID index, + PORTS_REMAP_OUTPUT_FUNCTION function, + PORTS_REMAP_OUTPUT_PIN remapPin ) + + Summary: + Input/Output (I/O) function remapping. + + Description: + This function controls the I/O function remapping. + + Precondition: + None. +*/ +void SYS_PORTS_RemapOutput( PORTS_MODULE_ID index, + PORTS_REMAP_OUTPUT_FUNCTION function, + PORTS_REMAP_OUTPUT_PIN remapPin ) +{ +#if defined(PLIB_PORTS_ExistsRemapOutput) + if(PLIB_PORTS_ExistsRemapOutput(index)) + { + PLIB_DEVCON_SystemUnlock(DEVCON_ID_0); + PLIB_DEVCON_DeviceRegistersUnlock(DEVCON_ID_0, DEVCON_PPS_REGISTERS); + PLIB_PORTS_RemapOutput( index, function, remapPin); + } +#endif +} + +/******************************************************************************* + End of File +*/ diff --git a/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/rtos_hooks.c b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/rtos_hooks.c new file mode 100644 index 0000000..1716820 --- /dev/null +++ b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/rtos_hooks.c @@ -0,0 +1,124 @@ +/******************************************************************************* + System Tasks File + + File Name: + rtos_hooks.c + + Summary: + This file contains source code necessary for rtos hooks + + Description: + + Remarks: + *******************************************************************************/ + +// DOM-IGNORE-BEGIN +/******************************************************************************* +Copyright (c) 2013-2014 released Microchip Technology Inc. All rights reserved. + +Microchip licenses to you the right to use, modify, copy and distribute +Software only when embedded on a Microchip microcontroller or digital signal +controller that is integrated into your product or third party product +(pursuant to the sublicense terms in the accompanying license agreement). + +You should refer to the license agreement accompanying this Software for +additional information regarding your rights and obligations. + +SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF +MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. +IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER +CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR +OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES +INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR +CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF +SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES +(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS. + *******************************************************************************/ +// DOM-IGNORE-END +#include "FreeRTOS.h" +#include "task.h" + +/* +********************************************************************************************************* +* vApplicationStackOverflowHook() +* +* Description : Hook function called by FreeRTOS if a stack overflow happens. +* +* Argument(s) : none +* +* Return(s) : none +* +* Caller(s) : APP_StateReset() +* +* Note(s) : none. +********************************************************************************************************* +*/ +void vApplicationStackOverflowHook( TaskHandle_t pxTask, signed char *pcTaskName ) +{ + ( void ) pcTaskName; + ( void ) pxTask; + + /* Run time task stack overflow checking is performed if + configCHECK_FOR_STACK_OVERFLOW is defined to 1 or 2. This hook function is + called if a task stack overflow is detected. Note the system/interrupt + stack is not checked. */ + taskDISABLE_INTERRUPTS(); + for( ;; ); +} + +/* +********************************************************************************************************* +* vApplicationMallocFailedHook() +* +* Description : vApplicationMallocFailedHook() will only be called if +* configUSE_MALLOC_FAILED_HOOK is set to 1 in FreeRTOSConfig.h. +* It is a hook function that will get called if a call to +* pvPortMalloc() fails. pvPortMalloc() is called internally by +* the kernel whenever a task, queue, timer or semaphore is +* created. It is also called by various parts of the demo +* application. If heap_1.c or heap_2.c are used, then the size of +* the heap available to pvPortMalloc() is defined by +* configTOTAL_HEAP_SIZE in FreeRTOSConfig.h, and the +* xPortGetFreeHeapSize() API function can be used to query the +* size of free heap space that remains (although it does not +* provide information on how the remaining heap might be +* fragmented). +* +* Argument(s) : none +* +* Return(s) : none +* +* Caller(s) : APP_StateReset() +* +* Note(s) : none. +********************************************************************************************************* +*/ + +void vApplicationMallocFailedHook( void ) +{ + /* vApplicationMallocFailedHook() will only be called if + configUSE_MALLOC_FAILED_HOOK is set to 1 in FreeRTOSConfig.h. It is a hook + function that will get called if a call to pvPortMalloc() fails. + pvPortMalloc() is called internally by the kernel whenever a task, queue, + timer or semaphore is created. It is also called by various parts of the + demo application. If heap_1.c or heap_2.c are used, then the size of the + heap available to pvPortMalloc() is defined by configTOTAL_HEAP_SIZE in + FreeRTOSConfig.h, and the xPortGetFreeHeapSize() API function can be used + to query the size of free heap space that remains (although it does not + provide information on how the remaining heap might be fragmented). */ + taskDISABLE_INTERRUPTS(); + for( ;; ); +} + + + + + + + +/******************************************************************************* + End of File + */ + + diff --git a/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/system_config.h b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/system_config.h new file mode 100644 index 0000000..d42d8b1 --- /dev/null +++ b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/system_config.h @@ -0,0 +1,548 @@ +/******************************************************************************* + MPLAB Harmony System Configuration Header + + File Name: + system_config.h + + Summary: + Build-time configuration header for the system defined by this MPLAB Harmony + project. + + Description: + An MPLAB Project may have multiple configurations. This file defines the + build-time options for a single configuration. + + Remarks: + This configuration header must not define any prototypes or data + definitions (or include any files that do). It only provides macro + definitions for build-time configuration options that are not instantiated + until used by another MPLAB Harmony module or application. + + Created with MPLAB Harmony Version 1.09 +*******************************************************************************/ + +// DOM-IGNORE-BEGIN +/******************************************************************************* +Copyright (c) 2013-2015 released Microchip Technology Inc. All rights reserved. + +Microchip licenses to you the right to use, modify, copy and distribute +Software only when embedded on a Microchip microcontroller or digital signal +controller that is integrated into your product or third party product +(pursuant to the sublicense terms in the accompanying license agreement). + +You should refer to the license agreement accompanying this Software for +additional information regarding your rights and obligations. + +SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF +MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. +IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER +CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR +OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES +INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR +CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF +SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES +(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS. +*******************************************************************************/ +// DOM-IGNORE-END + +#ifndef _SYSTEM_CONFIG_H +#define _SYSTEM_CONFIG_H + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** +/* This section Includes other configuration headers necessary to completely + define this configuration. +*/ + +// DOM-IGNORE-BEGIN +#ifdef __cplusplus // Provide C++ Compatibility + +extern "C" { + +#endif +// DOM-IGNORE-END + +// ***************************************************************************** +// ***************************************************************************** +// Section: System Service Configuration +// ***************************************************************************** +// ***************************************************************************** +// ***************************************************************************** +/* Common System Service Configuration Options +*/ +#define SYS_VERSION_STR "1.09" +#define SYS_VERSION 10900 + +// ***************************************************************************** +/* Clock System Service Configuration Options +*/ +#define SYS_CLK_FREQ 200000000ul +#define SYS_CLK_BUS_PERIPHERAL_1 100000000ul +#define SYS_CLK_BUS_PERIPHERAL_2 100000000ul +#define SYS_CLK_BUS_PERIPHERAL_3 100000000ul +#define SYS_CLK_BUS_PERIPHERAL_4 100000000ul +#define SYS_CLK_BUS_PERIPHERAL_5 100000000ul +#define SYS_CLK_BUS_PERIPHERAL_7 200000000ul +#define SYS_CLK_BUS_PERIPHERAL_8 200000000ul +#define SYS_CLK_CONFIG_PRIMARY_XTAL 24000000ul +#define SYS_CLK_CONFIG_SECONDARY_XTAL 0ul + +/*** Interrupt System Service Configuration ***/ +#define SYS_INT true + +/*** Ports System Service Configuration ***/ + +#define SYS_PORT_B_ANSEL 0x1f +#define SYS_PORT_B_TRIS 0x873f +#define SYS_PORT_B_LAT 0x4000 +#define SYS_PORT_B_ODC 0x0 +#define SYS_PORT_B_CNPU 0x0 +#define SYS_PORT_B_CNPD 0x0 +#define SYS_PORT_B_CNEN 0x0 + +#define SYS_PORT_C_ANSEL 0x6000 +#define SYS_PORT_C_TRIS 0x7000 +#define SYS_PORT_C_LAT 0x0 +#define SYS_PORT_C_ODC 0x0 +#define SYS_PORT_C_CNPU 0x0 +#define SYS_PORT_C_CNPD 0x0 +#define SYS_PORT_C_CNEN 0x0 + +#define SYS_PORT_E_ANSEL 0x0 +#define SYS_PORT_E_TRIS 0xff +#define SYS_PORT_E_LAT 0x0 +#define SYS_PORT_E_ODC 0x0 +#define SYS_PORT_E_CNPU 0x0 +#define SYS_PORT_E_CNPD 0x0 +#define SYS_PORT_E_CNEN 0x0 + +#define SYS_PORT_F_ANSEL 0x0 +#define SYS_PORT_F_TRIS 0x31 +#define SYS_PORT_F_LAT 0x0 +#define SYS_PORT_F_ODC 0x0 +#define SYS_PORT_F_CNPU 0x0 +#define SYS_PORT_F_CNPD 0x0 +#define SYS_PORT_F_CNEN 0x0 +/*** Timer System Service Configuration ***/ +#define SYS_TMR_POWER_STATE SYS_MODULE_POWER_RUN_FULL +#define SYS_TMR_DRIVER_INDEX DRV_TMR_INDEX_0 +#define SYS_TMR_MAX_CLIENT_OBJECTS 5 +#define SYS_TMR_FREQUENCY 1000 +#define SYS_TMR_FREQUENCY_TOLERANCE 10 +#define SYS_TMR_UNIT_RESOLUTION 10000 +#define SYS_TMR_CLIENT_TOLERANCE 10 +#define SYS_TMR_INTERRUPT_NOTIFICATION false + + +/*** File System Service Configuration ***/ + +#define SYS_FS_MEDIA_NUMBER 1 + +#define SYS_FS_VOLUME_NUMBER (1) + +#define SYS_FS_AUTOMOUNT_ENABLE true +#define SYS_FS_MAX_FILES 25 +#define SYS_FS_MAX_FILE_SYSTEM_TYPE 1 +#define SYS_FS_MEDIA_MAX_BLOCK_SIZE 512 +#define SYS_FS_MEDIA_MANAGER_BUFFER_SIZE 2048 + + +#define SYS_FS_MEDIA_TYPE_IDX0 SYS_FS_MEDIA_TYPE_NVM +#define SYS_FS_TYPE_IDX0 MPFS2 + + + + + + + +#define SYS_FS_MEDIA_IDX0_MOUNT_NAME_VOLUME_IDX0 "/mnt/myDrive1" +#define SYS_FS_MEDIA_IDX0_DEVICE_NAME_VOLUME_IDX0 "/dev/nvma1" + +// ***************************************************************************** +/* Random System Service Configuration Options +*/ + +#define SYS_RANDOM_CRYPTO_SEED_SIZE 32 + + +// ***************************************************************************** +// ***************************************************************************** +// Section: Driver Configuration +// ***************************************************************************** +// ***************************************************************************** +/*** Timer Driver Configuration ***/ +#define DRV_TMR_INTERRUPT_MODE true +#define DRV_TMR_INSTANCES_NUMBER 1 +#define DRV_TMR_CLIENTS_NUMBER 1 + +/*** Timer Driver 0 Configuration ***/ +#define DRV_TMR_PERIPHERAL_ID_IDX0 TMR_ID_2 +#define DRV_TMR_INTERRUPT_SOURCE_IDX0 INT_SOURCE_TIMER_2 +#define DRV_TMR_INTERRUPT_VECTOR_IDX0 INT_VECTOR_T2 +#define DRV_TMR_ISR_VECTOR_IDX0 _TIMER_2_VECTOR +#define DRV_TMR_INTERRUPT_PRIORITY_IDX0 INT_PRIORITY_LEVEL1 +#define DRV_TMR_INTERRUPT_SUB_PRIORITY_IDX0 INT_SUBPRIORITY_LEVEL0 +#define DRV_TMR_CLOCK_SOURCE_IDX0 DRV_TMR_CLKSOURCE_INTERNAL +#define DRV_TMR_PRESCALE_IDX0 TMR_PRESCALE_VALUE_256 +#define DRV_TMR_OPERATION_MODE_IDX0 DRV_TMR_OPERATION_MODE_16_BIT +#define DRV_TMR_ASYNC_WRITE_ENABLE_IDX0 false +#define DRV_TMR_POWER_STATE_IDX0 SYS_MODULE_POWER_RUN_FULL + + +/*** NVM Driver Configuration ***/ + +#define DRV_NVM_INSTANCES_NUMBER 1 +#define DRV_NVM_CLIENTS_NUMBER 2 +#define DRV_NVM_BUFFER_OBJECT_NUMBER 5 + +#define DRV_NVM_INTERRUPT_MODE true +#define DRV_NVM_INTERRUPT_SOURCE INT_SOURCE_FLASH_CONTROL + +#define DRV_NVM_MEDIA_SIZE 80 +#define DRV_NVM_MEDIA_START_ADDRESS 0x9D100000 + +#define DRV_NVM_ERASE_WRITE_ENABLE + + +#define DRV_NVM_SYS_FS_REGISTER + + + +// ***************************************************************************** +// ***************************************************************************** +// Section: Middleware & Other Library Configuration +// ***************************************************************************** +// ***************************************************************************** +/*** OSAL Configuration ***/ +#define OSAL_USE_RTOS 9 + + +// ***************************************************************************** +// ***************************************************************************** +// Section: TCPIP Stack Configuration +// ***************************************************************************** +// ***************************************************************************** +#define TCPIP_STACK_USE_IPV4 +#define TCPIP_STACK_USE_TCP +#define TCPIP_STACK_USE_UDP + +#define TCPIP_STACK_TICK_RATE 5 +#define TCPIP_STACK_SECURE_PORT_ENTRIES 10 + +/* TCP/IP stack event notification */ +#define TCPIP_STACK_USE_EVENT_NOTIFICATION +#define TCPIP_STACK_USER_NOTIFICATION false +#define TCPIP_STACK_DOWN_OPERATION true +#define TCPIP_STACK_IF_UP_DOWN_OPERATION true +#define TCPIP_STACK_MAC_DOWN_OPERATION true +#define TCPIP_STACK_CONFIGURATION_SAVE_RESTORE true +/*** TCPIP Heap Configuration ***/ +#define TCPIP_STACK_USE_INTERNAL_HEAP +#define TCPIP_STACK_DRAM_SIZE 39250 +#define TCPIP_STACK_DRAM_RUN_LIMIT 2048 +#define TCPIP_STACK_MALLOC_FUNC malloc + +#define TCPIP_STACK_CALLOC_FUNC calloc + +#define TCPIP_STACK_FREE_FUNC free + + + +#define TCPIP_STACK_HEAP_USE_FLAGS TCPIP_STACK_HEAP_FLAG_ALLOC_UNCACHED + +#define TCPIP_STACK_HEAP_USAGE_CONFIG TCPIP_STACK_HEAP_USE_DEFAULT + +#define TCPIP_STACK_SUPPORTED_HEAPS 1 + +/*** ARP Configuration ***/ +#define TCPIP_ARP_CACHE_ENTRIES 5 +#define TCPIP_ARP_CACHE_DELETE_OLD true +#define TCPIP_ARP_CACHE_SOLVED_ENTRY_TMO 1200 +#define TCPIP_ARP_CACHE_PENDING_ENTRY_TMO 60 +#define TCPIP_ARP_CACHE_PENDING_RETRY_TMO 2 +#define TCPIP_ARP_CACHE_PERMANENT_QUOTA 50 +#define TCPIP_ARP_CACHE_PURGE_THRESHOLD 75 +#define TCPIP_ARP_CACHE_PURGE_QUANTA 1 +#define TCPIP_ARP_CACHE_ENTRY_RETRIES 3 +#define TCPIP_ARP_GRATUITOUS_PROBE_COUNT 1 +#define TCPIP_ARP_TASK_PROCESS_RATE 2 + +/*** DHCP Configuration ***/ +#define TCPIP_STACK_USE_DHCP_CLIENT +#define TCPIP_DHCP_TIMEOUT 10 +#define TCPIP_DHCP_TASK_TICK_RATE 5 +#define TCPIP_DHCP_HOST_NAME_SIZE 20 +#define TCPIP_DHCP_CLIENT_CONNECT_PORT 68 +#define TCPIP_DHCP_SERVER_LISTEN_PORT 67 +#define TCPIP_DHCP_CLIENT_ENABLED true + + + +/*** DNS Client Configuration ***/ +#define TCPIP_STACK_USE_DNS +#define TCPIP_DNS_CLIENT_SERVER_TMO 60 +#define TCPIP_DNS_CLIENT_TASK_PROCESS_RATE 200 +#define TCPIP_DNS_CLIENT_CACHE_ENTRIES 5 +#define TCPIP_DNS_CLIENT_CACHE_ENTRY_TMO 0 +#define TCPIP_DNS_CLIENT_CACHE_PER_IPV4_ADDRESS 5 +#define TCPIP_DNS_CLIENT_CACHE_PER_IPV6_ADDRESS 1 +#define TCPIP_DNS_CLIENT_ADDRESS_TYPE IP_ADDRESS_TYPE_IPV4 +#define TCPIP_DNS_CLIENT_CACHE_DEFAULT_TTL_VAL 1200 +#define TCPIP_DNS_CLIENT_CACHE_UNSOLVED_ENTRY_TMO 10 +#define TCPIP_DNS_CLIENT_LOOKUP_RETRY_TMO 3 +#define TCPIP_DNS_CLIENT_MAX_HOSTNAME_LEN 256 +#define TCPIP_DNS_CLIENT_MAX_SELECT_INTERFACES 4 +#define TCPIP_DNS_CLIENT_DELETE_OLD_ENTRIES true +#define TCPIP_DNS_CLIENT_USER_NOTIFICATION false + + + + + + + +/*** NBNS Configuration ***/ +#define TCPIP_STACK_USE_NBNS +#define TCPIP_NBNS_TASK_TICK_RATE 110 + + + +/*** SNTP Configuration ***/ +#define TCPIP_STACK_USE_SNTP_CLIENT +#define TCPIP_NTP_DEFAULT_IF "PIC32INT" +#define TCPIP_NTP_VERSION 4 +#define TCPIP_NTP_DEFAULT_CONNECTION_TYPE IP_ADDRESS_TYPE_IPV4 +#define TCPIP_NTP_EPOCH 2208988800ul +#define TCPIP_NTP_REPLY_TIMEOUT 6 +#define TCPIP_NTP_MAX_STRATUM 15 +#define TCPIP_NTP_TIME_STAMP_TMO 660 +#define TCPIP_NTP_SERVER "pool.ntp.org" +#define TCPIP_NTP_SERVER_MAX_LENGTH 30 +#define TCPIP_NTP_QUERY_INTERVAL 600 +#define TCPIP_NTP_FAST_QUERY_INTERVAL 14 +#define TCPIP_NTP_TASK_TICK_RATE 1100 +#define TCPIP_NTP_RX_QUEUE_LIMIT 2 + + + + +/*** TCP Configuration ***/ +#define TCPIP_TCP_MAX_SEG_SIZE_TX 1460 +#define TCPIP_TCP_MAX_SEG_SIZE_RX_LOCAL 1460 +#define TCPIP_TCP_MAX_SEG_SIZE_RX_NON_LOCAL 536 +#define TCPIP_TCP_SOCKET_DEFAULT_TX_SIZE 512 +#define TCPIP_TCP_SOCKET_DEFAULT_RX_SIZE 4096 +#define TCPIP_TCP_DYNAMIC_OPTIONS true +#define TCPIP_TCP_START_TIMEOUT_VAL 1000 +#define TCPIP_TCP_DELAYED_ACK_TIMEOUT 100 +#define TCPIP_TCP_FIN_WAIT_2_TIMEOUT 5000 +#define TCPIP_TCP_KEEP_ALIVE_TIMEOUT 10000 +#define TCPIP_TCP_CLOSE_WAIT_TIMEOUT 200 +#define TCPIP_TCP_MAX_RETRIES 5 +#define TCPIP_TCP_MAX_UNACKED_KEEP_ALIVES 6 +#define TCPIP_TCP_MAX_SYN_RETRIES 3 +#define TCPIP_TCP_AUTO_TRANSMIT_TIMEOUT_VAL 40 +#define TCPIP_TCP_WINDOW_UPDATE_TIMEOUT_VAL 200 +#define TCPIP_TCP_MAX_SOCKETS 15 +#define TCPIP_TCP_TASK_TICK_RATE 5 +#define TCPIP_TCP_MSL_TIMEOUT 0 +#define TCPIP_TCP_QUIET_TIME 0 + + +/*** TCPIP MAC Configuration ***/ +#define TCPIP_EMAC_TX_DESCRIPTORS 8 +#define TCPIP_EMAC_RX_DESCRIPTORS 10 +#define TCPIP_EMAC_RX_DEDICATED_BUFFERS 4 +#define TCPIP_EMAC_RX_INIT_BUFFERS 0 +#define TCPIP_EMAC_RX_LOW_THRESHOLD 1 +#define TCPIP_EMAC_RX_LOW_FILL 2 +#define TCPIP_EMAC_RX_BUFF_SIZE 1536 +#define TCPIP_EMAC_RX_MAX_FRAME 1536 +#define TCPIP_EMAC_RX_FILTERS \ + TCPIP_MAC_RX_FILTER_TYPE_BCAST_ACCEPT |\ + TCPIP_MAC_RX_FILTER_TYPE_MCAST_ACCEPT |\ + TCPIP_MAC_RX_FILTER_TYPE_UCAST_ACCEPT |\ + TCPIP_MAC_RX_FILTER_TYPE_RUNT_REJECT |\ + TCPIP_MAC_RX_FILTER_TYPE_CRC_ERROR_REJECT |\ + 0 +#define TCPIP_EMAC_RX_FRAGMENTS 1 +#define TCPIP_EMAC_ETH_OPEN_FLAGS \ + TCPIP_ETH_OPEN_AUTO |\ + TCPIP_ETH_OPEN_FDUPLEX |\ + TCPIP_ETH_OPEN_HDUPLEX |\ + TCPIP_ETH_OPEN_100 |\ + TCPIP_ETH_OPEN_10 |\ + TCPIP_ETH_OPEN_MDIX_SWAP |\ + TCPIP_ETH_OPEN_RMII |\ + 0 +#define TCPIP_EMAC_PHY_CONFIG_FLAGS \ + DRV_ETHPHY_CFG_RMII | \ + 0 +#define TCPIP_EMAC_PHY_LINK_INIT_DELAY 500 +#define TCPIP_EMAC_PHY_ADDRESS 0 +#define TCPIP_EMAC_MODULE_ID ETH_ID_0 +#define TCPIP_EMAC_INTERRUPT_MODE true +#define DRV_ETHPHY_INSTANCES_NUMBER 1 +#define DRV_ETHPHY_CLIENTS_NUMBER 1 +#define DRV_ETHPHY_INDEX 1 +#define DRV_ETHPHY_PERIPHERAL_ID 1 +#define DRV_ETHPHY_NEG_INIT_TMO 1 +#define DRV_ETHPHY_NEG_DONE_TMO 2000 +#define DRV_ETHPHY_RESET_CLR_TMO 500 +#define DRV_ETHMAC_INSTANCES_NUMBER 1 +#define DRV_ETHMAC_CLIENTS_NUMBER 1 +#define DRV_ETHMAC_INDEX 1 +#define DRV_ETHMAC_PERIPHERAL_ID 1 +#define DRV_ETHMAC_INTERRUPT_VECTOR INT_VECTOR_ETHERNET +#define DRV_ETHMAC_INTERRUPT_SOURCE INT_SOURCE_ETH_1 +#define DRV_ETHMAC_POWER_STATE SYS_MODULE_POWER_RUN_FULL + +#define DRV_ETHMAC_INTERRUPT_MODE true + + + +/*** UDP Configuration ***/ +#define TCPIP_UDP_MAX_SOCKETS 10 +#define TCPIP_UDP_SOCKET_DEFAULT_TX_SIZE 512 +#define TCPIP_UDP_SOCKET_DEFAULT_TX_QUEUE_LIMIT 3 +#define TCPIP_UDP_SOCKET_DEFAULT_RX_QUEUE_LIMIT 3 +#define TCPIP_UDP_USE_POOL_BUFFERS false +#define TCPIP_UDP_USE_TX_CHECKSUM true + +#define TCPIP_UDP_USE_RX_CHECKSUM true + + +/*** Network Configuration Index 0 ***/ +#define TCPIP_NETWORK_DEFAULT_INTERFACE_NAME "PIC32INT" +#define TCPIP_IF_PIC32INT +#define TCPIP_NETWORK_DEFAULT_HOST_NAME "IOT_ETHERNET" +#define TCPIP_NETWORK_DEFAULT_MAC_ADDR 0 +#define TCPIP_NETWORK_DEFAULT_IP_ADDRESS "0.0.0.0" +#define TCPIP_NETWORK_DEFAULT_IP_MASK "255.255.255.0" +#define TCPIP_NETWORK_DEFAULT_GATEWAY "192.168.100.1" +#define TCPIP_NETWORK_DEFAULT_DNS "192.168.100.1" +#define TCPIP_NETWORK_DEFAULT_SECOND_DNS "0.0.0.0" +#define TCPIP_NETWORK_DEFAULT_POWER_MODE "full" +#define TCPIP_NETWORK_DEFAULT_INTERFACE_FLAGS \ + TCPIP_NETWORK_CONFIG_DHCP_CLIENT_ON |\ + TCPIP_NETWORK_CONFIG_DNS_CLIENT_ON |\ + TCPIP_NETWORK_CONFIG_IP_STATIC +#define TCPIP_NETWORK_DEFAULT_MAC_DRIVER DRV_ETHMAC_PIC32MACObject +#define TCPIP_NETWORK_DEFAULT_IPV6_ADDRESS 0 +#define TCPIP_NETWORK_DEFAULT_IPV6_PREFIX_LENGTH 0 +#define TCPIP_NETWORK_DEFAULT_IPV6_GATEWAY 0 + + +/*** IPv4 Configuration ***/ + +/*** USB Driver Configuration ***/ + + +/* Enables Device Support */ +#define DRV_USBHS_DEVICE_SUPPORT true + +/* Disable Device Support */ +#define DRV_USBHS_HOST_SUPPORT false + +/* Maximum USB driver instances */ +#define DRV_USBHS_INSTANCES_NUMBER 1 + + +/* Interrupt mode enabled */ +#define DRV_USBHS_INTERRUPT_MODE true + + +/* Number of Endpoints used */ +#define DRV_USBHS_ENDPOINTS_NUMBER 3 + + + + +/*** USB Device Stack Configuration ***/ + + + + + + + + + + +/* The USB Device Layer will not initialize the USB Driver */ +#define USB_DEVICE_DRIVER_INITIALIZE_EXPLICIT + +/* Maximum device layer instances */ +#define USB_DEVICE_INSTANCES_NUMBER 1 + +/* EP0 size in bytes */ +#define USB_DEVICE_EP0_BUFFER_SIZE 64 + +/* Enable SOF Events */ +#define USB_DEVICE_SOF_EVENT_ENABLE + + + + + + + + + +/* Maximum instances of CDC function driver */ +#define USB_DEVICE_CDC_INSTANCES_NUMBER 1 + + + + + + + + + + +/* CDC Transfer Queue Size for both read and + write. Applicable to all instances of the + function driver */ +#define USB_DEVICE_CDC_QUEUE_DEPTH_COMBINED 1025 + + + +/*** OSAL Configuration ***/ +#define OSAL_USE_RTOS 9 + +/* MPLAB Harmony Net Presentation Layer Definitions*/ +#define NET_PRES_NUM_INSTANCE 1 +#define NET_PRES_NUM_SOCKETS 10 + + + +// ***************************************************************************** +// ***************************************************************************** +// Section: Application Configuration +// ***************************************************************************** +// ***************************************************************************** + +/*** Application Instance 0 Configuration ***/ + +/*** Application Instance 1 Configuration ***/ + +/*** Application Instance 2 Configuration ***/ + +//DOM-IGNORE-BEGIN +#ifdef __cplusplus +} +#endif +//DOM-IGNORE-END + + +#endif // _SYSTEM_CONFIG_H +/******************************************************************************* + End of File +*/ + diff --git a/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/system_definitions.h b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/system_definitions.h new file mode 100644 index 0000000..fd7d7e9 --- /dev/null +++ b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/system_definitions.h @@ -0,0 +1,154 @@ +/******************************************************************************* + System Definitions + + File Name: + system_definitions.h + + Summary: + MPLAB Harmony project system definitions. + + Description: + This file contains the system-wide prototypes and definitions for an MPLAB + Harmony project. + *******************************************************************************/ + +//DOM-IGNORE-BEGIN +/******************************************************************************* +Copyright (c) 2013-2014 released Microchip Technology Inc. All rights reserved. + +Microchip licenses to you the right to use, modify, copy and distribute +Software only when embedded on a Microchip microcontroller or digital signal +controller that is integrated into your product or third party product +(pursuant to the sublicense terms in the accompanying license agreement). + +You should refer to the license agreement accompanying this Software for +additional information regarding your rights and obligations. + +SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF +MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. +IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER +CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR +OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES +INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR +CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF +SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES +(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS. + *******************************************************************************/ +//DOM-IGNORE-END + +#ifndef _SYS_DEFINITIONS_H +#define _SYS_DEFINITIONS_H + + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** + +#include +#include +#include +#include "system/common/sys_common.h" +#include "system/common/sys_module.h" +#include "system/clk/sys_clk.h" +#include "system/clk/sys_clk_static.h" +#include "system/devcon/sys_devcon.h" +#include "system/int/sys_int.h" +#include "system/fs/sys_fs.h" +#include "system/fs/sys_fs_media_manager.h" +#include "system/random/sys_random.h" +#include "system/fs/mpfs/mpfs.h" +#include "system/tmr/sys_tmr.h" +#include "driver/adc/drv_adc_static.h" +#include "driver/tmr/drv_tmr.h" +#include "driver/cmp/drv_cmp_static.h" +#include "driver/nvm/drv_nvm.h" +#include "system/ports/sys_ports.h" +#include "driver/usb/usbhs/drv_usbhs.h" +#include "usb/usb_device.h" + + +#include "usb/usb_device_cdc.h" + +#include "tcpip/tcpip.h" +#include "driver/ethmac/drv_ethmac.h" +#include "FreeRTOS.h" +#include "task.h" +#include "net/pres/net_pres.h" +#include "net/pres/net_pres_encryptionproviderapi.h" +#include "net/pres/net_pres_transportapi.h" +#include "net/pres/net_pres_socketapi.h" +#include "app.h" +#include "app1.h" +#include "app2.h" + + +// DOM-IGNORE-BEGIN +#ifdef __cplusplus // Provide C++ Compatibility + +extern "C" { + +#endif +// DOM-IGNORE-END + +// ***************************************************************************** +// ***************************************************************************** +// Section: Type Definitions +// ***************************************************************************** +// ***************************************************************************** + +// ***************************************************************************** +/* System Objects + + Summary: + Structure holding the system's object handles + + Description: + This structure contains the object handles for all objects in the + MPLAB Harmony project's system configuration. + + Remarks: + These handles are returned from the "Initialize" functions for each module + and must be passed into the "Tasks" function for each module. +*/ + +typedef struct +{ + SYS_MODULE_OBJ sysDevcon; + SYS_MODULE_OBJ sysTmr; + SYS_MODULE_OBJ drvTmr0; + SYS_MODULE_OBJ drvNvm; + SYS_MODULE_OBJ drvUSBObject; + + SYS_MODULE_OBJ usbDevObject0; + + + SYS_MODULE_OBJ tcpip; + SYS_MODULE_OBJ netPres; + +} SYSTEM_OBJECTS; + + +// ***************************************************************************** +// ***************************************************************************** +// Section: extern declarations +// ***************************************************************************** +// ***************************************************************************** + +extern SYSTEM_OBJECTS sysObj; + + + +//DOM-IGNORE-BEGIN +#ifdef __cplusplus +} +#endif +//DOM-IGNORE-END + +#endif /* _SYS_DEFINITIONS_H */ +/******************************************************************************* + End of File +*/ + diff --git a/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/system_exceptions.c b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/system_exceptions.c new file mode 100644 index 0000000..73a2380 --- /dev/null +++ b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/system_exceptions.c @@ -0,0 +1,143 @@ +/******************************************************************************* + MPLAB Harmony Exceptions Source File + + File Name: + system_exceptions.c + + Summary: + This file contains a function which overrides the deafult _weak_ exception + handler provided by the XC32 compiler. + + Description: + This file redefines the default _weak_ exception handler with a more debug + friendly one. If an unexpected exception occurs the code will stop in a + while(1) loop. The debugger can be halted and two variables _excep_code and + _except_addr can be examined to determine the cause and address where the + exception occured. + *******************************************************************************/ + +// DOM-IGNORE-BEGIN +/******************************************************************************* +Copyright (c) 2013-2015 released Microchip Technology Inc. All rights reserved. + +Microchip licenses to you the right to use, modify, copy and distribute +Software only when embedded on a Microchip microcontroller or digital signal +controller that is integrated into your product or third party product +(pursuant to the sublicense terms in the accompanying license agreement). + +You should refer to the license agreement accompanying this Software for +additional information regarding your rights and obligations. + +SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF +MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. +IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER +CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR +OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES +INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR +CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF +SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES +(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS. + *******************************************************************************/ +// DOM-IGNORE-END + + +#include /* Defines special funciton registers, CP0 regs */ +#include "system_config.h" +#include "system_definitions.h" +#include "system/debug/sys_debug.h" + + +// ***************************************************************************** +// ***************************************************************************** +// Section: Global Data Definitions +// ***************************************************************************** +// ***************************************************************************** + +/******************************************************************************* + Exception Reason Data + + + + Remarks: + These global static items are used instead of local variables in the + _general_exception_handler function because the stack may not be available + if an exception has occured. +*/ + +/* Code identifying the cause of the exception (CP0 Cause register). */ +static unsigned int _excep_code; + +/* Address of instruction that caused the exception. */ +static unsigned int _excep_addr; + +/* Pointer to the string describing the cause of the exception. */ +static char *_cause_str; + +/* Array identifying the cause (indexed by _exception_code). */ +static char *cause[] = +{ + "Interrupt", + "Undefined", + "Undefined", + "Undefined", + "Load/fetch address error", + "Store address error", + "Instruction bus error", + "Data bus error", + "Syscall", + "Breakpoint", + "Reserved instruction", + "Coprocessor unusable", + "Arithmetic overflow", + "Trap", + "Reserved", + "Reserved", + "Reserved", + "Reserved", + "Reserved" +}; + +// + + +// ***************************************************************************** +// ***************************************************************************** +// Section: Exception Handling +// ***************************************************************************** +// ***************************************************************************** + +/******************************************************************************* + Function: + void _general_exception_handler ( void ) + + Summary: + Overrides the XC32 _weak_ _generic_exception_handler. + + Description: + This function overrides the XC32 default _weak_ _generic_exception_handler. + + Remarks: + Refer to the XC32 User's Guide for additional information. + */ + +void _general_exception_handler ( void ) +{ + /* Mask off Mask of the ExcCode Field from the Cause Register + Refer to the MIPs Software User's manual */ + _excep_code = (_CP0_GET_CAUSE() & 0x0000007C) >> 2; + _excep_addr = _CP0_GET_EPC(); + _cause_str = cause[_excep_code]; + + SYS_DEBUG_PRINT(SYS_ERROR_ERROR, "\nGeneral Exception %s (cause=%d, addr=%x).\n", + _cause_str, _excep_code, _excep_addr); + + while (1) + { + SYS_DEBUG_BreakPoint(); + } +} + +/******************************************************************************* + End of File +*/ diff --git a/software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/system_init.c b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/system_init.c similarity index 90% rename from software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/system_init.c rename to software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/system_init.c index 6432dc2..c6e2df5 100644 --- a/software/aws-iot-ethernet/firmware/src/system_config/IoT_Ethernet/system_init.c +++ b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/system_init.c @@ -107,7 +107,7 @@ SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES #pragma config PGL1WAY = ON #pragma config PMDL1WAY = ON #pragma config IOL1WAY = ON -#pragma config FUSBIDIO = ON +#pragma config FUSBIDIO = OFF /*** BF1SEQ0 ***/ @@ -263,38 +263,6 @@ static const NET_PRES_INIT_DATA netPresInitData = }; -// -/*** System Command Initialization Data ***/ - -SYS_CMD_INIT sysCmdInit = -{ - .moduleInit = {0}, - .consoleCmdIOParam = SYS_CMD_SINGLE_CHARACTER_READ_CONSOLE_IO_PARAM, -}; -// -// -/*** System Console Initialization Data ***/ - -SYS_MODULE_OBJ sysConsoleObjects[] = { SYS_MODULE_OBJ_INVALID }; - -/* Declared in console device implementation (sys_console_usb_cdc.c) */ -extern SYS_CONSOLE_DEV_DESC consUsbCdcDevDesc; - -SYS_CONSOLE_INIT consUsbInit0 = -{ - .moduleInit = {0}, - .consDevDesc = &consUsbCdcDevDesc, -}; -// -// -/*** System Debug Initialization Data ***/ - -SYS_DEBUG_INIT debugInit = -{ - .moduleInit = {0}, - .errorLevel = SYS_ERROR_FATAL -}; -// // /******************************************************************************* Device Control System Service Initialization Data @@ -309,9 +277,21 @@ const SYS_DEVCON_INIT sysDevconInit = // /*** File System Initialization Data ***/ + const SYS_FS_MEDIA_MOUNT_DATA sysfsMountTable[SYS_FS_VOLUME_NUMBER] = { - {NULL} + + { + .mountName = SYS_FS_MEDIA_IDX0_MOUNT_NAME_VOLUME_IDX0, + .devName = SYS_FS_MEDIA_IDX0_DEVICE_NAME_VOLUME_IDX0, + .mediaType = SYS_FS_MEDIA_TYPE_IDX0, + .fsType = SYS_FS_TYPE_IDX0 + }, + + + + + }; @@ -363,10 +343,6 @@ const TCPIP_ARP_MODULE_CONFIG tcpipARPInitData = }; -/*** Announce Discovery Initialization Data ***/ -const TCPIP_ANNOUNCE_MODULE_CONFIG tcpipAnnounceInitData = -{ -}; /*** UDP Sockets Initialization Data ***/ const TCPIP_UDP_MODULE_CONFIG tcpipUDPInitData = @@ -383,18 +359,6 @@ const TCPIP_TCP_MODULE_CONFIG tcpipTCPInitData = .sktRxBuffSize = TCPIP_TCP_SOCKET_DEFAULT_RX_SIZE, }; -/*** HTTP Server Initialization Data ***/ -const TCPIP_HTTP_MODULE_CONFIG tcpipHTTPInitData = -{ - .nConnections = TCPIP_HTTP_MAX_CONNECTIONS, - .nTlsConnections = TCPIP_HTTP_MAX_TLS_CONNECTIONS, - .dataLen = TCPIP_HTTP_MAX_DATA_LEN, - .sktTxBuffSize = TCPIP_HTTP_SKT_TX_BUFF_SIZE, - .sktRxBuffSize = TCPIP_HTTP_SKT_RX_BUFF_SIZE, - .tlsSktTxBuffSize = TCPIP_HTTP_TLS_SKT_TX_BUFF_SIZE, - .tlsSktRxBuffSize = TCPIP_HTTP_TLS_SKT_RX_BUFF_SIZE, - .configFlags = TCPIP_HTTP_CONFIG_FLAGS, -}; /*** SNTP Client Initialization Data ***/ @@ -410,6 +374,7 @@ const TCPIP_SNTP_MODULE_CONFIG tcpipSNTPInitData = }; + /*** DHCP client Initialization Data ***/ const TCPIP_DHCP_MODULE_CONFIG tcpipDHCPInitData = { @@ -448,10 +413,6 @@ const TCPIP_MODULE_MAC_PIC32INT_CONFIG tcpipMACPIC32INTInitData = -/*** Zeroconfig initialization data ***/ -const ZCLL_MODULE_CONFIG tcpipZCLLInitData = -{ -}; @@ -481,7 +442,7 @@ TCPIP_STACK_HEAP_INTERNAL_CONFIG tcpipHeapConfig = .heapSize = TCPIP_STACK_DRAM_SIZE, }; -TCPIP_NETWORK_CONFIG __attribute__((unused)) TCPIP_HOSTS_CONFIGURATION[] = +const TCPIP_NETWORK_CONFIG __attribute__((unused)) TCPIP_HOSTS_CONFIGURATION[] = { /*** Network Configuration Index 0 ***/ { @@ -506,14 +467,10 @@ const TCPIP_STACK_MODULE_CONFIG TCPIP_STACK_MODULE_CONFIG_TBL [] = {TCPIP_MODULE_UDP, &tcpipUDPInitData}, // TCPIP_MODULE_UDP, {TCPIP_MODULE_TCP, &tcpipTCPInitData}, // TCPIP_MODULE_TCP, {TCPIP_MODULE_DHCP_CLIENT, &tcpipDHCPInitData}, // TCPIP_MODULE_DHCP_CLIENT, - {TCPIP_MODULE_ANNOUNCE, &tcpipAnnounceInitData}, // TCPIP_MODULE_ANNOUNCE, {TCPIP_MODULE_DNS_CLIENT,&tcpipDNSClientInitData}, // TCPIP_MODULE_DNS_CLIENT, {TCPIP_MODULE_NBNS, &tcpipNBNSInitData}, // TCPIP_MODULE_NBNS {TCPIP_MODULE_SNTP, &tcpipSNTPInitData}, // TCPIP_MODULE_SNTP, - {TCPIP_MODULE_HTTP_SERVER, &tcpipHTTPInitData}, // TCPIP_MODULE_HTTP_SERVER, - {TCPIP_MODULE_ZCLL, 0}, // TCPIP_MODULE_ZCLL, - {TCPIP_MODULE_MDNS, 0}, // TCPIP_MODULE_MDNS, { TCPIP_MODULE_MANAGER, & tcpipHeapConfig }, // TCPIP_MODULE_MANAGER // MAC modules {TCPIP_MODULE_MAC_PIC32INT, &tcpipMACPIC32INTInitData}, // TCPIP_MODULE_MAC_PIC32INT @@ -541,16 +498,11 @@ const TCPIP_STACK_MODULE_CONFIG TCPIP_STACK_MODULE_CONFIG_TBL [] = * ********************************************************************/ -char hostNameTest[11] = "xxxxxx_ECM\0"; SYS_MODULE_OBJ TCPIP_STACK_Init() { TCPIP_STACK_INIT tcpipInit; - - //Modifying the host name real time to include unique mac address, may cause issues with stack - sprintf((char *)&hostNameTest, "%02X%02X%02X_IoT-E", EMAC1SA1bits.STNADDR4, EMAC1SA0bits.STNADDR5, EMAC1SA0bits.STNADDR6); - TCPIP_HOSTS_CONFIGURATION[0].hostName = hostNameTest; - + tcpipInit.moduleInit.sys.powerState = SYS_MODULE_POWER_RUN_FULL; tcpipInit.pNetConf = TCPIP_HOSTS_CONFIGURATION; tcpipInit.nNets = sizeof (TCPIP_HOSTS_CONFIGURATION) / sizeof (*TCPIP_HOSTS_CONFIGURATION); @@ -568,8 +520,8 @@ SYS_MODULE_OBJ TCPIP_STACK_Init() **************************************************/ const USB_DEVICE_CDC_INIT cdcInit0 = { - .queueSizeRead = 1, - .queueSizeWrite = 128, + .queueSizeRead = 512, + .queueSizeWrite = 512, .queueSizeSerialStateNotification = 1 }; /************************************************** @@ -601,7 +553,7 @@ const USB_DEVICE_DESCRIPTOR deviceDescriptor = 0x12, // Size of this descriptor in bytes USB_DESCRIPTOR_DEVICE, // DEVICE descriptor type 0x0200, // USB Spec Release Number in BCD format - USB_CDC_CLASS_CODE, // Class Code + USB_CDC_CLASS_CODE, // Class Code USB_CDC_SUBCLASS_CODE, // Subclass code 0x00, // Protocol code USB_DEVICE_EP0_BUFFER_SIZE, // Max packet size for EP0, see system_config.h @@ -623,7 +575,7 @@ const USB_DEVICE_QUALIFIER deviceQualifierDescriptor1 = 0x0A, // Size of this descriptor in bytes USB_DESCRIPTOR_DEVICE_QUALIFIER, // Device Qualifier Type 0x0200, // USB Specification Release number - USB_CDC_CLASS_CODE, // Class Code + USB_CDC_CLASS_CODE, // Class Code USB_CDC_SUBCLASS_CODE, // Subclass code 0x00, // Protocol code USB_DEVICE_EP0_BUFFER_SIZE, // Maximum packet size for endpoint 0 @@ -882,13 +834,13 @@ USB_DEVICE_CONFIGURATION_DESCRIPTORS_TABLE fullSpeedConfigDescSet[1] = { uint8_t bLength; // Size of this descriptor in bytes uint8_t bDscType; // STRING descriptor type - uint16_t string[22]; // String + uint16_t string[12]; // String } sd002 = { sizeof(sd002), USB_DESCRIPTOR_STRING, - {'S','i','m','p','l','e',' ','C','D','C',' ','D','e','v','i','c','e',' ','D','e','m','o'} + {'I','o','T',' ','E','t','h','e','r','n','e','t'} }; /*************************************** @@ -1008,14 +960,6 @@ void SYS_Initialize ( void* data ) /* Initialize System Services */ - /*** Command Service Initialization Code ***/ - SYS_CMD_Initialize((SYS_MODULE_INIT*)&sysCmdInit); - sysObj.sysConsole0 = SYS_CONSOLE_Initialize(SYS_CONSOLE_INDEX_0, (SYS_MODULE_INIT *)&consUsbInit0); - - - /*** Debug Service Initialization Code ***/ - sysObj.sysDebug = SYS_DEBUG_Initialize(SYS_DEBUG_INDEX_0, (SYS_MODULE_INIT*)&debugInit); - /*** File System Service Initialization Code ***/ SYS_FS_Initialize( (const void *) sysFSInit ); @@ -1042,13 +986,13 @@ void SYS_Initialize ( void* data ) SYS_ASSERT(sysObj.tcpip != SYS_MODULE_OBJ_INVALID, "TCPIP_STACK_Init Failed" ); /* Set priority of USB interrupt source */ - SYS_INT_VectorPrioritySet(INT_VECTOR_USB1, INT_PRIORITY_LEVEL4); + SYS_INT_VectorPrioritySet(INT_VECTOR_USB1, INT_PRIORITY_LEVEL1); /* Set Sub-priority of USB interrupt source */ SYS_INT_VectorSubprioritySet(INT_VECTOR_USB1, INT_SUBPRIORITY_LEVEL0); /* Set the priority of the USB DMA Interrupt */ - SYS_INT_VectorPrioritySet(INT_VECTOR_USB1_DMA, INT_PRIORITY_LEVEL4); + SYS_INT_VectorPrioritySet(INT_VECTOR_USB1_DMA, INT_PRIORITY_LEVEL1); /* Set Sub-priority of the USB DMA Interrupt */ SYS_INT_VectorSubprioritySet(INT_VECTOR_USB1_DMA, INT_SUBPRIORITY_LEVEL0); @@ -1061,6 +1005,7 @@ void SYS_Initialize ( void* data ) /* Initialize the Application */ APP_Initialize(); APP1_Initialize(); + APP2_Initialize(); } diff --git a/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/system_interrupt.c b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/system_interrupt.c new file mode 100644 index 0000000..836e4f3 --- /dev/null +++ b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/system_interrupt.c @@ -0,0 +1,142 @@ +/******************************************************************************* + System Interrupts File + + File Name: + system_interrupt.c + + Summary: + Raw ISR definitions. + + Description: + This file contains a definitions of the raw ISRs required to support the + interrupt sub-system. + + Summary: + This file contains source code for the interrupt vector functions in the + system. + + Description: + This file contains source code for the interrupt vector functions in the + system. It implements the system and part specific vector "stub" functions + from which the individual "Tasks" functions are called for any modules + executing interrupt-driven in the MPLAB Harmony system. + + Remarks: + This file requires access to the systemObjects global data structure that + contains the object handles to all MPLAB Harmony module objects executing + interrupt-driven in the system. These handles are passed into the individual + module "Tasks" functions to identify the instance of the module to maintain. + *******************************************************************************/ + +// DOM-IGNORE-BEGIN +/******************************************************************************* +Copyright (c) 2011-2014 released Microchip Technology Inc. All rights reserved. + +Microchip licenses to you the right to use, modify, copy and distribute +Software only when embedded on a Microchip microcontroller or digital signal +controller that is integrated into your product or third party product +(pursuant to the sublicense terms in the accompanying license agreement). + +You should refer to the license agreement accompanying this Software for +additional information regarding your rights and obligations. + +SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF +MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. +IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER +CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR +OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES +INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR +CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF +SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES +(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS. + *******************************************************************************/ +// DOM-IGNORE-END + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** + +#include +#include +#include "app.h" +#include "app1.h" +#include "app2.h" +#include "system_definitions.h" +#include "peripheral/cmp/plib_cmp.h" +// ***************************************************************************** +// ***************************************************************************** +// Section: System Interrupt Vector Functions +// ***************************************************************************** +// ***************************************************************************** + + + +extern APP1_DATA app1Data; + + +void IntHandlerDrvTmrInstance0(void) +{ + DRV_TMR_Tasks(sysObj.drvTmr0); +} + +void IntHandlerDrvNvm (void) + +{ + DRV_NVM_Tasks(sysObj.drvNvm); + +} + + +void IntHandlerDrvCMPInstance0(void) +{ + if(app1Data.currIsLVD){ + app1Data.currIsLVD = false; + PLIB_CMP_InterruptEventSelect(CMP_ID_2, CMP_INTERRUPT_GENERATION_HIGH_TO_LOW); + PLIB_CMP_CVREF_ValueSelect(CMP_ID_1, CMP_CVREF_VALUE_13); + } else{ + app1Data.currIsLVD = true; + PLIB_CMP_InterruptEventSelect(CMP_ID_2, CMP_INTERRUPT_GENERATION_LOW_TO_HIGH); + PLIB_CMP_CVREF_ValueSelect(CMP_ID_1, CMP_CVREF_VALUE_11); + } + PLIB_INT_SourceFlagClear(INT_ID_0, INT_SOURCE_COMPARATOR_2); +} + + + + +void IntHandlerUSBInstance0(void) +{ + DRV_USBHS_Tasks_ISR(sysObj.drvUSBObject); +} + +void IntHandlerUSBInstance0_USBDMA ( void ) +{ + DRV_USBHS_Tasks_ISR_USBDMA(sysObj.drvUSBObject); +} + + +void IntHandler_ETHMAC(void) +{ + DRV_ETHMAC_Tasks_ISR((SYS_MODULE_OBJ)0); +} + +/* This function is used by ETHMAC driver */ +bool SYS_INT_SourceRestore(INT_SOURCE src, int level) +{ + if(level) + { + SYS_INT_SourceEnable(src); + } + + return level; +} + + + +/******************************************************************************* + End of File +*/ + diff --git a/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/system_interrupt_a.S b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/system_interrupt_a.S new file mode 100644 index 0000000..3438ee8 --- /dev/null +++ b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/system_interrupt_a.S @@ -0,0 +1,184 @@ +/******************************************************************************* + System Interrupt Source File + + File Name: + sys_interrupt_a.S + + Summary: + Raw ISR definitions. + + Description: + This file contains a definitions of the raw ISRs required to support the + interrupt sub-system. +*******************************************************************************/ + +// DOM-IGNORE-BEGIN +/******************************************************************************* +Copyright (c) 2011-2014 released Microchip Technology Inc. All rights reserved. + +Microchip licenses to you the right to use, modify, copy and distribute +Software only when embedded on a Microchip microcontroller or digital signal +controller that is integrated into your product or third party product +(pursuant to the sublicense terms in the accompanying license agreement). + +You should refer to the license agreement accompanying this Software for +additional information regarding your rights and obligations. + +SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF +MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. +IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER +CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR +OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES +INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR +CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF +SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES +(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS. + *******************************************************************************/ +// DOM-IGNORE-END +/* +********************************************************************************************************* +* INCLUDES +********************************************************************************************************* +*/ +#include + + + +#include "ISR_Support.h" + + + +/* TMR Instance 0 Interrupt */ + .extern IntHandlerDrvTmrInstance0 + + .section .vector_9,code, keep + .equ __vector_dispatch_9, IntVectorDrvTmrInstance0 + .global __vector_dispatch_9 + .set nomicromips + .set noreorder + .set nomips16 + .set noat + .ent IntVectorDrvTmrInstance0 + +IntVectorDrvTmrInstance0: + portSAVE_CONTEXT + la s6, IntHandlerDrvTmrInstance0 + jalr s6 + nop + portRESTORE_CONTEXT + .end IntVectorDrvTmrInstance0 + + + +/* NVM Interrupt */ + .extern IntHandlerDrvNvm + + .section .vector_167,code, keep + .equ __vector_dispatch_167, IntVectorDrvNvm + .global __vector_dispatch_167 + .set nomicromips + .set noreorder + .set nomips16 + .set noat + .ent IntVectorDrvNvm + +IntVectorDrvNvm: + portSAVE_CONTEXT + la s6, IntHandlerDrvNvm + jalr s6 + nop + portRESTORE_CONTEXT + .end IntVectorDrvNvm + + +/* CMP Instance 0 Interrupt */ + .extern IntHandlerDrvCMPInstance0 + + .section .vector_131,code, keep + .equ __vector_dispatch_131, IntVectorDrvCMPInstance0 + .global __vector_dispatch_131 + .set nomicromips + .set noreorder + .set nomips16 + .set noat + .ent IntVectorDrvCMPInstance0 + +IntVectorDrvCMPInstance0: + portSAVE_CONTEXT + la s6, IntHandlerDrvCMPInstance0 + jalr s6 + nop + portRESTORE_CONTEXT + .end IntVectorDrvCMPInstance0 + + + +/* USB Device Interrupt */ + .extern IntHandlerUSBInstance0 + + .section .vector_132,code, keep + .equ __vector_dispatch_132, IntVectorUSBInstance0 + .global __vector_dispatch_132 + .set nomicromips + .set noreorder + .set nomips16 + .set noat + .ent IntVectorUSBInstance0 + +IntVectorUSBInstance0: + portSAVE_CONTEXT + la s6, IntHandlerUSBInstance0 + jalr s6 + nop + portRESTORE_CONTEXT + .end IntVectorUSBInstance0 + + + .extern IntHandlerUSBInstance0_USBDMA + + .section .vector_133,code, keep + .equ __vector_dispatch_133, IntVectorUSBInstance0_USBDMA + .global __vector_dispatch_133 + .set nomicromips + .set noreorder + .set nomips16 + .set noat + .ent IntVectorUSBInstance0_USBDMA + +IntVectorUSBInstance0_USBDMA: + portSAVE_CONTEXT + la s6, IntHandlerUSBInstance0_USBDMA + jalr s6 + nop + portRESTORE_CONTEXT + .end IntVectorUSBInstance0_USBDMA + + + +/* ETHMAC Interrupt */ + .extern IntHandler_ETHMAC + + .section .vector_153,code, keep + .equ __vector_dispatch_153, IntVector_ETHMAC + .global __vector_dispatch_153 + .set nomicromips + .set noreorder + .set nomips16 + .set noat + .ent IntVector_ETHMAC + +IntVector_ETHMAC: + portSAVE_CONTEXT + la s6, IntHandler_ETHMAC + jalr s6 + nop + portRESTORE_CONTEXT + .end IntVector_ETHMAC + + + +/******************************************************************************* + End of File + */ + diff --git a/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/system_tasks.c b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/system_tasks.c new file mode 100644 index 0000000..0d75a0d --- /dev/null +++ b/software/aws-iot-ethernet/firmware/src/system_config/DM990005_IoT_Ethernet/system_tasks.c @@ -0,0 +1,218 @@ +/******************************************************************************* + System Tasks File + + File Name: + system_tasks.c + + Summary: + This file contains source code necessary to maintain system's polled state + machines. + + Description: + This file contains source code necessary to maintain system's polled state + machines. It implements the "SYS_Tasks" function that calls the individual + "Tasks" functions for all the MPLAB Harmony modules in the system. + + Remarks: + This file requires access to the systemObjects global data structure that + contains the object handles to all MPLAB Harmony module objects executing + polled in the system. These handles are passed into the individual module + "Tasks" functions to identify the instance of the module to maintain. + *******************************************************************************/ + +// DOM-IGNORE-BEGIN +/******************************************************************************* +Copyright (c) 2013-2015 released Microchip Technology Inc. All rights reserved. + +Microchip licenses to you the right to use, modify, copy and distribute +Software only when embedded on a Microchip microcontroller or digital signal +controller that is integrated into your product or third party product +(pursuant to the sublicense terms in the accompanying license agreement). + +You should refer to the license agreement accompanying this Software for +additional information regarding your rights and obligations. + +SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF +MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. +IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER +CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR +OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES +INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR +CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF +SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES +(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS. + *******************************************************************************/ +// DOM-IGNORE-END + + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** + +#include "system_config.h" +#include "system_definitions.h" +#include "app.h" +#include "app1.h" +#include "app2.h" + + +// ***************************************************************************** +// ***************************************************************************** +// Section: Local Prototypes +// ***************************************************************************** +// ***************************************************************************** + + + +static void _SYS_Tasks ( void ); + +static void _APP_Tasks(void); +static void _APP1_Tasks(void); +static void _APP2_Tasks(void); + + +// ***************************************************************************** +// ***************************************************************************** +// Section: System "Tasks" Routine +// ***************************************************************************** +// ***************************************************************************** + +/******************************************************************************* + Function: + void SYS_Tasks ( void ) + + Remarks: + See prototype in system/common/sys_module.h. +*/ + +void SYS_Tasks ( void ) +{ + /* Create OS Thread for Sys Tasks. */ + xTaskCreate((TaskFunction_t) _SYS_Tasks, + "Sys Tasks", + 4096, NULL, 2, NULL); + + + /* Create OS Thread for APP Tasks. */ + xTaskCreate((TaskFunction_t) _APP_Tasks, + "APP Tasks", + 2048, NULL, 1, NULL); + + /* Create OS Thread for APP1 Tasks. */ + xTaskCreate((TaskFunction_t) _APP1_Tasks, + "APP1 Tasks", + 512, NULL, 2, NULL); + + /* Create OS Thread for APP2 Tasks. */ + xTaskCreate((TaskFunction_t) _APP2_Tasks, + "APP2 Tasks", + 2048, NULL, 2, NULL); + + /************** + * Start RTOS * + **************/ + vTaskStartScheduler(); /* This function never returns. */ +} + + +/******************************************************************************* + Function: + void _SYS_Tasks ( void ) + + Summary: + Maintains state machines of system modules. +*/ +static void _SYS_Tasks ( void) +{ + while(1) + { + /* Maintain system services */ + SYS_DEVCON_Tasks(sysObj.sysDevcon); + /* Maintain the file system state machine. */ + SYS_FS_Tasks(); + /* SYS_TMR Device layer tasks routine */ + SYS_TMR_Tasks(sysObj.sysTmr); + + /* Maintain Device Drivers */ + + /* Maintain Middleware */ + + + /* USB HS Driver Task Routine */ + DRV_USBHS_Tasks(sysObj.drvUSBObject); + + /* USB Device layer tasks routine */ + USB_DEVICE_Tasks(sysObj.usbDevObject0); + + /* Maintain the TCP/IP Stack*/ + TCPIP_STACK_Task(sysObj.tcpip); + NET_PRES_Tasks(sysObj.netPres); + + /* Task Delay */ + vTaskDelay(1 / portTICK_PERIOD_MS); + } +} + + + +/******************************************************************************* + Function: + void _APP_Tasks ( void ) + + Summary: + Maintains state machine of APP. +*/ + +static void _APP_Tasks(void) +{ + while(1) + { + APP_Tasks(); + vTaskDelay(3 / portTICK_PERIOD_MS); + } +} + + +/******************************************************************************* + Function: + void _APP1_Tasks ( void ) + + Summary: + Maintains state machine of APP1. +*/ + +static void _APP1_Tasks(void) +{ + while(1) + { + APP1_Tasks(); + vTaskDelay(10 / portTICK_PERIOD_MS); + } +} + + +/******************************************************************************* + Function: + void _APP2_Tasks ( void ) + + Summary: + Maintains state machine of APP2. +*/ + +static void _APP2_Tasks(void) +{ + while(1) + { + APP2_Tasks(); + vTaskDelay(1 / portTICK_PERIOD_MS); + } +} + + +/******************************************************************************* + End of File + */ +