MCPcopy Create free account
hub / github.com/andysworkshop/stm32plus / toHex

Function toHex

lib/src/string/StringUtil.cpp:22–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20 */
21
22 void toHex(const void *buffer,uint32_t bufferSize,char *output) {
23
24 const char *ptr;
25 static const char *hexSet="0123456789abcdef";
26
27 ptr=reinterpret_cast<const char *>(buffer);
28 while(bufferSize--) {
29
30 *output++=hexSet[(*ptr & 0xf0) >> 4];
31 *output++=hexSet[*ptr & 0xf];
32 ptr++;
33 }
34 }
35
36
37 /*

Callers 2

showDeviceIdentifierMethod · 0.85
loginUserMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected