1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- #ifndef FLASHPARAMETERS_SOURCE
- #define FLASHPARAMETERS_SOURCE
- #include "../plc/plc.h"
- signed FlashParameters (struct plc * plc, uint32_t options)
- {
- struct vs_module_spec vs_module_spec =
- {
- PLC_MODULEID_PARAMETERS,
- 0,
- 0,
- 0
- };
- ModuleSpec (&plc->PIB, &vs_module_spec);
- if (ModuleSession (plc, 1, &vs_module_spec))
- {
- return (-1);
- }
- if (ModuleWrite (plc, &plc->PIB, 0, &vs_module_spec))
- {
- return (-1);
- }
- if (ModuleCommit (plc, options))
- {
- return (-1);
- }
- return (0);
- }
- #endif
|