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.
transmitter.c
- Committer:
- ststanko
- Date:
- 2014-10-18
- Revision:
- 0:ed169b9ebb06
File content as of revision 0:ed169b9ebb06:
#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]);
}
}*/