diff --git a/ports/zephyr/bip-init.c b/ports/zephyr/bip-init.c index fe59f729..58c020de 100644 --- a/ports/zephyr/bip-init.c +++ b/ports/zephyr/bip-init.c @@ -170,15 +170,15 @@ void bip_get_broadcast_address(BACNET_ADDRESS *dest) } /** - * Set the BACnet/IP address - * - * @param addr - network IPv4 address + * @brief Set the BACnet/IP address + * @param addr - network IPv4 address (in network byte order) + * @return true if the address was set */ bool bip_set_addr(BACNET_IP_ADDRESS *addr) { if (addr) { memcpy(&BIP_Address.s_addr, &addr->address[0], IP_ADDRESS_MAX); - BIP_Port = htons(addr->port); + BIP_Port = addr->port; return true; } return false; @@ -186,14 +186,14 @@ bool bip_set_addr(BACNET_IP_ADDRESS *addr) /** * @brief Get the BACnet/IP address - * @param addr - network IPv4 address + * @param addr - network IPv4 address (in network byte order) * @return true if the address was retrieved */ bool bip_get_addr(BACNET_IP_ADDRESS *addr) { if (addr) { memcpy(&addr->address[0], &BIP_Address.s_addr, IP_ADDRESS_MAX); - addr->port = ntohs(BIP_Port); + addr->port = BIP_Port; return true; } return false; diff --git a/zephyr/Kconfig b/zephyr/Kconfig index 3dfab625..c4aa28db 100644 --- a/zephyr/Kconfig +++ b/zephyr/Kconfig @@ -268,7 +268,7 @@ config BACNET_BASIC_OBJECT_DEVICE_CLIENT bool "Use the BACnet basic device-client object" default false help - Use the BACnet basic device-server object + Use the BACnet basic device-client object config BACNET_BASIC_OBJECT_INTEGER_VALUE bool "Use the BACnet basic integer value object"