diff options
Diffstat (limited to 'tests/unit/stubs/esp_netif.h')
| -rw-r--r-- | tests/unit/stubs/esp_netif.h | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/tests/unit/stubs/esp_netif.h b/tests/unit/stubs/esp_netif.h index f009537..719d7c6 100644 --- a/tests/unit/stubs/esp_netif.h +++ b/tests/unit/stubs/esp_netif.h | |||
| @@ -1,17 +1,6 @@ | |||
| 1 | #ifndef STUBS_ESP_NETIF_H | 1 | #ifndef STUBS_ESP_NETIF_H |
| 2 | #define STUBS_ESP_NETIF_H | 2 | #define STUBS_ESP_NETIF_H |
| 3 | 3 | ||
| 4 | #include <stdint.h> | 4 | #include "lwip/ip4_addr.h" |
| 5 | |||
| 6 | typedef struct { | ||
| 7 | uint32_t addr; | ||
| 8 | } esp_ip4_addr_t; | ||
| 9 | |||
| 10 | #define IPSTR "%d.%d.%d.%d" | ||
| 11 | #define IP2STR(ip) ((ip)->addr & 0xff), (((ip)->addr >> 8) & 0xff), (((ip)->addr >> 16) & 0xff), (((ip)->addr >> 24) & 0xff) | ||
| 12 | |||
| 13 | static inline void IP4_ADDR(esp_ip4_addr_t *ip, uint8_t a, uint8_t b, uint8_t c, uint8_t d) { | ||
| 14 | ip->addr = ((uint32_t)a) | ((uint32_t)b << 8) | ((uint32_t)c << 16) | ((uint32_t)d << 24); | ||
| 15 | } | ||
| 16 | 5 | ||
| 17 | #endif | 6 | #endif |