| 299 | } |
| 300 | |
| 301 | static ODR_t |
| 302 | OD_write_13FE(OD_stream_t* stream, const void* buf, OD_size_t count, OD_size_t* countWritten) { |
| 303 | if ((stream == NULL) || (stream->subIndex != 0U) || (buf == NULL) || (countWritten == NULL)) { |
| 304 | return ODR_DEV_INCOMPAT; |
| 305 | } |
| 306 | |
| 307 | CO_SRDOGuard_t* SRDOGuard = stream->object; |
| 308 | |
| 309 | if (SRDOGuard->NMTisOperational) { |
| 310 | /* Data cannot be transferred or stored to the application because of the present device state. */ |
| 311 | return ODR_DATA_DEV_STATE; |
| 312 | } |
| 313 | |
| 314 | #ifdef CO_CONFORMANCE_TEST_TOOL_ADAPTATION |
| 315 | if (OD_not_write_same_value(stream, buf, count)) { |
| 316 | return ODR_OK; |
| 317 | } |
| 318 | #endif |
| 319 | |
| 320 | uint8_t configurationValid = CO_getUint8(buf); |
| 321 | if (configurationValid == CO_SRDO_VALID_MAGIC) { |
| 322 | SRDOGuard->configurationValid = true; |
| 323 | } else { |
| 324 | SRDOGuard->configurationValid = false; |
| 325 | } |
| 326 | |
| 327 | /* write value to the original location in the Object Dictionary */ |
| 328 | return OD_writeOriginal(stream, buf, count, countWritten); |
| 329 | } |
| 330 | |
| 331 | static ODR_t |
| 332 | OD_write_13FF(OD_stream_t* stream, const void* buf, OD_size_t count, OD_size_t* countWritten) { |
nothing calls this directly
no test coverage detected