* Custom function for reading or writing OD object. * * For more information see file CO_ODinterface.h, OD_IO_t. */
| 29 | * For more information see file CO_ODinterface.h, OD_IO_t. |
| 30 | */ |
| 31 | static ODR_t |
| 32 | OD_write_1300(OD_stream_t* stream, const void* buf, OD_size_t count, OD_size_t* countWritten) { |
| 33 | if ((stream == NULL) || (stream->subIndex != 0U) || (buf == NULL) || (countWritten == NULL)) { |
| 34 | return ODR_DEV_INCOMPAT; |
| 35 | } |
| 36 | |
| 37 | CO_GFC_t* GFC = stream->object; |
| 38 | |
| 39 | uint8_t value = CO_getUint8(buf); |
| 40 | if (value > 1U) { |
| 41 | return ODR_INVALID_VALUE; |
| 42 | } |
| 43 | |
| 44 | GFC->valid = (value == 1U); |
| 45 | |
| 46 | /* write value to the original location in the Object Dictionary */ |
| 47 | return OD_writeOriginal(stream, buf, count, countWritten); |
| 48 | } |
| 49 | |
| 50 | #if ((CO_CONFIG_GFC)&CO_CONFIG_GFC_CONSUMER) != 0 |
| 51 | static void |
nothing calls this directly
no test coverage detected