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.
Fork of RemoteIR by
Diff: ReceiverIR.cpp
- Revision:
- 6:e57504fc802e
- Parent:
- 5:e158c85c55ff
- Child:
- 7:9452ba065449
--- a/ReceiverIR.cpp Sat Aug 21 11:02:58 2010 +0000
+++ b/ReceiverIR.cpp Sat Aug 21 11:04:54 2010 +0000
@@ -36,12 +36,12 @@
int ReceiverIR::getData(RemoteIR::Format *format, uint8_t *buf, int bitlength) {
IRQ_DISABLE();
- const int nbytes = bitcount / 8 + (((bitcount % 8) != 0) ? 1 : 0);
if (bitlength < data.bitcount) {
IRQ_ENABLE();
return -1;
}
+ const int nbytes = data.bitcount / 8 + (((data.bitcount % 8) != 0) ? 1 : 0);
*format = data.format;
for (int i = 0; i < nbytes; i++) {
buf[i] = data.buffer[i];
