Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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 |
--- 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
--- 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);
+ }
+*/
}