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:
- 4:2304646f6ff5
- Parent:
- 3:dfed23b157e6
- Child:
- 5:e158c85c55ff
diff -r dfed23b157e6 -r 2304646f6ff5 ReceiverIR.cpp
--- a/ReceiverIR.cpp	Sat Aug 21 04:46:14 2010 +0000
+++ b/ReceiverIR.cpp	Sat Aug 21 11:01:31 2010 +0000
@@ -33,12 +33,10 @@
     return s;
 }
 
-int ReceiverIR::getData(RemoteIR::Format *format, uint8_t *buf, int bufsiz) {
+int ReceiverIR::getData(RemoteIR::Format *format, uint8_t *buf, int bitlength) {
     IRQ_DISABLE();
 
-    const int bitcount = data.bitcount;
-    const int n = bitcount / 8 + (((bitcount % 8) != 0) ? 1 : 0);
-    if (bufsiz < n) {
+    if (bitlength < data.bitcount) {
         IRQ_ENABLE();
         return -1;
     }
    