monitoring.c 360 B

1234567891011121314151617181920
  1. #include "at32f403a_407.h"
  2. #include "monitoring.h"
  3. uint32_t mon_state; // Слово состояний модуля (в modbus)
  4. // state == true (есть ошибка, нужно установить бит)
  5. void mon_set_err(err_code_t err_code, bool state)
  6. {
  7. if (state)
  8. mon_state |= err_code;
  9. else
  10. mon_state &= ~err_code;
  11. }