librpipErrorGetDescription
uint32_t librpipErrorGetDescription(char* desc, int len);
Description
This function returns the error description set by a previous function.
Parameters
- char* desc
A pointer to a char array to hold the error description - int len
The length of the char array. If len is less than the error description length then only the first len characters will be copied into the array.
Returns
The length of the error description.
Example
Attempt to toggle an invalid GPIO pin and get the resultant error description.
char desc[200]; if(!librpipGpioPinToggle(32)) { librpipErrorGetDescription(&desc[0], sizeof(desc)); }