|
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 |
|
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