RetroArch
Classes | Macros | Typedefs | Functions | Variables
bte.h File Reference
#include <gccore.h>
#include "bd_addr.h"
Include dependency graph for bte.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  inquiry_info
 
struct  inquiry_info_ex
 
struct  linkkey_info
 
struct  bte_pcb
 

Macros

#define ERR_OK   0
 
#define ERR_MEM   -1
 
#define ERR_BUF   -2
 
#define ERR_ABRT   -3
 
#define ERR_RST   -4
 
#define ERR_CLSD   -5
 
#define ERR_CONN   -6
 
#define ERR_VAL   -7
 
#define ERR_ARG   -8
 
#define ERR_RTE   -9
 
#define ERR_USE   -10
 
#define ERR_IF   -11
 
#define ERR_PKTSIZE   -17
 
#define HIDP_STATE_READY   0x00
 
#define HIDP_STATE_LISTEN   0x01
 
#define HIDP_STATE_CONNECTING   0x02
 
#define HIDP_STATE_CONNECTED   0x04
 
#define HIDP_CONTROL_CHANNEL   0x11
 
#define HIDP_DATA_CHANNEL   0x13
 
#define HIDP_HDR_TRANS_MASK   0xf0
 
#define HIDP_HDR_PARAM_MASK   0x0f
 
#define HIDP_TRANS_HANDSHAKE   0x00
 
#define HIDP_TRANS_HIDCONTROL   0x10
 
#define HIDP_TRANS_GETREPORT   0x40
 
#define HIDP_TRANS_SETREPORT   0x50
 
#define HIDP_TRANS_GETPROTOCOL   0x60
 
#define HIDP_TRANS_SETPROTOCOL   0x70
 
#define HIDP_TRANS_GETIDLE   0x80
 
#define HIDP_TRANS_SETIDLE   0x90
 
#define HIDP_TRANS_DATA   0xa0
 
#define HIDP_TRANS_DATAC   0xb0
 
#define HIDP_HSHK_SUCCESSFULL   0x00
 
#define HIDP_HSHK_NOTREADY   0x01
 
#define HIDP_HSHK_INV_REPORTID   0x02
 
#define HIDP_HSHK_NOTSUPPORTED   0x03
 
#define HIDP_HSHK_IVALIDPARAM   0x04
 
#define HIDP_HSHK_UNKNOWNERROR   0x0e
 
#define HIDP_HSHK_FATALERROR   0x0f
 
#define HIDP_CTRL_NOP   0x00
 
#define HIDP_CTRL_HARDRESET   0x01
 
#define HIDP_CTRL_SOFTRESET   0x02
 
#define HIDP_CTRL_SUSPEND   0x03
 
#define HIDP_CTRL_RESUME   0x04
 
#define HIDP_CTRL_VC_UNPLUG   0x05
 
#define HIDP_DATA_RTYPE_MASK   0x03
 
#define HIDP_DATA_RSRVD_MASK   0x0c
 
#define HIDP_DATA_RTYPE_OTHER   0x00
 
#define HIDP_DATA_RTYPE_INPUT   0x01
 
#define HIDP_DATA_RTYPE_OUPUT   0x02
 
#define HIDP_DATA_RTYPE_FEATURE   0x03
 
#define HIDP_PROTO_BOOT   0x00
 
#define HIDP_PROTO_REPORT   0x01
 

Typedefs

typedef s32(* btecallback) (s32 result, void *userdata)
 

Functions

void BTE_Init ()
 
void BTE_Shutdown ()
 
s32 BTE_InitCore (btecallback cb)
 
s32 BTE_ApplyPatch (btecallback cb)
 
s32 BTE_InitSub (btecallback cb)
 
s32 BTE_ReadStoredLinkKey (struct linkkey_info *keys, u8 max_cnt, btecallback cb)
 
s32 BTE_ReadBdAddr (struct bd_addr *bdaddr, btecallback cb)
 
struct bte_pcbbte_new ()
 
void bte_arg (struct bte_pcb *pcb, void *arg)
 
void bte_received (struct bte_pcb *pcb, s32(*recv)(void *arg, void *buffer, u16 len))
 
void bte_disconnected (struct bte_pcb *pcb, s32(disconn_cfm)(void *arg, struct bte_pcb *pcb, u8 err))
 
s32 bte_registerdeviceasync (struct bte_pcb *pcb, struct bd_addr *bdaddr, s32(*conn_cfm)(void *arg, struct bte_pcb *pcb, u8 err))
 
