123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- #ifndef WAITFORRESTART_SOURCE
- #define WAITFORRESTART_SOURCE
- #include "../plc/plc.h"
- #include "../tools/error.h"
- #include "../tools/flags.h"
- signed WaitForRestart (struct plc * plc)
- {
- if (_allclr (plc->flags, PLC_QUICK_FLASH))
- {
- char firmware [PLC_VERSION_STRING];
- if (WaitForReset (plc))
- {
- error (PLC_EXIT (plc), 0, "Device did not Reset");
- return (-1);
- }
- if (WaitForStart (plc, firmware, sizeof (firmware)))
- {
- error (PLC_EXIT (plc), 0, "Device did not Start");
- return (-1);
- }
- }
- return (0);
- }
- #endif
|