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

Function OD_not_write_same_value

304/CO_SRDO.c:139–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137
138#ifdef CO_CONFORMANCE_TEST_TOOL_ADAPTATION
139static bool_t
140OD_not_write_same_value(OD_stream_t* stream, const void* buf, OD_size_t count) {
141 /* The conformance test tool does not recognize CANopen Safety and on all object
142 * dictionaty tries to read and write the same value */
143 OD_size_t countRead = 0;
144 uint8_t bufRead[6] = {0};
145 if (count > 6U) {
146 return false;
147 }
148 ODR_t returnCode = OD_readOriginal(stream, bufRead, count, &countRead);
149 if (returnCode != ODR_OK) {
150 return false;
151 }
152 if (memcmp((const void*)(buf), (const void*)(bufRead), count) == 0) {
153 return true;
154 }
155 return false;
156}
157#endif
158
159static ODR_t

Callers 4

OD_write_13FEFunction · 0.85
OD_write_13FFFunction · 0.85

Calls 1

OD_readOriginalFunction · 0.85

Tested by

no test coverage detected