ble_gatt_client
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
bluetooth.c File Reference

various bluetooth functions More...

#include <stdio.h>
#include <errno.h>
#include <ctype.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include "bluetooth.h"
#include "hci.h"

Go to the source code of this file.

Functions

void baswap (bdaddr_t *dst, const bdaddr_t *src)
 
char * batostr (const bdaddr_t *ba)
 
bdaddr_t * strtoba (const char *str)
 
int ba2str (const bdaddr_t *ba, char *str)
 
int str2ba (const char *str, bdaddr_t *ba)
 
int ba2oui (const bdaddr_t *ba, char *str)
 
int bachk (const char *str)
 
int baprintf (const char *format,...)
 
int bafprintf (FILE *stream, const char *format,...)
 
int basprintf (char *str, const char *format,...)
 
int basnprintf (char *str, size_t size, const char *format,...)
 
void * bt_malloc (size_t size)
 
void bt_free (void *ptr)
 
int bt_error (uint16_t code)
 
const char * bt_compidtostr (int compid)
 

Detailed Description

various bluetooth functions

Author
Gilbert Brault

Definition in file bluetooth.c.

Function Documentation

int ba2oui ( const bdaddr_t *  ba,
char *  str 
)

Definition at line 107 of file bluetooth.c.

int ba2str ( const bdaddr_t *  ba,
char *  str 
)

Definition at line 86 of file bluetooth.c.

Referenced by l2cap_le_att_connect().

int bachk ( const char *  str)

Definition at line 112 of file bluetooth.c.

Referenced by str2ba().

int bafprintf ( FILE *  stream,
const char *  format,
  ... 
)

Definition at line 149 of file bluetooth.c.

int baprintf ( const char *  format,
  ... 
)

Definition at line 137 of file bluetooth.c.

int basnprintf ( char *  str,
size_t  size,
const char *  format,
  ... 
)

Definition at line 173 of file bluetooth.c.

int basprintf ( char *  str,
const char *  format,
  ... 
)

Definition at line 161 of file bluetooth.c.

void baswap ( bdaddr_t *  dst,
const bdaddr_t *  src 
)

Definition at line 50 of file bluetooth.c.

Referenced by strtoba().

char* batostr ( const bdaddr_t *  ba)

Definition at line 60 of file bluetooth.c.

References bt_malloc().

const char* bt_compidtostr ( int  compid)

Definition at line 270 of file bluetooth.c.

void bt_free ( void *  ptr)

Definition at line 190 of file bluetooth.c.

Referenced by hci_lmtostr().

void* bt_malloc ( size_t  size)
int str2ba ( const char *  str,
bdaddr_t *  ba 
)

Definition at line 92 of file bluetooth.c.

References bachk().

Referenced by hci_devid(), main(), and strtoba().

bdaddr_t* strtoba ( const char *  str)

Definition at line 73 of file bluetooth.c.

References baswap(), bt_malloc(), and str2ba().