hal.c 560 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * hal.c
  3. *
  4. * Created on: 14.06.2017
  5. * Author: balbekova
  6. */
  7. #include "stm32f4xx.h"
  8. #ifndef BT6702_SERVICE
  9. #include "log.h"
  10. #include "snmp_api.h"
  11. #include "trap_api.h"
  12. #endif
  13. #include <stddef.h>
  14. #include "FreeRTOS.h"
  15. #include "task.h"
  16. void Reboot(void) {
  17. #ifndef BT6702_SERVICE
  18. SNMP_SendUserTrap(DEVICE_REBOOTED);
  19. #ifdef HARDWARE_BT6706
  20. if(telnet_act)
  21. log_event_data(LOG_SYSTEM_BOOT, name_login_telnet);
  22. else
  23. #endif
  24. log_event_data(LOG_SYSTEM_BOOT, name_login);
  25. vTaskDelay(1010);
  26. LOG_Disable();
  27. #endif
  28. NVIC_SystemReset();
  29. }