/*******************************************************************************
* Project:      Amped'RF Bluetooth
* File name:    TM_btos_interface.h
* Description:
*
* Copyright (c) 2016 Amped'RF Inc., AR Technology  All rights reserved.
*******************************************************************************/
#ifndef _TM_BTOS_INTERFACE_H_
#define _TM_BTOS_INTERFACE_H_

uint8   TM_GetBTDevState(void);
uint8   TM_GetBTSleepEnable(void);
void    TM_SetBTDevState(uint8 state);
void    TM_SetBTSleepEnable(uint8 state);
uint16  BTM_NotSniffCount(void);

void    TM_SendToUartDMA(uint16 u);
bool    TM_GetDeepSleepEnable(void);
bool    TM_GetShallowSleepEnable(void);

bool    Is_iAP_SOP(uint16 PortHandle);
uint16  OS_ConnectionCount(void);
bool    OS_IsConnected(tBdAddr *pAddr);
bool    OS_IsHandleConnected(uint16 handle);
bool    OS_IsNodeConnected(uint8 node);
uint8   OS_GetNodeFromHandle(uint16 handleID);
uint8   OS_GetProfileID(uint16 PortHandle);
tBdAddr OS_GetBdAddressFromHandle(uint16 PortHandle);
uint16  OS_GetHandleFromNode(uint8 node);

void    OS_SendingDataToHandle(uint16 Handle, tBufferHeader *pBufHdr, uint16 RxLen);
void    OS_SendDataToHandle(uint16 Handle, uint8 *pData, uint16 length);


#endif
