main.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* main.h */
  2. #ifndef __main_h_
  3. #define __main_h_
  4. #include <mqx.h>
  5. #include <bsp.h>
  6. #include <mfs.h>
  7. #include <fio.h>
  8. #include <rtcs.h>
  9. #include <ipcfg.h>
  10. #include <sdcard.h>
  11. #include <spi.h>
  12. #include <part_mgr.h>
  13. #include <wolfssl/ssl.h>
  14. #define MAIN_TASK 1
  15. extern void Main_task(uint32_t);
  16. extern void setup_ethernet(void);
  17. extern void setup_clock(void);
  18. extern void client_test(void);
  19. /* cert file locations */
  20. static const char* caCert = "a:\\certs\\ca-cert.pem";
  21. static const char* clientCert = "a:\\certs\\client-cert.pem";
  22. static const char* clientKey = "a:\\certs\\client-key.pem";
  23. static inline void err_sys(const char* msg)
  24. {
  25. printf("wolfssl error: %s\n", msg);
  26. if (msg)
  27. _mqx_exit(1);
  28. }
  29. /* PPP device must be set manually and
  30. * must be different from the default IO channel (BSP_DEFAULT_IO_CHANNEL)
  31. */
  32. #define PPP_DEVICE "ittyb:"
  33. /*
  34. * Define PPP_DEVICE_DUN only when using PPP to communicate
  35. * to Win9x Dial-Up Networking over a null-modem
  36. * This is ignored if PPP_DEVICE is not #define'd
  37. */
  38. #define PPP_DEVICE_DUN 1
  39. #ifndef ENET_IPADDR
  40. #define ENET_IPADDR IPADDR(192,168,1,155)
  41. #endif
  42. #ifndef ENET_IPMASK
  43. #define ENET_IPMASK IPADDR(255,255,255,0)
  44. #endif
  45. #define GATE_IPADDR IPADDR(192,168,1,1)
  46. #endif /* __main_h_ */