s32 bte_disconnect (struct bte_pcb *pcb)
 
s32 bte_inquiry (struct inquiry_info *info, u8 max_cnt, u8 flush)
 
s32 bte_inquiry_ex (struct inquiry_info_ex *info, u8 max_cnt, u8 flush)
 
s32 bte_senddata (struct bte_pcb *pcb, void *message, u16 len)
 
s32 bte_sendmessage (struct bte_pcb *pcb, void *message, u16 len)
 
s32 bte_sendmessageasync (struct bte_pcb *pcb, void *message, u16 len, s32(*sent)(void *arg, struct bte_pcb *pcb, u8 err))
 

Variables

void(*)(struct bd_addr *bdaddr, u8 reason) BTE_SetDisconnectCallback (void(*callback)(struct bd_addr *bdaddr, u8 reason))
 

Macro Definition Documentation

◆ ERR_ABRT

#define ERR_ABRT   -3

◆ ERR_ARG

#define ERR_ARG   -8

◆ ERR_BUF

#define ERR_BUF   -2

◆ ERR_CLSD

#define ERR_CLSD   -5

◆ ERR_CONN

#define ERR_CONN   -6

◆ ERR_IF

#define ERR_IF   -11

◆ ERR_MEM

#define ERR_MEM   -1

◆ ERR_OK

#define ERR_OK   0

◆ ERR_PKTSIZE

#define ERR_PKTSIZE   -17

◆ ERR_RST

#define ERR_RST   -4

◆ ERR_RTE

#define ERR_RTE   -9

◆ ERR_USE

#define ERR_USE   -10

◆ ERR_VAL

#define ERR_VAL   -7

◆ HIDP_CONTROL_CHANNEL

#define HIDP_CONTROL_CHANNEL   0x11

◆ HIDP_CTRL_HARDRESET

#define HIDP_CTRL_HARDRESET   0x01

◆ HIDP_CTRL_NOP

#define HIDP_CTRL_NOP   0x00

◆ HIDP_CTRL_RESUME

#define HIDP_CTRL_RESUME   0x04

◆ HIDP_CTRL_SOFTRESET

#define HIDP_CTRL_SOFTRESET   0x02

◆ HIDP_CTRL_SUSPEND

#define HIDP_CTRL_SUSPEND   0x03

◆ HIDP_CTRL_VC_UNPLUG

#define HIDP_CTRL_VC_UNPLUG   0x05

◆ HIDP_DATA_CHANNEL

#define HIDP_DATA_CHANNEL   0x13

◆ HIDP_DATA_RSRVD_MASK

#define HIDP_DATA_RSRVD_MASK   0x0c

◆ HIDP_DATA_RTYPE_FEATURE

#define HIDP_DATA_RTYPE_FEATURE   0x03

◆ HIDP_DATA_RTYPE_INPUT

#define HIDP_DATA_RTYPE_INPUT   0x01

◆ HIDP_DATA_RTYPE_MASK

#define HIDP_DATA_RTYPE_MASK   0x03

◆ HIDP_DATA_RTYPE_OTHER

#define HIDP_DATA_RTYPE_OTHER   0x00

◆ HIDP_DATA_RTYPE_OUPUT

#define HIDP_DATA_RTYPE_OUPUT   0x02

◆ HIDP_HDR_PARAM_MASK

#define HIDP_HDR_PARAM_MASK   0x0f

◆ HIDP_HDR_TRANS_MASK

#define HIDP_HDR_TRANS_MASK   0xf0

◆ HIDP_HSHK_FATALERROR

#define HIDP_HSHK_FATALERROR   0x0f

◆ HIDP_HSHK_INV_REPORTID

#define HIDP_HSHK_INV_REPORTID   0x02

◆ HIDP_HSHK_IVALIDPARAM

#define HIDP_HSHK_IVALIDPARAM   0x04

◆ HIDP_HSHK_NOTREADY

#define HIDP_HSHK_NOTREADY   0x01

◆ HIDP_HSHK_NOTSUPPORTED

#define HIDP_HSHK_NOTSUPPORTED   0x03

◆ HIDP_HSHK_SUCCESSFULL

#define HIDP_HSHK_SUCCESSFULL   0x00

◆ HIDP_HSHK_UNKNOWNERROR

#define HIDP_HSHK_UNKNOWNERROR   0x0e

◆ HIDP_PROTO_BOOT

#define HIDP_PROTO_BOOT   0x00

◆ HIDP_PROTO_REPORT

