Upgrade to Pro — share decks privately, control downloads, hide ads and more …

FLL

B4bd460c2e559d6c151c0541f2d3f719?s=47 Shohei Yasutake
February 20, 2015
1.3k

 FLL

B4bd460c2e559d6c151c0541f2d3f719?s=128

Shohei Yasutake

February 20, 2015
Tweet

Transcript

  1. NCFE͔Β14Λૢ࡞͢Δ ιϑτ΢ΣΞฤ

  2. '--'SBNF-FWFM-BOHVBHF ɾ'--͸NCFE͔Β1414ίϯτϩʔϥʔΛૢ࡞͢ Δ$ ͷϥΠϒϥϦ  ϘλϯೖྗετϦʔϜΛߏங͢Δ෦෼  14ʹͲͷϘλϯ͕ԡ͞Ε͍ͯΔ͔Λ఻͑Δ෦෼

  3. w 4PVSDFετϦʔϜͷ࢝఺ w ্ྲྀ͸ͳ͘ɺԼྲྀʹྲྀ͚ͩ͢ w 'MPXετϦʔϜͷม׵ w ্ྲྀ͔ΒྲྀΕ͖ͯͨϘλϯೖྗʹରͯ͠ Կ͔ม׵ͯ͠Լྲྀʹྲྀ͢ w

    4JOLετϦʔϜͷऴ୺ w ্ྲྀ͔Β࣍ͷϘλϯΛҾͬுͬͯ͘Δ 1VMMܕετϦʔϜ ϘλϯೖྗετϦʔϜ
  4. 1SPEVDFS w 4PVSDFͱ'MPXͷ਌Ϋϥε +BWBͩͱΠϯλʔ ϑΣʔε  w ஋ΛྲྀͤΔ΋ͷ 4JOLҎ֎ ͸͢΂ͯ͜ͷΫϥεͷ

    αϒΫϥε w ͜ͷΫϥεͷαϒΫϥεͰ͋Ε͹ͳΜͰ΋ετϦʔ Ϝͷ෦඼ͱͯ͠࢖͑Δ
  5. 4PVSDF'MPXͷྫ w 0OFUJNF4PVSDF w ϑϨʔϜ͝ͱʹͲͷϘλϯ͕ԡ͞Ε ͍ͯΔ͔ɺͷ഑ྻΛड͚औͬͯҰ౓ͩ ͚Լྲྀʹྲྀ͢ w 3FQFBUFS4PVSDF w

    0OFUJNF4PVSDFͷແݶʹ܁Γฦ͢൛ w &BTZ4PVSDF w ਓؒʹͱͬͯΘ͔Γ΍͍͢ܗͰॻ͚Δ ͦͷ୅ΘΓϑϨʔϜϨϕϧͰਖ਼֬ͳ ೖྗ͸Ͱ͖ͳ͍ w .FSHF'MPX w ෳ਺ͷετϦʔϜ͔ΒΛϘλϯΛड͚औͬͯɺ ͦΕΒΛಉ࣌ԡ͢͠Δ w 4FRVFOUJBM'MPX w ෳ਺ͷετϦʔϜΛॱʑʹྲྀ͢ w %FMBZ'MPX w ্ྲྀ͔ΒྲྀΕͯ͘ΔϘλϯೖྗΛ/ඵ஗Ԇ ͤ͞Δ w 3FQFBUFS'MPX w ্ྲྀ͔ΒྲྀΕͯ͘ΔϘλϯೖྗΛແݶʹ܁Γ ฦ͢ ྲྀΕऴΘͬͨΒ࠷ॳ͔Β࠶ੜ શ෦1SPEVDFSͷαϒΫϥεʹͳ͍ͬͯΔ
  6. ͲͷϘλϯ͕ԡ͞Ε͍ͯΔ͔Λ఻͑Δ෦෼ w 4JOL͸্ྲྀ͔ΒϘλϯ৘ใΛͭड͚औͬͯrtos::Mail ܦ༝Ͱ Output ʹ౉ ͍ͯ͘͠ w όοΫάϥ΢ϯυͰXIJMFMPPQͯ͠Δ w

    0VUQVU͸ϝʔϧΛ։͚ͯίϯτϩʔϥʔʹͲͷϘλϯ͕ԡ͞Ε͍ͯΔ͔Λ఻͑Δ w TFD͝ͱʹਖ਼֬ʹ࣮ߦ͞ΕΔඞཁ͕͋Δ w 4JOLͱ0VUQVU͕෼͔Ε͍ͯΔͷ͸ɺ্ྲྀ͔ΒϘλϯೖྗΛಘΔͷʹ͕͔࣌ؒ ͔ΔՄೳੑ͕͋ΔͨΊɻ0VUQVU͸ϝʔϧΛ։͘ॲཧ͚ͩʹͯ͠λΠϛϯά͕ ·͹ΒʹͳΒͳ͍Α͏ʹ͢Δɻ rtos::Thread rtos::Mail mbed::Ticker
  7. ࢖͍ํ w جຊతʹετϦʔϜΛ࡞Δ͚ͩ  4PVSDFΛ࡞Δ  ࡞ͬͨ4PVSDFΛ'MPXͰ૊Έ߹ΘͤΔ  ࣮ߦ

  8. ྫଠޑͷୡਓແݶࣗಈϑϧίϯϘ JOpOJUFMPPQ ۂΛ࢝ΊΔ ේ໘Λԋ૗ ۂ͕࢝·͔ͬͯΒ ේ໘͕࢝·Δ·Ͱͷ࣌ؒ଴ͭ ݁Ռͷը໘͔ΒۂΛ࢝ΊΔ ௚લ·Ͱ໭Δ ۂΛ࢝Ίͯɺේ໘͕࢝·Δ·Ͱ଴ͬͯɺ ԋ૗ͯ͠ɺ͸͡Ίʹ໭Δɺͱ͍͏ͷΛॱ൪ʹߦ͏

    Ҏ্Λແݶϧʔϓ
  9. #include "mbed.h" #include "rtos.h" #include "fll.h" #include "fllaux.h" #include "taiko.h"

    #define SIZEOF(arr) (sizeof(arr) / sizeof(arr[0])) int main(void) { note don1 = { Don, 1 }; note don05 = { Don, 0.5 }; ... note kadai1 = { KaDai, 1 }; button_t go_bs[] = { CIRCLE, CIRCLE }; Producer* go = new OnetimeSource(go_bs, SIZEOF(go_bs)); note* note_seq[] = { &un1, &un1, &un1, &un1, ..., &dondai05, &dondai05 }; Producer* taiko = new TaikoSource(note_seq, SIZEOF(note_seq), 200); Producer* delayed_taiko = new DelayFlow(taiko, 9.068); button_time menu_bs[] = { space(40), single(CIRCLE), space(3), single(CIRCLE), space(4) }; Producer* back = new EasySource(menu_bs, SIZEOF(menu_bs)); Producer* src_seq[] = { go, delayed_taiko, back }; Producer* oneset = new SequentialFlow(src_seq, SIZEOF(src_seq)); Producer* source = new RepeaterFlow(oneset); FLL fll(source); fll.run(); } 4PVSDFΛ࡞Δ 4PVSDFΛ૊Έ߹ΘͤΔ ࣮ߦ
  10. w '-- w IUUQEFWFMPQFSNCFEPSHVTFSTBNVUBLF DPEFqM w 5BJLPOP5BUTVKJOGVMMDPNCPFYBNQMF w IUUQEFWFMPQFSNCFEPSHVTFSTBNVUBLF DPEFLPJCVNJ

    5IBOLZPV