GATE
devices.h File Reference

specific user device utilities More...

#include "gate/system/gate_system_api.h"
#include "gate/gatetypes.h"
#include "gate/times.h"
#include "gate/guids.h"
#include "gate/strings.h"

Classes

struct  gate_device_entry_class
 
struct  gate_device_bth_class
 
struct  gate_device_bthle_service_class
 
struct  gate_device_bthle_class
 
struct  gate_device_bthle_characteristic_class
 

Macros

#define GATE_DEVICE_ENTRY_SOURCE_OS   1
 
#define GATE_DEVICE_ENTRY_SOURCE_HARDWARE   2
 
#define GATE_DEVICE_BTHLE_FLAG_READABLE   0x0001
 
#define GATE_DEVICE_BTHLE_FLAG_WRITABLE   0x0002
 

Typedefs

typedef struct gate_device_entry_class gate_device_entry_t
 
typedef gate_bool_t(* gate_device_entry_callback_t) (gate_device_entry_t *, void *)
 
typedef struct gate_device_bth_class gate_device_bth_t
 
typedef gate_bool_t(* gate_device_bth_enum_callback) (gate_device_bth_t const *, void *param)
 
typedef struct gate_device_bthle_service_class gate_device_bthle_service_t
 
typedef struct gate_device_bthle_class gate_device_bthle_t
 
typedef gate_bool_t(* gate_device_bthle_enum_callback_t) (gate_device_bthle_t const *, void *param)
 
typedef struct gate_device_bthle_characteristic_class gate_device_bthle_characteristic_t
 
typedef gate_bool_t(* gate_device_bthle_service_enum_callback_t) (gate_device_bthle_characteristic_t const *chara, void *user_param)
 

Functions

GATE_SYSTEM_API gate_result_t gate_device_entry_init (gate_device_entry_t *entry)
 
GATE_SYSTEM_API void gate_device_entry_release (gate_device_entry_t *entry)
 
GATE_SYSTEM_API gate_result_t gate_device_entries_enum (unsigned entry_source, gate_device_entry_callback_t callback, void *user_param)
 
GATE_SYSTEM_API gate_result_t gate_device_bth_enum (gate_device_bth_enum_callback callback, void *userparam)
 
GATE_SYSTEM_API gate_result_t gate_device_bthle_enum (gate_device_bthle_enum_callback_t callback, void *userparam)
 
GATE_SYSTEM_API gate_result_t gate_device_bthle_get (gate_string_t const *uid, gate_device_bthle_t *device)
 
GATE_SYSTEM_API gate_result_t gate_device_bthle_get_by_address (gate_string_t const *address, gate_device_bthle_t *device)
 
GATE_SYSTEM_API gate_result_t gate_device_bthle_service_enum (gate_device_bthle_t const *device, gate_device_bthle_service_t const *service, gate_device_bthle_service_enum_callback_t callback, void *userparam)
 
GATE_SYSTEM_API gate_result_t gate_device_bthle_characteristic_get (gate_device_bthle_t const *device, gate_guid_t const *service_guid, gate_guid_t const *characteristic_guid, char *buffer, gate_size_t *buffer_len)
 
GATE_SYSTEM_API gate_result_t gate_device_bthle_characteristic_set (gate_device_bthle_t const *device, gate_guid_t const *service_guid, gate_guid_t const *characteristic_guid, char const *buffer, gate_size_t buffer_len)
 

Detailed Description

specific user device utilities

Macro Definition Documentation

◆ GATE_DEVICE_ENTRY_SOURCE_HARDWARE

#define GATE_DEVICE_ENTRY_SOURCE_HARDWARE   2

device tree defined by the hardware/firmware

◆ GATE_DEVICE_ENTRY_SOURCE_OS

#define GATE_DEVICE_ENTRY_SOURCE_OS   1

Device tree defined by the operating system