2012-11-06 02:55:08 +04:00
|
|
|
/* main.h */
|
|
|
|
|
|
|
|
#ifndef __main_h_
|
|
|
|
#define __main_h_
|
|
|
|
|
|
|
|
#include <mqx.h>
|
|
|
|
#include <bsp.h>
|
|
|
|
#include <mfs.h>
|
|
|
|
#include <fio.h>
|
|
|
|
#include <rtcs.h>
|
|
|
|
#include <ipcfg.h>
|
|
|
|
#include <sdcard.h>
|
|
|
|
#include <spi.h>
|
|
|
|
#include <part_mgr.h>
|
|
|
|
|
|
|
|
#include <cyassl/ssl.h>
|
|
|
|
|
2014-09-18 02:53:53 +04:00
|
|
|
#define MAIN_TASK 1
|
2012-11-06 02:55:08 +04:00
|
|
|
|
2014-09-18 02:53:53 +04:00
|
|
|
extern void Main_task(uint32_t);
|
2012-11-06 02:55:08 +04:00
|
|
|
extern void setup_ethernet(void);
|
2014-09-18 02:53:53 +04:00
|
|
|
extern void setup_clock(void);
|
2012-11-06 02:55:08 +04:00
|
|
|
extern void client_test(void);
|
|
|
|
|
|
|
|
/* cert file locations */
|
2014-09-18 02:53:53 +04:00
|
|
|
static const char* caCert = "a:\\certs\\ca-cert.pem";
|
|
|
|
static const char* clientCert = "a:\\certs\\client-cert.pem";
|
|
|
|
static const char* clientKey = "a:\\certs\\client-key.pem";
|
2012-11-06 02:55:08 +04:00
|
|
|
|
|
|
|
static inline void err_sys(const char* msg)
|
|
|
|
{
|
2014-09-18 02:53:53 +04:00
|
|
|
printf("yassl error: %s\n", msg);
|
|
|
|
if (msg)
|
|
|
|
_mqx_exit(1);
|
2012-11-06 02:55:08 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
/* PPP device must be set manually and
|
2014-09-18 02:53:53 +04:00
|
|
|
* must be different from the default IO channel (BSP_DEFAULT_IO_CHANNEL)
|
|
|
|
*/
|
2012-11-06 02:55:08 +04:00
|
|
|
#define PPP_DEVICE "ittyb:"
|
|
|
|
|
|
|
|
/*
|
2014-09-18 02:53:53 +04:00
|
|
|
* Define PPP_DEVICE_DUN only when using PPP to communicate
|
|
|
|
* to Win9x Dial-Up Networking over a null-modem
|
|
|
|
* This is ignored if PPP_DEVICE is not #define'd
|
|
|
|
*/
|
2012-11-06 02:55:08 +04:00
|
|
|
#define PPP_DEVICE_DUN 1
|
|
|
|
|
|
|
|
#ifndef ENET_IPADDR
|
2014-09-18 02:53:53 +04:00
|
|
|
#define ENET_IPADDR IPADDR(192,168,1,155)
|
2012-11-06 02:55:08 +04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef ENET_IPMASK
|
2014-09-18 02:53:53 +04:00
|
|
|
#define ENET_IPMASK IPADDR(255,255,255,0)
|
2012-11-06 02:55:08 +04:00
|
|
|
#endif
|
|
|
|
|
2014-09-18 02:53:53 +04:00
|
|
|
#define GATE_IPADDR IPADDR(192,168,1,1)
|
2012-11-06 02:55:08 +04:00
|
|
|
|
|
|
|
#endif /* __main_h_ */
|
|
|
|
|