SMPTE timedode (LTC) decode library for mbed
SMPTE timedode (LTC) decode library
SMPTEタイムコードをデコード(受信)・エンコード(送信)するライブラリです。
平衡/不平衡/サウンド等によるLTC信号は、適当な回路で整形して入力してください。
出力は適当なドライバ回路を設けてください。
簡易的なプログラムのため、細かいフラグなどは無視しています。
LPC1768 専用、Timer 2 を占有します。
Sample
Import programLTC_SMPTE_sample
SMPTE timedode (LTC) decode library for mbed https://developer.mbed.org/users/okini3939/code/LTC_SMPTE/
LTC_SMPTE.h
- Committer:
- okini3939
- Date:
- 2015-11-16
- Revision:
- 0:8d19e2158eb4
- Child:
- 1:63ceee4bfd05
File content as of revision 0:8d19e2158eb4:
/** * SMPTE timedode (LTC) decode library for mbed * Copyright (c) 2015 Suga * Released under the MIT License: http://mbed.org/license/mit */ /** @file * @brief SMPTE timedode (LTC) decode library for mbed */ #ifndef _LTC_SMPTE_H_ #define _LTC_SMPTE_H_ #include "mbed.h" class LTC_SMPTE { public: LTC_SMPTE (PinName input); void read (int *hour, int *min, int *sec, int *frame, int *dir = NULL); int isReceived (); protected: InterruptIn _input; Timer _timer; int mode; int oneflg; int count; int bit; char code[10]; int hour, min, sec, frame; int drop, direction; int received; void isr_change (); void parse_code (); }; #endif