Provides some auxiliary functions for internal use in library but at same time expose it to public for the library users.
More...
#include <Utilities.h>
|
static void * | EasyMalloc (IN unsigned int sizeInBytes) |
| Wrapper around the stdlib.h malloc to make it safe of overflows in the the majority of common string manipulation cases and at same time zero's all the allocated memory too. More...
|
|
static void | ZeroBuffer (IN void *buffer, IN size_t bufferSize) |
| Fills a given buffer with zeros aka \0. More...
|
|
static void | OverrideLastStringChar (IN char *string) |
| Put a \0 in the last character of the string. More...
|
|
static void | OverrideLastTwoChar (IN char *string) |
| Put a \0 in the last two characters of the string. More...
|
|
static void | ObtainI2CDeviceAddress (INOUT int *listOfAddresses, IN uint8_t sizeOfList) |
| Obtain the addresses of all devices connected to Arduino using I2C. More...
|
|
Provides some auxiliary functions for internal use in library but at same time expose it to public for the library users.
◆ EasyMalloc()
static void* Easyuino::Utilities::EasyMalloc |
( |
IN unsigned int |
sizeInBytes | ) |
|
|
static |
Wrapper around the stdlib.h malloc to make it safe of overflows in the the majority of common string manipulation cases and at same time zero's all the allocated memory too.
- Parameters
-
sizeInBytes | Amount of bytes to be allocated |
- Returns
- ptr Pointer to the first byte of the allocated memory
◆ ObtainI2CDeviceAddress()
static void Easyuino::Utilities::ObtainI2CDeviceAddress |
( |
INOUT int * |
listOfAddresses, |
|
|
IN uint8_t |
sizeOfList |
|
) |
| |
|
static |
◆ OverrideLastStringChar()
static void Easyuino::Utilities::OverrideLastStringChar |
( |
IN char * |
string | ) |
|
|
static |
Put a \0 in the last character of the string.
- Parameters
-
string | Pointer to the string |
◆ OverrideLastTwoChar()
static void Easyuino::Utilities::OverrideLastTwoChar |
( |
IN char * |
string | ) |
|
|
static |
Put a \0 in the last two characters of the string.
- Parameters
-
string | Pointer to the string |
◆ ZeroBuffer()
static void Easyuino::Utilities::ZeroBuffer |
( |
IN void * |
buffer, |
|
|
IN size_t |
bufferSize |
|
) |
| |
|
static |
Fills a given buffer with zeros aka \0.
- Parameters
-
buffer | Pointer to the buffer |
bufferSize | Buffer's size |
The documentation for this class was generated from the following file: