main.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #ifndef __MAIN_H
  2. #define __MAIN_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. /* Includes ------------------------------------------------------------------*/
  7. #include "stm32f2xx_hal.h"
  8. #include "log.h"
  9. #include "malloc.h"
  10. #include "stdio.h"
  11. #include "cmsis_os.h"
  12. /* Exported types ------------------------------------------------------------*/
  13. /* Exported constants --------------------------------------------------------*/
  14. #define USE_DHCP /* enable DHCP, if disabled static address is used*/
  15. /*Static IP ADDRESS*/
  16. #define IP_ADDR0 (uint8_t) 192
  17. #define IP_ADDR1 (uint8_t) 168
  18. #define IP_ADDR2 (uint8_t) 2
  19. #define IP_ADDR3 (uint8_t) 10
  20. /*NETMASK*/
  21. #define NETMASK_ADDR0 (uint8_t) 255
  22. #define NETMASK_ADDR1 (uint8_t) 255
  23. #define NETMASK_ADDR2 (uint8_t) 255
  24. #define NETMASK_ADDR3 (uint8_t) 0
  25. /*Gateway Address*/
  26. #define GW_ADDR0 (uint8_t) 192
  27. #define GW_ADDR1 (uint8_t) 168
  28. #define GW_ADDR2 (uint8_t) 2
  29. #define GW_ADDR3 (uint8_t) 1
  30. /* Exported macro ------------------------------------------------------------*/
  31. /* Exported functions ------------------------------------------------------- */
  32. void Error_Handler(void);
  33. void set_ipaddr(char* buf);
  34. extern char gatewayId[11];
  35. #ifdef __cplusplus
  36. }
  37. #endif
  38. #endif /* __MAIN_H */