|
143 | 143 | * maximum allowable send block time prevents prevents a deadlock occurring when |
144 | 144 | * all the network buffers are in use and the tasks that process (and subsequently |
145 | 145 | * free) the network buffers are themselves blocked waiting for a network buffer. |
146 | | - * ipconfigMAX_SEND_BLOCK_TIME_TICKS is specified in RTOS ticks. A time in |
147 | | - * milliseconds can be converted to a time in ticks by dividing the time in |
148 | | - * milliseconds by portTICK_PERIOD_MS. */ |
149 | | -#define ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS ( 5000U / portTICK_PERIOD_MS ) |
| 146 | + * ipconfigMAX_SEND_BLOCK_TIME_TICKS is specified in RTOS ticks. A time in |
| 147 | + * milliseconds can be converted to a time in ticks using pdMS_TO_TICKS().*/ |
| 148 | +#define ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS pdMS_TO_TICKS( 5000U ) |
150 | 149 |
|
151 | 150 | /* If ipconfigUSE_DHCP is 1 then FreeRTOS+TCP will attempt to retrieve an IP |
152 | 151 | * address, netmask, DNS server address and gateway address from a DHCP server. If |
|
171 | 170 | * static IP address passed as a parameter to FreeRTOS_IPInit() if the |
172 | 171 | * re-transmission time interval reaches ipconfigMAXIMUM_DISCOVER_TX_PERIOD without |
173 | 172 | * a DHCP reply being received. */ |
174 | | -#define ipconfigMAXIMUM_DISCOVER_TX_PERIOD \ |
175 | | - ( 120000U / portTICK_PERIOD_MS ) |
| 173 | +#define ipconfigMAXIMUM_DISCOVER_TX_PERIOD pdMS_TO_TICKS( 120000U ) |
176 | 174 |
|
177 | 175 | /* The ARP cache is a table that maps IP addresses to MAC addresses. The IP |
178 | 176 | * stack can only send a UDP message to a remove IP address if it knowns the MAC |
|
183 | 181 | * cache then the UDP message is replaced by a ARP message that solicits the |
184 | 182 | * required MAC address information. ipconfigARP_CACHE_ENTRIES defines the maximum |
185 | 183 | * number of entries that can exist in the ARP table at any one time. */ |
186 | | -#define ipconfigARP_CACHE_ENTRIES 6 |
| 184 | +#define ipconfigARP_CACHE_ENTRIES 6 |
187 | 185 |
|
188 | 186 | /* ARP requests that do not result in an ARP response will be re-transmitted a |
189 | 187 | * maximum of ipconfigMAX_ARP_RETRANSMISSIONS times before the ARP request is |
190 | 188 | * aborted. */ |
191 | | -#define ipconfigMAX_ARP_RETRANSMISSIONS ( 5 ) |
| 189 | +#define ipconfigMAX_ARP_RETRANSMISSIONS ( 5 ) |
192 | 190 |
|
193 | 191 | /* ipconfigMAX_ARP_AGE defines the maximum time between an entry in the ARP |
194 | 192 | * table being created or refreshed and the entry being removed because it is stale. |
195 | 193 | * New ARP requests are sent for ARP cache entries that are nearing their maximum |
196 | 194 | * age. ipconfigMAX_ARP_AGE is specified in tens of seconds, so a value of 150 is |
197 | 195 | * equal to 1500 seconds (or 25 minutes). */ |
198 | | -#define ipconfigMAX_ARP_AGE 150 |
| 196 | +#define ipconfigMAX_ARP_AGE 150 |
199 | 197 |
|
200 | 198 | /* Implementing FreeRTOS_inet_addr() necessitates the use of string handling |
201 | 199 | * routines, which are relatively large. To save code space the full |
|
207 | 205 | * ipconfigINCLUDE_FULL_INET_ADDR is set to 1 then both FreeRTOS_inet_addr() and |
208 | 206 | * FreeRTOS_indet_addr_quick() are available. If ipconfigINCLUDE_FULL_INET_ADDR is |
209 | 207 | * not set to 1 then only FreeRTOS_indet_addr_quick() is available. */ |
210 | | -#define ipconfigINCLUDE_FULL_INET_ADDR 1 |
| 208 | +#define ipconfigINCLUDE_FULL_INET_ADDR 1 |
211 | 209 |
|
212 | 210 | /* ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS defines the total number of network buffer that |
213 | 211 | * are available to the IP stack. The total number of network buffers is limited |
214 | 212 | * to ensure the total amount of RAM that can be consumed by the IP stack is capped |
215 | 213 | * to a pre-determinable value. */ |
216 | | -#define ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS 60 |
| 214 | +#define ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS 60 |
217 | 215 |
|
218 | 216 | /* A FreeRTOS queue is used to send events from application tasks to the IP |
219 | 217 | * stack. ipconfigEVENT_QUEUE_LENGTH sets the maximum number of events that can |
|
287 | 285 |
|
288 | 286 | /* The windows simulator cannot really simulate MAC interrupts, and needs to |
289 | 287 | * block occasionally to allow other tasks to run. */ |
290 | | -#define configWINDOWS_MAC_INTERRUPT_SIMULATOR_DELAY ( 20 / portTICK_PERIOD_MS ) |
| 288 | +#define configWINDOWS_MAC_INTERRUPT_SIMULATOR_DELAY pdMS_TO_TICKS( 20 ) |
291 | 289 |
|
292 | 290 | /* Advanced only: in order to access 32-bit fields in the IP packets with |
293 | 291 | * 32-bit memory instructions, all packets will be stored 32-bit-aligned, |
|
0 commit comments