-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathwiced.patch
148 lines (133 loc) · 4.5 KB
/
wiced.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1955793
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+generated_mac_address.txt
diff --git a/WICED/platform/MCU/wwd_platform_separate_mcu.c b/WICED/platform/MCU/wwd_platform_separate_mcu.c
index 4dabede..731121b 100644
--- a/WICED/platform/MCU/wwd_platform_separate_mcu.c
+++ b/WICED/platform/MCU/wwd_platform_separate_mcu.c
@@ -42,7 +42,15 @@
#include "wwd_platform_common.h"
#include "wwd_assert.h"
#include "platform/wwd_platform_interface.h"
+
+#ifndef PICOOS_WORKAROUNDS
+/*
+ * pico]OS: Using only the WWD driver, so this is not needed.
+ * Having it included would force implementation of
+ * stuff that is not really needed.
+ */
#include "wiced_framework.h"
+#endif
/******************************************************
* Macros
diff --git a/include/wiced_management.h b/include/wiced_management.h
index af35def..83803ee 100644
--- a/include/wiced_management.h
+++ b/include/wiced_management.h
@@ -38,7 +38,13 @@
#pragma once
#include "network/wwd_network_interface.h"
+#ifndef PICOOS_WORKAROUNDS
+/*
+ * pico]OS: TCP/IP stack comes from separate picoos-lwip library so
+ * leave this out.
+ */
#include "wiced_tcpip.h"
+#endif
#include "wiced_wifi.h"
#ifdef __cplusplus
@@ -112,9 +118,14 @@ typedef void (*wiced_network_link_callback_t)(void);
/** IP address settings */
typedef struct
{
+#ifndef PICOOS_WORKAROUNDS
+/*
+ * pico]OS: Leave these out because Wiced TCP/IP layer is not used.
+ */
wiced_ip_address_t ip_address; /**< IP address */
wiced_ip_address_t gateway; /**< Gateway address */
wiced_ip_address_t netmask; /**< Netmask */
+#endif
} wiced_ip_setting_t;
@@ -132,8 +143,13 @@ typedef struct
*/
typedef struct
{
+#ifndef PICOOS_WORKAROUNDS
+/*
+ * pico]OS: Leave these out because Wiced TCP/IP layer is not used.
+ */
uint32_t count; /**< Number of IP addresses in the list */
wiced_ip_address_t ip_address_list[1]; /**< Variable length array of IP addresses */
+#endif
} wiced_ip_address_list_t;
/******************************************************
diff --git a/include/wiced_wifi.h b/include/wiced_wifi.h
index dfe41b8..3edf663 100644
--- a/include/wiced_wifi.h
+++ b/include/wiced_wifi.h
@@ -38,6 +38,11 @@
#pragma once
+#ifndef PICOOS_WORKAROUNDS
+/*
+ * pico]OS: Most of the stuff here is not needed as
+ * this library is only using WWD level driver.
+ */
#include "wiced_utilities.h"
#include "wwd_wifi.h"
#include "wwd_debug.h"
@@ -139,6 +144,8 @@ typedef enum
* field
* wifi_flags
*/
+#endif /* PICOOS_WORKAROUNDS */
+
#define WIFI_FLAG_MESH (1 << 0) /**< MESH master enable/disable */
#define WIFI_FLAG_MESH_MCAST_REBROADCAST (1 << 1) /**< MESH mcast rebroadcast */
#define WIFI_MESH_DHCP_IP (1 << 4)
@@ -146,6 +153,11 @@ typedef enum
#define WIFI_FLAG_MESH_ALL_FLAGS (WIFI_FLAG_MESH | WIFI_FLAG_MESH_MCAST_REBROADCAST | WIFI_MESH_DHCP_IP | WIFI_FLAG_MESH_GATEWAY)
+#ifndef PICOOS_WORKAROUNDS
+/*
+ * pico]OS: Most of the stuff here is not needed as
+ * this library is only using WWD level driver.
+ */
/******************************************************
* Type Definitions
@@ -1251,3 +1263,4 @@ static inline void print_mac_address( const wiced_mac_t* mac )
#ifdef __cplusplus
} /*extern "C" */
#endif
+#endif /* PICOOS_WORKAROUNDS */
diff --git a/platforms/EMW3165/platform_config.h b/platforms/EMW3165/platform_config.h
index c001f14..7c55f2e 100644
--- a/platforms/EMW3165/platform_config.h
+++ b/platforms/EMW3165/platform_config.h
@@ -30,7 +30,12 @@ extern "C" {
//#define WICED_WIFI_USE_GPIO_FOR_BOOTSTRAP_1
/* Wi-Fi GPIO0 pin is used for out-of-band interrupt */
-#define WICED_WIFI_OOB_IRQ_GPIO_PIN ( 0 )
+/*
+ * pico]OS: I think that this definition is originally wrong
+ * in MXCHIP patches. At least without changing this to
+ * 1 the system won't wake up from sleep.
+ */
+#define WICED_WIFI_OOB_IRQ_GPIO_PIN ( 1 )
/* Wi-Fi power pin is present */
//#define WICED_USE_WIFI_POWER_PIN
@@ -39,7 +44,12 @@ extern "C" {
#define WICED_USE_WIFI_RESET_PIN
/* */
-#define WICED_USE_WIFI_32K_CLOCK_MCO
+/*
+ * pico]OS: I think that this definition is originally wrong
+ * in MXCHIP patches. Pin from CPU to network chip clock pin is
+ * not connected.
+ */
+//#define WICED_USE_WIFI_32K_CLOCK_MCO
/* OTA */
//#define PLATFORM_HAS_OTA