ARDUINO MEGA Functions Miscellaneous
| Line 1: | Line 1: | ||
{{DISPLAYTITLE:2560 (MEGA) Miscellaneous Functions}} | {{DISPLAYTITLE:2560 (MEGA) Miscellaneous Functions}} | ||
| − | <yambe:breadcrumb self=2560 (MEGA) Miscellaneous Functions>ARDUINO_MEGA_Functions_and_Variables|Functions and Variables</yambe:breadcrumb> | + | <yambe:breadcrumb self="2560 (MEGA) Miscellaneous Functions">ARDUINO_MEGA_Functions_and_Variables|Functions and Variables</yambe:breadcrumb> |
<br /> | <br /> | ||
Revision as of 13:37, 11 May 2012
ARDUINO → Functions and Variables → 2560 (MEGA) Miscellaneous Functions
|
| |||||||
memcpy
| void memcpy(void &pToBuffer, const void &pFromBuffer, const short nNumbOfBytes) | ||||||||||||
| (void) Function copies characters from pFromBuffer to pToBuffer. nBytesToCopy is the number of bytes to copy. Identical to the function found in conventional C 'string.h' library. | ||||||||||||
| ||||||||||||
|
memset
| void memset(void &pToBuffer, const short nValue, const short nNumbOfBytes) | ||||||||||||
| (void) Sets a block of memory at pToBuffer to the value nValue. nNumbOfBytes is the number of bytes to set. This is a useful function for initializing the value of an array to all zeros. Identical to the function found in conventional C 'string.h' library. | ||||||||||||
| ||||||||||||
|
memcmp
| intrinsic short memcmp(void &pToBuffer, void &pFromBuffer, const short nNumbOfBytes) | ||||||||||||
| (void) Compares the first set bytes of the block of memory referenced by "pToBuffer" to the first number of bytes referenced by "pFromBuffer". The function will return zero if they all match or a value different from zero representing which is greater if they do not. | ||||||||||||
| ||||||||||||
|
memmove
| void memmove(void &pToBuffer, const void &pFromBuffer, const short nNumbOfBytes) | ||||||||||||
| (void) Function copies characters from pFromBuffer to pToBuffer. nBytesToCopy is the number of bytes to copy. Identical to the function found in conventional C 'string.h' library.
The advantage of "memmove" is that the buffers can overlap in memory space - the "memcpy" function they cannot overlap. | ||||||||||||
| ||||||||||||
|