* Custom function for writing OD object "Inhibit time EMCY" * * For more information see file CO_ODinterface.h, OD_IO_t. */
| 131 | * For more information see file CO_ODinterface.h, OD_IO_t. |
| 132 | */ |
| 133 | static ODR_t |
| 134 | OD_write_1015(OD_stream_t* stream, const void* buf, OD_size_t count, OD_size_t* countWritten) { |
| 135 | if ((stream == NULL) || (stream->subIndex != 0U) || (buf == NULL) || (count != sizeof(uint16_t)) |
| 136 | || (countWritten == NULL)) { |
| 137 | return ODR_DEV_INCOMPAT; |
| 138 | } |
| 139 | |
| 140 | CO_EM_t* em = (CO_EM_t*)stream->object; |
| 141 | |
| 142 | /* update object */ |
| 143 | em->inhibitEmTime_us = (uint32_t)CO_getUint16(buf) * 100U; |
| 144 | em->inhibitEmTimer = 0; |
| 145 | |
| 146 | /* write value to the original location in the Object Dictionary */ |
| 147 | return OD_writeOriginal(stream, buf, count, countWritten); |
| 148 | } |
| 149 | #endif /* (CO_CONFIG_EM) & CO_CONFIG_EM_PROD_INHIBIT */ |
| 150 | #endif /* (CO_CONFIG_EM) & CO_CONFIG_EM_PRODUCER */ |
| 151 |
nothing calls this directly
no test coverage detected