1 /* 2 * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 /** 8 * common/bt_defs.h Defines useful API for whole Bluedroid 9 * 10 */ 11 #ifndef _BT_DEFS_H_ 12 #define _BT_DEFS_H_ 13 14 #include <stdlib.h> 15 #include <stdint.h> 16 #include <arpa/inet.h> 17 #include "bt_common.h" 18 #include "common/bt_target.h" 19 20 #define UNUSED(x) (void)(x) 21 22 /*Timer Related Defination*/ 23 24 //by Snake.T 25 typedef void (TIMER_CBACK)(void *p_tle); 26 typedef struct _tle { 27 struct _tle *p_next; 28 struct _tle *p_prev; 29 TIMER_CBACK *p_cback; 30 INT32 ticks; 31 INT32 ticks_initial; 32 TIMER_PARAM_TYPE param; 33 TIMER_PARAM_TYPE data; 34 UINT16 event; 35 UINT8 in_use; 36 } TIMER_LIST_ENT; 37 38 #define alarm_timer_t uint32_t 39 #define alarm_timer_setfn(timer, cb, data) \ 40 do { \ 41 } while (0) 42 #define alarm_timer_arm(timer, to, periodic) \ 43 do { \ 44 } while (0) 45 #define alarm_timer_disarm(timer) \ 46 do { \ 47 } while (0) 48 #define alarm_timer_now() (0) 49 50 51 /*Bluetooth Address*/ 52 typedef struct { 53 uint8_t address[6]; 54 } __attribute__ ((__packed__)) bt_bdaddr_t; 55 56 /** Bluetooth 128-bit UUID */ 57 typedef struct { 58 uint8_t uu[16]; 59 } bt_uuid_t; 60 61 #ifndef CPU_LITTLE_ENDIAN 62 #define CPU_LITTLE_ENDIAN 63 #endif 64 65 #endif /* _BT_DEFS_H_ */ 66