43 int (*
open)(
SDEV **ep,
int dev_type,
const uint8_t *info);
69 uint8_t rx_buffer[0x5C];
70 void (*on_connect)(
int conn);
131int BtAccessor_New(
int cepid,
int msg,
int no_servers,
int zero)
132__swi_end(0x420, BtAccessor_New, (cepid, msg, no_servers, zero));
139void BtAccessor_Delete(
int oh)
140__swi_end(0x421, BtAccessor_Delete, (oh));
148uint32_t BTA_ObjMsg(
void *ev)
165int BTA_Server_New(
int oh,
int proto,
int master,
int encrypt,
int authenticate,
int authorize,
int rx_mtu,
int tx_mtu,
int tid)
166__swi_end(0x424, BTA_Server_New, (oh, proto, master, encrypt, authenticate, authorize, rx_mtu, tx_mtu, tid));
177void BTA_Server_StartReq(
int oh,
int server,
int sdp_record,
int unk,
int tid)
178__swi_end(0x425, BTA_Server_StartReq, (oh, server, sdp_record, unk, tid));
188void BTA_Server_AcceptReq(
int oh,
int server,
int enable,
int tid)
189__swi_end(0x426, BTA_Server_AcceptReq, (oh, server, enable, tid));
198void BTA_Server_StopReq(
int oh,
int server,
int tid)
199__swi_end(0x427, BTA_Server_StopReq, (oh, server, tid));
207void BTA_Server_Delete(
int oh,
int server)
208__swi_end(0x428, BTA_Server_Delete, (oh, server));
217void BTA_Sdp_Converter_New(
int oh,
void *(*alloc)(
unsigned int),
void (*
free)(
void *))
229int BTA_SdpRec_New(
int oh,
const uint8_t uuid[16],
int proto,
int channel)
230__swi_end(0x42A, BTA_SdpRec_New, (oh, uuid, proto, channel));
238void BTA_SdpRec_Delete(
int oh,
int record)
239__swi_end(0x42B, BTA_SdpRec_Delete, (oh, record));
248void BTA_Conn_CloseReq(
int oh,
int conn,
int tid)
249__swi_end(0x42C, BTA_Conn_CloseReq, (oh, conn, tid));
256const uint8_t *BT_GetLocAddr(
void)
286void BT_SetSecurityCheck(
int lo,
int unk1,
int unk2,
int unk3)
287__swi_end(0x430, BT_SetSecurityCheck, (lo, unk1, unk2, unk3));
323int BTA_Conn_New_L2CAP(
int oh,
const uint8_t addr[6],
int sapi_type,
int psm,
int master,
int encrypt,
int authenticate,
int rx_mtu,
int tx_mtu,
int tid)
324__swi_end(0x433, BTA_Conn_New_L2CAP, (oh, addr, sapi_type, psm, master, encrypt, authenticate, rx_mtu, tx_mtu, tid));
340int BTA_Conn_New_RFCOMM(
int oh,
const uint8_t addr[8],
int sapi_type,
int channel,
int master,
int encrypt,
int authenticate,
int tid)
341__swi_end(0x450, BTA_Conn_New_RFCOMM, (oh, addr, sapi_type, channel, master, encrypt, authenticate, tid));
358int BTA_ServiceSearch_StartReq(
int oh,
const uint8_t addr[8],
const void *uuids,
const uint16_t *attrs,
int nattrs,
int tid)
359__swi_end(0x451, BTA_ServiceSearch_StartReq, (oh, addr, uuids, attrs, nattrs, tid));
369void BTA_ServiceSearch_StopReq(
int oh,
int remdev,
int tid)
370__swi_end(0x452, BTA_ServiceSearch_StopReq, (oh, remdev, tid));
392int BTA_DeviceListView_GetList(
int oh,
int type)
393__swi_end(0x447, BTA_DeviceListView_GetList, (oh, type));
402int BTA_DeviceListView_GetNumberOfEntries(
int oh,
int list)
403__swi_end(0x448, BTA_DeviceListView_GetNumberOfEntries, (oh, list));
413void BTA_DeviceListView_GetEntryReq(
int oh,
int list,
int index,
int tid)
414__swi_end(0x449, BTA_DeviceListView_GetEntryReq, (oh, list, index, tid));
422void BTA_DeviceListView_StopList(
int oh,
int list)
423__swi_end(0x44A, BTA_DeviceListView_StopList, (oh, list));
433__swi_end(0x44B, BTA_RemBtDeviceInfo_GetAddress, (oh, device));
443__swi_end(0x44C, BTA_RemBtDeviceInfo_GetName, (oh, device));
453void BTA_Conn_GetL2CAPParamReq(
int oh,
int conn,
int tid)
454__swi_end(0x45F, BTA_Conn_GetL2CAPParamReq, (oh, conn, tid));
463CA_REMDEV *BTA_Conn_GetRemDevInfo(
int oh,
int conn)
464__swi_end(0x460, BTA_Conn_GetRemDevInfo, (oh, conn));
474uint32_t BTA_RemBtDeviceInfo_GetStatus(
int oh,
const CA_REMDEV *device,
int what)
475__swi_end(0x461, BTA_RemBtDeviceInfo_GetStatus, (oh, device, what));
483void BTA_AclDisconnectReq(
int tid,
const uint8_t addr[6])
484__swi_end(0x462, BTA_AclDisconnectReq, (tid, addr));
493void BTA_DeviceDiscovery_StartSearchReq(
int oh, uint32_t service,
int tid)
494__swi_end(0x4AE, BTA_DeviceDiscovery_StartSearchReq, (oh, service, tid));
505void BTA_DeviceDiscovery_StartSearchCodReq(
int oh, uint32_t cod_class, uint32_t iac,
int tid)
506__swi_end(0x4AF, BTA_DeviceDiscovery_StartSearchCodReq, (oh, cod_class, iac, tid));
517void BTA_DeviceDiscovery_StartSearchCodReq(
int oh, uint32_t cod, uint32_t cod_mask, uint32_t iac,
int tid)
518__swi_end(0x4AF, BTA_DeviceDiscovery_StartSearchCodReq, (oh, cod, cod_mask, iac, tid));
527void BTA_DeviceDiscovery_StopSearchReq(
int oh,
int tid)
528__swi_end(0x4B0, BTA_DeviceDiscovery_StopSearchReq, (oh, tid));
538int BTA_RemBtDeviceInfo_SetName(
int oh,
CA_REMDEV *device,
const char *name)
539__swi_end(0x4B1, BTA_RemBtDeviceInfo_SetName, (oh, device, name));
548void *BTA_RemBtDeviceInfo_GetDeviceClass(
int oh,
CA_REMDEV *device)
549__swi_end(0x4B2, BTA_RemBtDeviceInfo_GetDeviceClass, (oh, device));
558void BTA_LocBtDevice_SetVisibilityReq(
int oh, uint32_t visibility,
int tid)
559__swi_end(0x4B3, BTA_LocBtDevice_SetVisibilityReq, (oh, visibility, tid));
568void BTA_LocBtDevice_SetDIACReq(
int oh, uint32_t diac,
int tid)
569__swi_end(0x4B4, BTA_LocBtDevice_SetDIACReq, (oh, diac, tid));
578void BTA_LocBtDevice_SetNameReq(
int oh,
const char *name,
int tid)
579__swi_end(0x4B5, BTA_LocBtDevice_SetNameReq, (oh, name, tid));
588uint32_t BTA_Conn_GetSapiApp(
int oh,
int conn)
589__swi_end(0x4B6, BTA_Conn_GetSapiApp, (oh, conn));
602int BTA_ServiceSearch_RetrieveServiceReq(
int oh, uint32_t device, uint32_t record,
void *param4,
int param5,
int tid)
603__swi_end(0x4B7, BTA_ServiceSearch_RetrieveServiceReq, (oh, device, record, param4, param5, tid));
645uint8_t JSApi_GetConnectionState(
int conn)
646__swi_end(0x4BB, JSApi_GetConnectionState, (conn));
773int CHConnSApp(uint32_t handler_id, uint32_t instance, uint32_t new_handler_id,
const void *connection_info)
905uint16_t
CA_L2CAP_New(uint16_t mr,
CA_REMDEV *remdev,
int sapi,
int psm,
int master,
int encrypt,
int authenticate,
int rx_mtu,
int tx_mtu)
906__swi_end(0x4D6,
CA_L2CAP_New, (mr, remdev, sapi, psm, master, encrypt, authenticate, rx_mtu, tx_mtu));
#define __swi_end(number, func, call)
#define __swi_begin(number)
int index
Endpoint callback instance.
uint8_t device_type
Type of the attached device, 0xFF = none.
uint32_t packet
0: RFCOMM stream, 1: L2CAP packets
uint16_t sig
Signalling instance, 0xFFFF = none.
int(* get_dev)(int index, int *inst)
SDEV * sdev
Attached serial device.
int sdev_param
Passed to the device when it attaches.
int conn
Connection handle, 0 = free.
uint16_t dev_handle
Device handle, 0xFFFE = none.
int handle_set
handle is registered
uint16_t cid
Local CID, 0x40 + entry index.
int read_pending
A read callback is pending.
void * fn[15]
Callback table.
uint16_t handle
Connection handle, 0xFFFE = free.
int inst
Device callback instance.
void(* reg)(SDEV *dev, const void *info)
int(* open)(SDEV **ep, int dev_type, const uint8_t *info)
uint8_t app
Application ID.
int dev_handle_set
dev_handle is registered
uint8_t type
Service type, selected by the PSM.
uint16_t CA_MR_New(int cepid, int msg, const char *file, int line)
Create a CA message replicator: every event of the objects it is subscribed to comes to cepid as GBS ...
void Ca_SasSApp_Init(void)
Initialise the SIM Access Profile server and register it as SDev application 0x13.
uint8_t CA_SapiConnClass(void)
Object class of SAPI connection events (opened, closed, failed, parameters).
uint8_t CA_MR_Class(void)
Object class of the replicator's own events.
int JSApi_ReadBytes(int conn, void *buffer, uint32_t size)
Read received data of a JSApi connection.
int CHConnSApp(uint32_t handler_id, uint32_t instance, uint32_t new_handler_id, const void *connection_info)
Move an open device connection from one SDev application to another.
int JSApi_BytesAvailable(int conn)
Get the number of received bytes waiting in a JSApi connection.
CA_REMDEV * CA_RemDev_New(const uint8_t bd_addr[6])
Create a remote device object for a 6-byte BT address.
void BTLP_InitL2CAP_IO(void)
Initialise the L2CAP port devices: 9 on NSG/ELKA (SAPI 0x0D..0x15), 4 on SG/X75 (SAPI 0x08....
uint16_t CA_L2CAP_New(uint16_t mr, CA_REMDEV *remdev, int sapi, int psm, int master, int encrypt, int authenticate, int rx_mtu, int tx_mtu)
Open an outgoing L2CAP connection; events go to the replicator mr.
void JSApi_InitHandles(void)
Initialise the JSApi slots once and register JSApi as an SDev application.
int Serial_CanOpenSApp(uint32_t handler_id, uint32_t instance)
Check whether an SDev application would accept a connection (opens and closes it again).
void SApp_Register(int handler_id, const SDEV_APP *methods)
Register an SDev application (serial data endpoint) in the application table.
void SDev_InitEndpoint(SDEV *ep)
Initialize an SDev endpoint with the firmware default callbacks.
uint8_t * BT_GetLocalDevice(void)
Get the native local Bluetooth device object.
void CA_DevList_EntryReq(uint16_t list, uint16_t mr, int type, int index)
Ask for one device list entry; the answer (a RemDev copy) comes to mr.
BTLP_CONN * RamBtlpConnections(void)
Get the BTLP (Bluetooth L2CAP port) connection table.
void CA_MR_Stop(uint16_t mr)
Stop a replicator; it then reports CA_MR_Class() event 6 and can be released.
JSAPI_CONN * RamJSApiConnections(void)
Get the JSApi (Java Bluetooth) connection slots.
uint16_t * RamBtBufferPool(void)
Get the native Bluetooth buffer-pool status.
uint16_t CA_DevList(uint16_t local_dev)
Device list object of the local BT device.
const SDEV_APP ** RamSDevApps(void)
Get the SDev application callback table.
void CA_MR_Done(uint16_t mr, void *object_message)
Hand an event (data0 of the replicator's GBS message) back to the replicator.
void BTLP_vDataToAppCallback(int sapi)
Deliver received packets queued on an L2CAP port to its application until it stops taking them.
uint32_t JSApi_CurrentHandleID(int conn)
Find the JSApi (Java Bluetooth) slot of a connection handle.
void BTLP_vFlushBuffer(int mode, int sapi)
Drop the received packets queued on an L2CAP port.
uint8_t CA_DevListClass(void)
Object class of device list answers.
void CA_DevList_CountReq(uint16_t list, uint16_t mr, int type)
Ask for the number of entries of a device list (type 0 = paired); the answer comes to mr.
int JSApi_RegisterConHandle(int conn, uint32_t packet, void(*on_connect)(int conn))
Register a connection handle in a free JSApi slot.
L2CAP_CHANNEL * RamL2capChannelState(void)
Get the L2CAP channel table.
struct CA_REMDEV CA_REMDEV
Remote Bluetooth device object (CA layer), also used by the BTA_RemBtDeviceInfo_* functions.
void CA_RemDev_Free(CA_REMDEV *remdev)
Free a remote device object.
void L2CA_ReadDataReq(const void *message)
L2CAP handler of the L2CA_ReadDataReq signal.
int JSApi_ClearConnectionHandle(int conn)
Free the JSApi slot of a connection handle and its receive buffer.
void CA_Release(uint16_t handle)
Release a CA object handle (replicator, connection).
unsigned BTA_SdpRec_GetChannel(const void *record, int rfcomm)
Server channel from an SDP record's ProtocolDescriptorList.
uint16_t CA_LocalRoot(void)
Root object of the local BT stack.
int JSApi_WriteBytes(int conn, const void *data, uint32_t size)
Send data over a JSApi connection.
int BTLP_uiSendDataOverBT(const void *data, uint32_t size, int sapi)
Send data over an L2CAP port: one buffer per packet from the shared stack pool.
uint16_t CA_LocalDev(uint16_t root, int zero)
Local BT device object.
void CA_MR_Subscribe(uint16_t mr, int code, int class_id)
Subscribe a replicator to the events of an object class.
int ConnSDevSApp(uint32_t sdevice, uint32_t handler_id, const void *connection_info)
Connect a serial device to an SDev application.
int CA_Conn_Close(uint16_t conn, uint16_t owner)
Close a CA connection; owner = the replicator that gets the events.
const uint8_t * CA_LocalAddr(uint16_t local_dev)
BT address of the local device object.
BTLP connection (see RamBtlpConnections).
JSApi connection slot (see RamJSApiConnections).
L2CAP channel (see RamL2capChannelState).
SDev application callbacks.
void free(void *ptr)
Deallocate memory block.