local fix version of myBlueUSB (http://mbed.org/users/networker/code/myBlueUSB/). - merge deleted files which are required to compile. - enable echo back of received data via RFCOMM.

Dependencies:   AvailableMemory FatFileSystem mbed myUSBHost

Committer:
nobukuma
Date:
Sat Dec 07 14:19:00 2013 +0000
Revision:
0:003889bc474f
http://mbed.org/users/networker/code/myBlueUSB/ rev13??rev12??????????

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nobukuma 0:003889bc474f 1 /** @file
nobukuma 0:003889bc474f 2 * Return the memory available for a malloc call.
nobukuma 0:003889bc474f 3 */
nobukuma 0:003889bc474f 4 #ifndef SEGUNDO_UTILITIES_AVAILABLEMEMORY_H
nobukuma 0:003889bc474f 5 #define SEGUNDO_UTILITIES_AVAILABLEMEMORY_H
nobukuma 0:003889bc474f 6
nobukuma 0:003889bc474f 7 /**
nobukuma 0:003889bc474f 8 * Segundo Equipo
nobukuma 0:003889bc474f 9 */
nobukuma 0:003889bc474f 10 namespace segundo {
nobukuma 0:003889bc474f 11 /**
nobukuma 0:003889bc474f 12 * A collection of utilities
nobukuma 0:003889bc474f 13 */
nobukuma 0:003889bc474f 14 namespace Utilities {
nobukuma 0:003889bc474f 15
nobukuma 0:003889bc474f 16 /** Return the memory available for a malloc call.
nobukuma 0:003889bc474f 17 * This is done by a binary search approach
nobukuma 0:003889bc474f 18 * calling malloc/free starting with a maximum.
nobukuma 0:003889bc474f 19 *
nobukuma 0:003889bc474f 20 * Example:
nobukuma 0:003889bc474f 21 * @code
nobukuma 0:003889bc474f 22 * #include <stdio.h>
nobukuma 0:003889bc474f 23 * #include "AvailableMemory.h"
nobukuma 0:003889bc474f 24 *
nobukuma 0:003889bc474f 25 * int main() {
nobukuma 0:003889bc474f 26 *
nobukuma 0:003889bc474f 27 * printf("Available memory (bytes to nearest 256) : %d\n", AvailableMemory());
nobukuma 0:003889bc474f 28 * printf("Available memory (exact bytes) : %d\n", AvailableMemory(1));
nobukuma 0:003889bc474f 29 *
nobukuma 0:003889bc474f 30 * }
nobukuma 0:003889bc474f 31 * @endcode
nobukuma 0:003889bc474f 32 * @param resolution Resolution in number of bytes,
nobukuma 0:003889bc474f 33 * 1 will return the exact value,
nobukuma 0:003889bc474f 34 * default will return the available memory to the nearest 256 bytes
nobukuma 0:003889bc474f 35 * @param maximum Maximum amount of memory to check, default is 32K (0x8000)
nobukuma 0:003889bc474f 36 * @param disableInterrupts Disable interrupts whilst checking, default is true
nobukuma 0:003889bc474f 37 * @return Available memory in bytes accurate to within resolution
nobukuma 0:003889bc474f 38 */
nobukuma 0:003889bc474f 39 int AvailableMemory(int resolution = 256, int maximum = 0x8000, bool disableInterrupts = true);
nobukuma 0:003889bc474f 40
nobukuma 0:003889bc474f 41 } // namespace Utilities
nobukuma 0:003889bc474f 42 } // namespace segundo
nobukuma 0:003889bc474f 43
nobukuma 0:003889bc474f 44 using namespace segundo::Utilities;
nobukuma 0:003889bc474f 45
nobukuma 0:003889bc474f 46 #endif // SEGUNDO_UTILITIES_AVAILABLEMEMORY_H