forked from http://developer.mbed.org/users/segundo/code/AvailableMemory/
Dependents: Utility_AvailableMemory_blinky
Fork of AvailableMemory by
AvailableMemory.h@6:e94f3a11bad7, 2010-11-07 (annotated)
- Committer:
- segundo
- Date:
- Sun Nov 07 21:26:38 2010 +0000
- Revision:
- 6:e94f3a11bad7
- Parent:
- 5:45826003052b
- Child:
- 7:b4a90cb19332
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
segundo | 6:e94f3a11bad7 | 1 | /** \file |
segundo | 4:be8247f802ad | 2 | * Return the available memory for a malloc call |
segundo | 3:9092256004a5 | 3 | */ |
segundo | 0:a98bf0c96bf1 | 4 | #ifndef SEGUNDO_UTILITIES_AVAILABLEMEMORY_H |
segundo | 0:a98bf0c96bf1 | 5 | #define SEGUNDO_UTILITIES_AVAILABLEMEMORY_H |
segundo | 6:e94f3a11bad7 | 6 | |
segundo | 6:e94f3a11bad7 | 7 | /** @fn const char *Test::member(char c,int n) |
segundo | 5:45826003052b | 8 | * @brief A member function. |
segundo | 5:45826003052b | 9 | * @param c a character. |
segundo | 5:45826003052b | 10 | * @param n an integer. |
segundo | 5:45826003052b | 11 | * @exception std::out_of_range parameter is out of range. |
segundo | 5:45826003052b | 12 | * @return a character pointer. |
segundo | 5:45826003052b | 13 | */ |
segundo | 5:45826003052b | 14 | |
segundo | 6:e94f3a11bad7 | 15 | ///Ethernet network interface return codes |
segundo | 6:e94f3a11bad7 | 16 | enum EthernetErr { |
segundo | 6:e94f3a11bad7 | 17 | __ETH_MIN = -0xFFFF, |
segundo | 6:e94f3a11bad7 | 18 | ETH_TIMEOUT, ///<Timeout during setup |
segundo | 6:e94f3a11bad7 | 19 | ETH_OK = 0 ///<Success |
segundo | 6:e94f3a11bad7 | 20 | }; |
segundo | 6:e94f3a11bad7 | 21 | |
segundo | 0:a98bf0c96bf1 | 22 | namespace segundo { |
segundo | 0:a98bf0c96bf1 | 23 | namespace Utilities { |
segundo | 0:a98bf0c96bf1 | 24 | |
segundo | 1:d8432d8a5b6d | 25 | /** Return the available memory for a malloc call (to the nearest 256 bytes) |
segundo | 1:d8432d8a5b6d | 26 | */ |
segundo | 0:a98bf0c96bf1 | 27 | int AvailableMemory(); |
segundo | 1:d8432d8a5b6d | 28 | |
segundo | 1:d8432d8a5b6d | 29 | /** Return the available memory for a malloc call |
segundo | 1:d8432d8a5b6d | 30 | * |
segundo | 1:d8432d8a5b6d | 31 | * @param resolution A normalised number 0.0-1.0 to represent the full range. |
segundo | 1:d8432d8a5b6d | 32 | * @param maximum A normalised number 0.0-1.0 to represent the full range. |
segundo | 1:d8432d8a5b6d | 33 | * @param disableInterrupts A normalised number 0.0-1.0 to represent the full range. |
segundo | 1:d8432d8a5b6d | 34 | */ |
segundo | 0:a98bf0c96bf1 | 35 | int AvailableMemory(int resolution, int maximum, bool disableInterrupts); |
segundo | 0:a98bf0c96bf1 | 36 | |
segundo | 0:a98bf0c96bf1 | 37 | } // namespace Utilities |
segundo | 0:a98bf0c96bf1 | 38 | } // namespace segundo |
segundo | 0:a98bf0c96bf1 | 39 | |
segundo | 0:a98bf0c96bf1 | 40 | using namespace segundo::Utilities; |
segundo | 0:a98bf0c96bf1 | 41 | |
segundo | 0:a98bf0c96bf1 | 42 | #endif // SEGUNDO_UTILITIES_AVAILABLEMEMORY_H |