#define HIDP_PROTO_REPORT   0x01

◆ HIDP_STATE_CONNECTED

#define HIDP_STATE_CONNECTED   0x04

◆ HIDP_STATE_CONNECTING

#define HIDP_STATE_CONNECTING   0x02

◆ HIDP_STATE_LISTEN

#define HIDP_STATE_LISTEN   0x01

◆ HIDP_STATE_READY

#define HIDP_STATE_READY   0x00

◆ HIDP_TRANS_DATA

#define HIDP_TRANS_DATA   0xa0

◆ HIDP_TRANS_DATAC

#define HIDP_TRANS_DATAC   0xb0

◆ HIDP_TRANS_GETIDLE

#define HIDP_TRANS_GETIDLE   0x80

◆ HIDP_TRANS_GETPROTOCOL

#define HIDP_TRANS_GETPROTOCOL   0x60

◆ HIDP_TRANS_GETREPORT

#define HIDP_TRANS_GETREPORT   0x40

◆ HIDP_TRANS_HANDSHAKE

#define HIDP_TRANS_HANDSHAKE   0x00

◆ HIDP_TRANS_HIDCONTROL

#define HIDP_TRANS_HIDCONTROL   0x10

◆ HIDP_TRANS_SETIDLE

#define HIDP_TRANS_SETIDLE   0x90

◆ HIDP_TRANS_SETPROTOCOL

#define HIDP_TRANS_SETPROTOCOL   0x70

◆ HIDP_TRANS_SETREPORT

#define HIDP_TRANS_SETREPORT   0x50

Typedef Documentation

◆ btecallback

typedef s32(* btecallback) (s32 result, void *userdata)

Function Documentation

◆ BTE_ApplyPatch()

s32 BTE_ApplyPatch ( btecallback  cb)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ bte_arg()

void bte_arg ( struct bte_pcb pcb,
void arg 
)

◆ bte_disconnect()

s32 bte_disconnect ( struct bte_pcb pcb)
Here is the call graph for this function:

◆ bte_disconnected()

void bte_disconnected ( struct bte_pcb pcb,
s32(disconn_cfm)(void *arg, struct bte_pcb *pcb, u8 err)   
)

◆ BTE_Init()

void BTE_Init ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ BTE_InitCore()

s32 BTE_InitCore ( btecallback  cb)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ BTE_InitSub()

s32 BTE_InitSub ( btecallback  cb)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ bte_inquiry()

s32 bte_inquiry ( struct inquiry_info info,
u8  max_cnt,
u8  flush 
)
Here is the call graph for this function:

◆ bte_inquiry_ex()

s32 bte_inquiry_ex ( struct inquiry_info_ex info,
u8  max_cnt,
u8  flush 
)
Here is the call graph for this function:

◆ bte_new()

struct bte_pcb* bte_new ( )
Here is the call graph for this function:

◆ BTE_ReadBdAddr()

s32 BTE_ReadBdAddr ( struct bd_addr bdaddr,
btecallback  cb 
)
Here is the call graph for this function:

◆ BTE_ReadStoredLinkKey()

s32 BTE_ReadStoredLinkKey ( struct linkkey_info keys,
u8  max_cnt,
btecallback  cb 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ bte_received()

void bte_received ( struct bte_pcb pcb,
s32(*)(void *arg, void *buffer, u16 len recv 
)
Here is the call graph for this function:

◆ bte_registerdeviceasync()

s32 bte_registerdeviceasync ( struct bte_pcb pcb,
struct bd_addr bdaddr,
s32(*)(void *arg, struct bte_pcb *pcb, u8 err)  conn_cfm 
)
Here is the call graph for this function:

◆ bte_senddata()

s32 bte_senddata ( struct bte_pcb pcb,
void message,
u16  len 
)
Here is the call graph for this function:

◆ bte_sendmessage()

s32 bte_sendmessage ( struct bte_pcb pcb,
void message,
u16  len 
)
Here is the call graph for this function:

◆ bte_sendmessageasync()

s32 bte_sendmessageasync ( struct bte_pcb pcb,
void message,
u16  len,
s32(*)(void *arg, struct bte_pcb *pcb, u8 err)  sent 
)
Here is the call graph for this function:

◆ BTE_Shutdown()

void BTE_Shutdown ( )
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ BTE_SetDisconnectCallback

void(*)(struct bd_addr *bdaddr, u8 reason) BTE_SetDisconnectCallback(void(*callback)(struct bd_addr *bdaddr, u8 reason))