zephyr/drivers/bluetooth/hci/userchan_bottom.h
Alberto Escolar Piedras b2b6f3c314 Bluetooth: userchan: Support other libCs
Refactor the userchan driver into a top and a bottom part.
The bottom is the one which interacts with the host and is built
with the host libC, while the top is built with the embedded code
and whatever libC that is built with.

Errors (errno) is converted between the top and bottom to ensure they
are coherent with the local libC.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-10 06:52:19 +01:00

26 lines
535 B
C

/**
* Copyright (c) 2025 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef DRIVERS_BLUETOOTH_HCI_USERCHAN_BOTTOM_H
#define DRIVERS_BLUETOOTH_HCI_USERCHAN_BOTTOM_H
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
bool user_chan_rx_ready(int fd);
int user_chan_is_ipaddr_ok(char ip_addr[]);
int user_chan_socket_open(unsigned short bt_dev_index);
int user_chan_net_connect(char ip_addr[], unsigned int port);
#ifdef __cplusplus
}
#endif
#endif /* DRIVERS_BLUETOOTH_HCI_USERCHAN_BOTTOM_H */