1 /* 2 * Copyright (c) 2019 Oticon A/S 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 8 #ifndef EDTT_DRIVER_H 9 #define EDTT_DRIVER_H 10 11 #include <stdlib.h> 12 #include <stdbool.h> 13 #include <zephyr/types.h> 14 15 #define EDTTT_NONBLOCK 0 16 #define EDTTT_BLOCK 1 17 18 #ifdef __cplusplus 19 extern "C" { 20 #endif 21 22 /** 23 * Generic EDTT interface 24 */ 25 bool edtt_start(void); 26 void edtt_stop(void); 27 int edtt_read(uint8_t *ptr, size_t size, int flags); 28 int edtt_write(uint8_t *ptr, size_t size, int flags); 29 30 #if defined(CONFIG_ARCH_POSIX) 31 /** 32 * Exclusive functions for the BabbleSim driver 33 */ 34 void enable_edtt_mode(void); 35 void set_edtt_autoshutdown(bool mode); 36 #endif /* CONFIG_ARCH_POSIX */ 37 38 #ifdef __cplusplus 39 } 40 #endif 41 42 #endif /* EDTT_DRIVER_H */ 43