1b52fe020SMatthias Ringwald /*
221c1535eSMatthias Ringwald * Copyright (C) 2016-2021 BlueKitchen GmbH
3b52fe020SMatthias Ringwald *
4b52fe020SMatthias Ringwald * Redistribution and use in source and binary forms, with or without
5b52fe020SMatthias Ringwald * modification, are permitted provided that the following conditions
6b52fe020SMatthias Ringwald * are met:
7b52fe020SMatthias Ringwald *
8b52fe020SMatthias Ringwald * 1. Redistributions of source code must retain the above copyright
9b52fe020SMatthias Ringwald * notice, this list of conditions and the following disclaimer.
10b52fe020SMatthias Ringwald * 2. Redistributions in binary form must reproduce the above copyright
11b52fe020SMatthias Ringwald * notice, this list of conditions and the following disclaimer in the
12b52fe020SMatthias Ringwald * documentation and/or other materials provided with the distribution.
13b52fe020SMatthias Ringwald * 3. Neither the name of the copyright holders nor the names of
14b52fe020SMatthias Ringwald * contributors may be used to endorse or promote products derived
15b52fe020SMatthias Ringwald * from this software without specific prior written permission.
16b52fe020SMatthias Ringwald * 4. Any redistribution, use, or modification is done solely for
17b52fe020SMatthias Ringwald * personal benefit and not for any commercial purpose or for
18b52fe020SMatthias Ringwald * monetary gain.
19b52fe020SMatthias Ringwald *
20b52fe020SMatthias Ringwald * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS
21b52fe020SMatthias Ringwald * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22b52fe020SMatthias 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,
25b52fe020SMatthias Ringwald * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26b52fe020SMatthias Ringwald * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
27b52fe020SMatthias Ringwald * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
28b52fe020SMatthias Ringwald * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29b52fe020SMatthias Ringwald * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
30b52fe020SMatthias Ringwald * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31b52fe020SMatthias Ringwald * SUCH DAMAGE.
32b52fe020SMatthias Ringwald *
33b52fe020SMatthias Ringwald * Please inquire about commercial licensing options at
34b52fe020SMatthias Ringwald * [email protected]
35b52fe020SMatthias Ringwald *
36b52fe020SMatthias Ringwald */
37b52fe020SMatthias Ringwald
38fe5a6c4eSMilanka Ringwald /**
39fe5a6c4eSMilanka Ringwald * @title UART Block
40b52fe020SMatthias Ringwald *
4121c1535eSMatthias Ringwald * Compatibility layer for ports that use btstack_uart_block_t
42fe5a6c4eSMilanka Ringwald *
43b52fe020SMatthias Ringwald */
44b52fe020SMatthias Ringwald
4580e33422SMatthias Ringwald #ifndef BTSTACK_UART_BLOCK_H
4680e33422SMatthias Ringwald #define BTSTACK_UART_BLOCK_H
47b52fe020SMatthias Ringwald
48b52fe020SMatthias Ringwald #include <stdint.h>
4921c1535eSMatthias Ringwald #include "btstack_uart.h"
50084ad01cSMatthias Ringwald
51ea7d62f8SMatthias Ringwald #if defined __cplusplus
52ea7d62f8SMatthias Ringwald extern "C" {
53ea7d62f8SMatthias Ringwald #endif
54ea7d62f8SMatthias Ringwald
55fe5a6c4eSMilanka Ringwald /* API_START */
56fe5a6c4eSMilanka Ringwald
5721c1535eSMatthias Ringwald typedef btstack_uart_t btstack_uart_block_t;
58b52fe020SMatthias Ringwald
5995b3bfd1SMatthias Ringwald // existing block-only implementations
6048cdff9cSMilanka Ringwald const btstack_uart_block_t * btstack_uart_block_windows_instance(void);
6148cdff9cSMilanka Ringwald const btstack_uart_block_t * btstack_uart_block_embedded_instance(void);
6248cdff9cSMilanka Ringwald const btstack_uart_block_t * btstack_uart_block_freertos_instance(void);
63b52fe020SMatthias Ringwald
6495b3bfd1SMatthias Ringwald // mapper for extended implementation
btstack_uart_block_posix_instance(void)6595b3bfd1SMatthias Ringwald static inline const btstack_uart_block_t * btstack_uart_block_posix_instance(void){
6695b3bfd1SMatthias Ringwald return (const btstack_uart_block_t *) btstack_uart_posix_instance();
6795b3bfd1SMatthias Ringwald }
68fe5a6c4eSMilanka Ringwald /* API_STOP */
6995b3bfd1SMatthias Ringwald
70ea7d62f8SMatthias Ringwald #if defined __cplusplus
71ea7d62f8SMatthias Ringwald }
72ea7d62f8SMatthias Ringwald #endif
73ea7d62f8SMatthias Ringwald
74b52fe020SMatthias Ringwald #endif
75