DMX512, RDM send/recv library http://mbed.org/users/okini3939/notebook/dmx512

Dependents:   dmx_test ArtNodeLED SPK-DVIMXR SPK-DMXer ... more

DMX512 send/recv library

DMX512 is protocol for lighting.

調光プロトコル DMX512 を送受信するライブラリです。

see: http://mbed.org/users/okini3939/notebook/dmx512/

LPC1114 support is thanks to Stanly Chen

Files at this revision

API Documentation at this revision

Comitter:
okini3939
Date:
Fri Sep 28 03:31:02 2012 +0000
Parent:
2:d7677060f8eb
Child:
4:dd0544c80096
Commit message:
fix reset

Changed in this revision

DMX.cpp Show annotated file Show diff for this revision Revisions of this file
DMX.h Show annotated file Show diff for this revision Revisions of this file
--- a/DMX.cpp	Wed Sep 26 13:17:01 2012 +0000
+++ b/DMX.cpp	Fri Sep 28 03:31:02 2012 +0000
@@ -162,3 +162,12 @@
     }
 }
 
+void DMX::reset () {
+    dmx.attach(0, Serial::TxIrq);
+    timeout01.detach();
+    mode_tx = DMX_MODE_BEGIN;
+//    mode_rx = DMX_MODE_BEGIN;
+//    is_recived = 0;
+    is_sent = 0;
+    timeout01.attach_us(this, &DMX::int_timer, DMX_TIME_BETWEEN);
+}
--- a/DMX.h	Wed Sep 26 13:17:01 2012 +0000
+++ b/DMX.h	Fri Sep 28 03:31:02 2012 +0000
@@ -51,6 +51,8 @@
      */
     int get (int ch);
 
+    void reset ();
+
     volatile int is_recived, is_sent;
 
 protected: