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.
Diff: transmitter.c
- Revision:
- 0:ed169b9ebb06
diff -r 000000000000 -r ed169b9ebb06 transmitter.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/transmitter.c Sat Oct 18 03:57:42 2014 +0000
@@ -0,0 +1,29 @@
+#include "transmitter.h"
+
+#define PULSE_WIDTH 1000
+#define ONE_DELAY 10000
+#define ZERO_DELAY 40000
+
+
+/*
+void transmit_bit(char c) {
+ int i;
+ for (i = 0; i < 8; i++) {
+ myled = 1;
+ wait_us(PULSE_WIDTH);
+ myled = 0;
+ if (c & 0x1) {
+ wait_us(ONE_DELAY);
+ } else {
+ wait_us(ZERO_DELAY);
+ }
+ c >>= 1;
+ }
+}
+
+void transmit(char * data, unsigned int size) {
+ int i;
+ for (i = 0; i < size; i++) {
+ transmit_bit(data[i]);
+ }
+}*/
\ No newline at end of file