![](/media/cache/profiles/f095cedd23b99f1696fc8caecbcf257e.jpg.50x50_q85.jpg)
SMPTE timedode (LTC) decode library for mbed https://developer.mbed.org/users/okini3939/code/LTC_SMPTE/
Revision 1:856bd5072ca0, committed 2018-04-13
- Comitter:
- okini3939
- Date:
- Fri Apr 13 04:09:09 2018 +0000
- Parent:
- 0:2af25457a32f
- Commit message:
- supported LTC output
Changed in this revision
LTC_SMPTE.lib | Show annotated file Show diff for this revision Revisions of this file |
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 2af25457a32f -r 856bd5072ca0 LTC_SMPTE.lib --- a/LTC_SMPTE.lib Mon Nov 16 12:52:27 2015 +0000 +++ b/LTC_SMPTE.lib Fri Apr 13 04:09:09 2018 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/users/okini3939/code/LTC_SMPTE/#8d19e2158eb4 +https://developer.mbed.org/users/okini3939/code/LTC_SMPTE/#63ceee4bfd05
diff -r 2af25457a32f -r 856bd5072ca0 main.cpp --- a/main.cpp Mon Nov 16 12:52:27 2015 +0000 +++ b/main.cpp Fri Apr 13 04:09:09 2018 +0000 @@ -3,7 +3,9 @@ DigitalOut led1(LED1), led2(LED2); Serial pc(USBTX, USBRX); -LTC_SMPTE ltc(p21); // LPC1768 + +LTC_SMPTE ltc(p21, LTC_SMPTE::LTC_INPUT); // input +//LTC_SMPTE ltc(p22, LTC_SMPTE::LTC_OUTPUT); // output int main() { pc.baud(115200); @@ -11,6 +13,7 @@ led1 = 1; led2 = 0; + // input while(1) { if (ltc.isReceived()) { int hour, min, sec, frame; @@ -19,4 +22,15 @@ led2 = !led2; } } +/* + // output + ltc.write(0, 0, 0, 0); + while (1) { + int hour, min, sec, frame; + ltc.read(&hour, &min, &sec, &frame); + pc.printf("%d %d %d %d\r\n", hour, min, sec, frame); + led2 = !led2; + wait(1); + } +*/ }