OSXBLUEVOICE: OSX_BLUEVOICE_Exported_Functions

STM32 OSX BlueVoice

OSXBLUEVOICE
Documentation for OSXBLUEVOICE Library for STM32, BlueNRG and MP34DT01-M
OSX_BLUEVOICE_Exported_Functions

Functions

OSX_BV_Status osx_BlueVoice_Initialize (void)
 This function is called to initialize the bluevoice library. More...
 
OSX_BV_Status osx_BlueVoice_SetConfig (OSX_BLUEVOICE_Config_t *OSX_BLUEVOICE_Config)
 This function is called to set the configuration parameters. More...
 
uint8_t osx_BlueVoice_IsProfileConfigured (void)
 This function returns if the BlueVoice Profile is configured. More...
 
OSX_BV_Status osx_BlueVoice_AddService (uint8_t *service_uuid, uint16_t *service_handle)
 This function is called to add BlueVoice Service. More...
 
OSX_BV_Status osx_BlueVoice_AddChar (OSX_BLUEVOICE_uuid_t uuid, uint16_t service_handle, OSX_BLUEVOICE_ProfileHandle_t *handle)
 This function is called to add BlueVoice characteristics. More...
 
OSX_BV_Status osx_BlueVoice_SetTxHandle (OSX_BLUEVOICE_ProfileHandle_t *tx_handle)
 This function is called to set the handles if the BlueVoice characteristics are added out of the library. More...
 
OSX_BV_Status osx_BlueVoice_SetRxHandle (OSX_BLUEVOICE_ProfileHandle_t *rx_handle)
 This function is called to set the handles discovered, if an other BlueVoice module is available. More...
 
OSX_BV_Profile_Status osx_BlueVoice_GetStatus (void)
 This function returns the BLUEVOICE Profile State Machine status. More...
 
OSX_BV_Mode osx_BlueVoice_GetMode (void)
 This function returns the current modality. More...
 
OSX_BV_Status osx_BlueVoice_IncTick (void)
 This function increases the the internal counter, used to switch from Receiving/Streaming to Ready status. More...
 
OSX_BV_Status osx_BlueVoice_EnableNotification (void)
 This function is called to enable notifications mechanism. More...
 
OSX_BV_Status osx_BlueVoice_AudioIn (uint16_t *buffer, uint8_t Nsamples)
 This function is called to fill audio buffer. More...
 
OSX_BV_Status osx_BlueVoice_SendData (uint16_t *NbyteSent)
 This function must be called when the compressed audio data are ready, (when the function BLUEVOICE_AudioIn returns OSX_BV_OUT_BUF_READY) More...
 
OSX_BV_Status osx_BlueVoice_ParseData (uint8_t *buffer_in, uint32_t Len, uint16_t attr_handle, uint8_t *buffer_out, uint8_t *samples)
 This function is called to parse received data. More...
 

Detailed Description

Function Documentation

OSX_BV_Status osx_BlueVoice_AddChar ( OSX_BLUEVOICE_uuid_t  uuid,
uint16_t  service_handle,
OSX_BLUEVOICE_ProfileHandle_t handle 
)

This function is called to add BlueVoice characteristics.

Parameters
uuidIt contains the uuid values of the Audio and audioSync characteristics.
service_handleHandle of the service to which the characteristic must be added.
handlePointer to a BLUEVOICE_ProfileHandle_t struct in which the handles will be saved.
Return values
OSX_BV_StatusOSX_BV_SUCCESS in case of success, OSX_BV_ERROR otherwise.
OSX_BV_Status osx_BlueVoice_AddService ( uint8_t *  service_uuid,
uint16_t *  service_handle 
)

This function is called to add BlueVoice Service.

Parameters
service_uuidService uuid value.
service_handlePointer to a variable in which the service handle will be saved.
Return values
OSX_BV_StatusValue indicating success or error code.
OSX_BV_Status osx_BlueVoice_AudioIn ( uint16_t *  buffer,
uint8_t  Nsamples 
)

This function is called to fill audio buffer.

