xref: /btstack/src/hci_transport_h4.h (revision 2fca4dad957cd7b88f4657ed51e89c12615dda72)
1c8dfe071SMatthias Ringwald /*
2c8dfe071SMatthias Ringwald  * Copyright (C) 2021 BlueKitchen GmbH
3c8dfe071SMatthias Ringwald  *
4c8dfe071SMatthias Ringwald  * Redistribution and use in source and binary forms, with or without
5c8dfe071SMatthias Ringwald  * modification, are permitted provided that the following conditions
6c8dfe071SMatthias Ringwald  * are met:
7c8dfe071SMatthias Ringwald  *
8c8dfe071SMatthias Ringwald  * 1. Redistributions of source code must retain the above copyright
9c8dfe071SMatthias Ringwald  *    notice, this list of conditions and the following disclaimer.
10c8dfe071SMatthias Ringwald  * 2. Redistributions in binary form must reproduce the above copyright
11c8dfe071SMatthias Ringwald  *    notice, this list of conditions and the following disclaimer in the
12c8dfe071SMatthias Ringwald  *    documentation and/or other materials provided with the distribution.
13c8dfe071SMatthias Ringwald  * 3. Neither the name of the copyright holders nor the names of
14c8dfe071SMatthias Ringwald  *    contributors may be used to endorse or promote products derived
15c8dfe071SMatthias Ringwald  *    from this software without specific prior written permission.
16c8dfe071SMatthias Ringwald  * 4. Any redistribution, use, or modification is done solely for
17c8dfe071SMatthias Ringwald  *    personal benefit and not for any commercial purpose or for
18c8dfe071SMatthias Ringwald  *    monetary gain.
19c8dfe071SMatthias Ringwald  *
20c8dfe071SMatthias Ringwald  * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS
21c8dfe071SMatthias Ringwald  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22c8dfe071SMatthias Ringwald  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23*2fca4dadSMilanka Ringwald  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BLUEKITCHEN
24*2fca4dadSMilanka Ringwald  * GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25c8dfe071SMatthias Ringwald  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26c8dfe071SMatthias Ringwald  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
27c8dfe071SMatthias Ringwald  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
28c8dfe071SMatthias Ringwald  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29c8dfe071SMatthias Ringwald  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
30c8dfe071SMatthias Ringwald  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31c8dfe071SMatthias Ringwald  * SUCH DAMAGE.
32c8dfe071SMatthias Ringwald  *
33c8dfe071SMatthias Ringwald  * Please inquire about commercial licensing options at
34c8dfe071SMatthias Ringwald  * [email protected]
35c8dfe071SMatthias Ringwald  *
36c8dfe071SMatthias Ringwald  */
37c8dfe071SMatthias Ringwald 
38fe5a6c4eSMilanka Ringwald /**
39fe5a6c4eSMilanka Ringwald  * @title HCI Transport H4
40fe5a6c4eSMilanka Ringwald  *
41c8dfe071SMatthias Ringwald  */
42fe5a6c4eSMilanka Ringwald 
43c8dfe071SMatthias Ringwald #ifndef HCI_TRANSPORT_H4_H
44c8dfe071SMatthias Ringwald #define HCI_TRANSPORT_H4_H
45c8dfe071SMatthias Ringwald 
46c8dfe071SMatthias Ringwald #include "hci_transport.h"
47c8dfe071SMatthias Ringwald #include "btstack_uart.h"
48c8dfe071SMatthias Ringwald #include "btstack_uart_block.h"
49c8dfe071SMatthias Ringwald 
50c8dfe071SMatthias Ringwald #if defined __cplusplus
51c8dfe071SMatthias Ringwald extern "C" {
52c8dfe071SMatthias Ringwald #endif
53c8dfe071SMatthias Ringwald 
54c8dfe071SMatthias Ringwald /* API_START */
55c8dfe071SMatthias Ringwald 
56c8dfe071SMatthias Ringwald /*
57c8dfe071SMatthias Ringwald  * @brief Setup H4 instance with btstack_uart implementation
58c8dfe071SMatthias Ringwald  * @param btstack_uart_block_driver to use
59c8dfe071SMatthias Ringwald  */
60c8dfe071SMatthias Ringwald const hci_transport_t * hci_transport_h4_instance_for_uart(const btstack_uart_t * uart_driver);
61c8dfe071SMatthias Ringwald 
62c8dfe071SMatthias Ringwald /*
63c8dfe071SMatthias Ringwald  * @brief Setup H4 instance with btstack_uart_block implementation
64c8dfe071SMatthias Ringwald  * @param btstack_uart_block_driver to use
65c8dfe071SMatthias Ringwald  * @deprecated use hci_transport_h4_instance_for_uart instead
66c8dfe071SMatthias Ringwald  */
67c8dfe071SMatthias Ringwald const hci_transport_t * hci_transport_h4_instance(const btstack_uart_block_t * uart_driver);
68c8dfe071SMatthias Ringwald 
69c8dfe071SMatthias Ringwald /* API_END */
70c8dfe071SMatthias Ringwald 
71c8dfe071SMatthias Ringwald #if defined __cplusplus
72c8dfe071SMatthias Ringwald }
73c8dfe071SMatthias Ringwald #endif
74c8dfe071SMatthias Ringwald 
75c8dfe071SMatthias Ringwald #endif // HCI_TRANSPORT_H5_H
76