move structs to header

This commit is contained in:
matthias.ringwald 2011-07-29 22:12:27 +00:00
parent 01a3cd9016
commit 3af7c95d47
2 changed files with 20 additions and 21 deletions

View File

@ -60,3 +60,23 @@ typedef struct {
extern remote_device_db_t remote_device_db_iphone;
extern remote_device_db_t remote_device_db_memory;
// MARK: non-persisten implementation
#include <btstack/linked_list.h>
#define MAX_NAME_LEN 32
typedef struct {
// linked list - assert: first field
linked_item_t item;
bd_addr_t bd_addr;
link_key_t link_key;
char device_name[MAX_NAME_LEN];
} db_mem_device_t;
typedef struct {
// linked list - assert: first field
linked_item_t item;
char service_name[MAX_NAME_LEN];
uint8_t channel;
} db_mem_service_t;

View File

@ -35,29 +35,8 @@
#include "remote_device_db.h"
#include "debug.h"
#include <btstack/linked_list.h>
#include <btstack/utils.h>
#define MAX_NAME_LEN 32
typedef struct {
// linked list - assert: first field
linked_item_t item;
bd_addr_t bd_addr;
link_key_t link_key;
char device_name[MAX_NAME_LEN];
} db_mem_device_t;
typedef struct {
// linked list - assert: first field
linked_item_t item;
char service_name[MAX_NAME_LEN];
uint8_t channel;
} db_mem_service_t;
static linked_list_t db_mem_devices;
static linked_list_t db_mem_services;