Parameters
bufferAudio in PCM buffer.
NsamplesNumber of PCM 16 bit audio samples.
Return values
OSX_BV_StatusValue indicating success or error code.
OSX_BV_Status osx_BlueVoice_EnableNotification ( void  )

This function is called to enable notifications mechanism.

Parameters
None.
Return values
OSX_BV_StatusValue indicating success or error code.
OSX_BV_Mode osx_BlueVoice_GetMode ( void  )

This function returns the current modality.

Parameters
None.
Return values
OSX_BV_ModeCurrent working modality: NOT_READY, RECEIVER, TRANSMITTER or HALF_DUPLEX.
OSX_BV_Profile_Status osx_BlueVoice_GetStatus ( void  )

This function returns the BLUEVOICE Profile State Machine status.

Parameters
None.
Return values
OSX_BV_Profile_StatusBLUEVOICE Profile Status.
OSX_BV_Status osx_BlueVoice_IncTick ( void  )

This function increases the the internal counter, used to switch from Receiving/Streaming to Ready status.

Parameters
None.
Return values
OSX_BV_StatusValue indicating success or error code.
OSX_BV_Status osx_BlueVoice_Initialize ( void  )

This function is called to initialize the bluevoice library.

Parameters
None.
Return values
OSX_BV_StatusOSX_BV_SUCCESS if the configuration is ok, OSX_BV_ERROR otherwise.
uint8_t osx_BlueVoice_IsProfileConfigured ( void  )

This function returns if the BlueVoice Profile is configured.

Parameters
None.
Return values
uint8_t1 if the profile is configured 0 otherwise.
OSX_BV_Status osx_BlueVoice_ParseData ( uint8_t *  buffer_in,
uint32_t  Len,
uint16_t  attr_handle,
uint8_t *  buffer_out,
uint8_t *  samples 
)

This function is called to parse received data.

Parameters
buffer_in8-bit packed ADPCM samples source buffer.
LenDimension in Bytes.
attr_handleHandle of the updated characteristic.
buffer_out16-bit PCM samples destination buffer.
samplesNumber of 16-bit PCM samples in the destination buffer.
Return values
OSX_BV_StatusValue indicating success or error code.
OSX_BV_Status osx_BlueVoice_SendData ( uint16_t *  NbyteSent)

This function must be called when the compressed audio data are ready, (when the function BLUEVOICE_AudioIn returns OSX_BV_OUT_BUF_READY)

Parameters
NbyteSentNumber of bytes sent.
Return values
OSX_BV_StatusValue indicating success or error code.
OSX_BV_Status osx_BlueVoice_SetConfig ( OSX_BLUEVOICE_Config_t OSX_BLUEVOICE_Config)

This function is called to set the configuration parameters.

Parameters
OSX_BLUEVOICE_ConfigIt contains the configuration parameters.
Return values
OSX_BV_StatusOSX_BV_SUCCESS if the configuration is ok, OSX_BV_ERROR otherwise.
OSX_BV_Status osx_BlueVoice_SetRxHandle ( OSX_BLUEVOICE_ProfileHandle_t rx_handle)

This function is called to set the handles discovered, if an other BlueVoice module is available.

Parameters
rx_handlePointer to a OSX_BLUEVOICE_ProfileHandle_t struct in which the handles are stored.
Return values
OSX_BV_StatusOSX_BV_SUCCESS in case of success, OSX_BV_ERROR otherwise.
OSX_BV_Status osx_BlueVoice_SetTxHandle ( OSX_BLUEVOICE_ProfileHandle_t tx_handle)

This function is called to set the handles if the BlueVoice characteristics are added out of the library.

Parameters
tx_handlePointer to a OSX_BLUEVOICE_ProfileHandle_t struct in which the handles are stored.
Return values
OSX_BV_StatusOSX_BV_SUCCESS in case of success, OSX_BV_ERROR otherwise.
Generated on Mon Aug 29 2016 15:19:56 for OSXBLUEVOICE by   doxygen 1.8.9.1