btstack_event.h (fee35eba895151119eb5fa23ad441c948c0e618a) btstack_event.h (38c89bb1b787ecaadaf06c8fdbafdec93ebe70cf)
1/*
2 * Copyright (C) 2016 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 2962 unchanged lines hidden (view full) ---

2971 */
2972static inline uint16_t sm_event_identity_created_get_index(const uint8_t * event){
2973 return little_endian_read_16(event, 18);
2974}
2975#endif
2976
2977#ifdef ENABLE_BLE
2978/**
1/*
2 * Copyright (C) 2016 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 2962 unchanged lines hidden (view full) ---

2971 */
2972static inline uint16_t sm_event_identity_created_get_index(const uint8_t * event){
2973 return little_endian_read_16(event, 18);
2974}
2975#endif
2976
2977#ifdef ENABLE_BLE
2978/**
2979 * @brief Get field handle from event SM_EVENT_PAIRING_STARTED
2980 * @param event packet
2981 * @return handle
2982 * @note: btstack_type H
2983 */
2984static inline hci_con_handle_t sm_event_pairing_started_get_handle(const uint8_t * event){
2985 return little_endian_read_16(event, 2);
2986}
2987/**
2988 * @brief Get field addr_type from event SM_EVENT_PAIRING_STARTED
2989 * @param event packet
2990 * @return addr_type
2991 * @note: btstack_type 1
2992 */
2993static inline uint8_t sm_event_pairing_started_get_addr_type(const uint8_t * event){
2994 return event[4];
2995}
2996/**
2997 * @brief Get field address from event SM_EVENT_PAIRING_STARTED
2998 * @param event packet
2999 * @param Pointer to storage for address
3000 * @note: btstack_type B
3001 */
3002static inline void sm_event_pairing_started_get_address(const uint8_t * event, bd_addr_t address){
3003 reverse_bytes(&event[5], address, 6);
3004}
3005#endif
3006
3007#ifdef ENABLE_BLE
3008/**
2979 * @brief Get field handle from event SM_EVENT_PAIRING_COMPLETE
2980 * @param event packet
2981 * @return handle
2982 * @note: btstack_type H
2983 */
2984static inline hci_con_handle_t sm_event_pairing_complete_get_handle(const uint8_t * event){
2985 return little_endian_read_16(event, 2);
2986}

--- 6180 unchanged lines hidden ---
3009 * @brief Get field handle from event SM_EVENT_PAIRING_COMPLETE
3010 * @param event packet
3011 * @return handle
3012 * @note: btstack_type H
3013 */
3014static inline hci_con_handle_t sm_event_pairing_complete_get_handle(const uint8_t * event){
3015 return little_endian_read_16(event, 2);
3016}

--- 6180 unchanged lines hidden ---