supla-device
Loading...
Searching...
No Matches
arduino_netif_config.h
1// SPDX-FileCopyrightText: AC SOFTWARE SP. Z O.O.
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#ifndef SRC_SUPLA_NETWORK_ARDUINO_NETIF_CONFIG_H_
5#define SRC_SUPLA_NETWORK_ARDUINO_NETIF_CONFIG_H_
6
7#include <Arduino.h>
8#include <IPAddress.h>
9
10#include <stdint.h>
11
12namespace Supla {
13
14inline IPAddress toArduinoIpAddress(uint32_t ip) {
15 return IPAddress((ip >> 24) & 0xFF,
16 (ip >> 16) & 0xFF,
17 (ip >> 8) & 0xFF,
18 ip & 0xFF);
19}
20
21} // namespace Supla
22
23#endif // SRC_SUPLA_NETWORK_ARDUINO_NETIF_CONFIG_H_
Definition ip_address.h:15