From 9d8d9d65ad83acf1326f528375fcf3bfbf399a17 Mon Sep 17 00:00:00 2001 From: Adam Greenwood-Byrne Date: Mon, 15 Feb 2021 09:19:13 +0000 Subject: [PATCH] Fixed advertising issue with part7 --- .DS_Store | Bin 0 -> 10244 bytes part7-bluetooth/bt.c | 2 +- part7-bluetooth/io.h | 1 - part7-bluetooth/kernel.c | 3 +++ 4 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..d6036125f2ba14bf1a2f738f7071284dad91ebcc GIT binary patch literal 10244 zcmeHMYit}>6+YkCNoSHtJTXp_Y&zL>-8`B)iJdr(4RN!6#IfTfPGdWMrL}jxlX#l- zj=M8!Cvj6;5aQ7kAp})v5ha3($B&9fX+fyG1f_sb1w=#%0tF~)#p?%!LQq>cGk12I zU2jNK1(c#0YwnqQ?mcJbp8d}K?!6`=v}6*sL=hsA`F5qIa#7@R+ueK4CHWe+5o}Mi zjW$r6l9VB1PVYbwL?DPj5P={9K?H&bTn`ao&UP<(p^!ltL?DPj5P@6--1#BGw=1K* zoE6fWI=Jw*04z&c?OpuL`vA`-;>)NnXNB}k*{9e&z&C}z#egv9_K4e^Wz?6mLJD(& zFemtLhQC9B_jb06c-;w6A%ilAKoEhs5pdI{j3y~YX>#)R?+#h~=g@e3+MbLjtvL7m zL3}c4+D=W)Sx6fmbMMLfJ|;#Af41Nu=3kF+^$NpI+EcA!*d;5o z!#=A9rSS&e~ zNyZ$bIhk}jv#!h@OIyk0e#nN{jV92)8POIl^MAI_1all|-=9JOK z9@$m7`?l^$*NuJ9NZTx{qBUa7$`gy1-Bh`H{ieFcrk3`u?lWcDl5({|y|I7Fw9Rg`y6wT0&-OrY*o>9;?WDCqPZ-m(;8}ER_mq1oL~3TDSC{a zq-W?G^ke!t{fb_oKhs6}C%s0mqXa6JVi}fW1#U(aR$~peU^|*{J9eW7y*P+|9D;$v z7>9`zrg01>FoXN?0X%>Q@j*O<$M8v<#^>>6Jc+09G@ixtIEVB21zy1K@FHHq%Xk&9 z;dM!qR!AXfrLqHg_V9d!(R??K!od_H`Z#0y-FOe)i}&IE_%J?#k9xR1jZfjzcpOjQ3-}_w zgstJxM5@=R^#w$#H>&TLL!^3z zx}%Ut^%lLYD3S8e+ADQEk4QtySCs2r`rbk!_4RiYB~rh!?=nOh9lyXyN0cMd9JPAW z=NoGrZ~ECxZM26*c_}+X57NVQnu+x(dYYc4=jkl{l3t|0(984+{heOLJf4P@LT5r< zhg-3pX|)dZ*oHQqi1wkIr=bMX>Jg^Z37&$cy(#FO-t_YTPVp49gv2lQOWeiM>&GM zQ`EDibT>a;ZQf;R_R->b7jECx(YgCN&bvZ><@|d~^Xo$9SD#%Q8uQq-=~8xWZh3=U zuMOaTNI#=<^lSPP1O8tqg~BVyO02~O2KWv%Gst%`?{?!3Zw=XpyD*A4#u)Mwuy7C3 zuyHT$!z`~O-^J_5Q@oOV2oK{C5B85U=s%0kG2e>yvEZ^cc1#sSz1+tL%?bX7$ zfOqrV1hs1sffC^);-3HSy!`+Fuf?kZA3+3y2wbNTKxtb~TMK_&c9UQDof0b|e2?<& zUT(ixAw3f=+%B%(JC5gyd#>o6eX!0yhw|E^e!p2EJ#)76%vp-l{Qvqt1K#98TH*R6 T*#En~qBz?M_Wy6K{r|rKG}x(L literal 0 HcmV?d00001 diff --git a/part7-bluetooth/bt.c b/part7-bluetooth/bt.c index a8b3add..d43783a 100644 --- a/part7-bluetooth/bt.c +++ b/part7-bluetooth/bt.c @@ -275,7 +275,7 @@ void setLEadvertparameters(unsigned char type, unsigned char linterval_min, unsi } void setLEadvertdata() { - volatile unsigned char command[32] = { + static unsigned char command[32] = { 0x19, 0x02, 0x01, 0x06, 0x03, 0x03, 0xAA, 0xFE, diff --git a/part7-bluetooth/io.h b/part7-bluetooth/io.h index b2f483e..8547cc0 100644 --- a/part7-bluetooth/io.h +++ b/part7-bluetooth/io.h @@ -1,5 +1,4 @@ #define PERIPHERAL_BASE 0xFE000000 -#define SAFE_ADDRESS 0x00210000 // Somewhere safe to store a lot of data void uart_init(); void uart_writeText(char *buffer); diff --git a/part7-bluetooth/kernel.c b/part7-bluetooth/kernel.c index dafe34a..2ee5526 100644 --- a/part7-bluetooth/kernel.c +++ b/part7-bluetooth/kernel.c @@ -257,6 +257,9 @@ void main() for (int c=5;c>=0;c--) debugch(local_addr[c]); debugcrlf(); + // Test out the advertising + // run_eddystone(); + // Test out the scanning run_search(); }