MCPcopy Create free account
hub / github.com/CANopenNode/CANopenNode / reverseBytes

Function reverseBytes

301/CO_SDOclient.c:297–307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

295
296#if (((CO_CONFIG_SDO_CLI)&CO_CONFIG_SDO_CLI_LOCAL) != 0) && defined CO_BIG_ENDIAN
297static inline void
298reverseBytes(void* start, OD_size_t size) {
299 uint8_t* lo = (uint8_t*)start;
300 uint8_t* hi = (uint8_t*)start + size - 1;
301 uint8_t swap;
302 while (lo < hi) {
303 swap = *lo;
304 *lo++ = *hi;
305 *hi-- = swap;
306 }
307}
308#endif
309
310CO_SDO_return_t

Callers 1

ifFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected