BSB Developer Docs
Loading...
Searching...
No Matches
ble_intercom_types.h File Reference

Typedefs used for data exchange via intercom between ble services on both chips. More...

#include <intercom/intercom.h>
#include <intercom/intercom_frame.h>
#include <furi.h>

Go to the source code of this file.

Data Structures

struct  FURI_PACKED
 Frame header with fields which help control frame exchange. More...
 

Macros

#define BLE_INTERCOM_TX_TIMEOUT_MS   (1000)
 Maximum intercom timeout, exceeding this timeout results in error.
 
#define MAX_BLE_INTERCOM_FRAME_SIZE   (INTERCOM_FRAME_DATA_SIZE - sizeof(BleIntercomFrameHeader))
 Maximum possible ble payload size per one frame.
 

Typedefs

typedef uint8_t BleCommandCode
 Command code type, which allows placing codes from BleSystemCommand and BleServiceCommandEnum.
 
typedef struct FURI_PACKED BleIntercomFrameHeader
 Frame header with fields which help control frame exchange.
 
typedef struct FURI_PACKED BleIntercomFrameGeneric
 Frame transmitted over ble from one side to another.
 
typedef struct FURI_PACKED BleCharacteristicDataHeader
 Header for inner service specific frames.
 
typedef struct FURI_PACKED BleCharacteristicData
 Used for service characteristics data transmissions.
 
typedef uint32_t BleCharacteristicCountType
 Amount of characteristics in one BleIntercomServiceData frame.
 
typedef struct FURI_PACKED BleIntercomServiceData
 Inner service data frame type.
 

Enumerations

enum  BleIntercomFrameSource { BleIntercomFrameSourceUnknown , BleIntercomFrameSourceSystem , BleIntercomFrameSourceService }
 Enumeration of intercom frame sources. More...
 
enum  BleIntercomFrameType { BleIntercomFrameTypeUnknown , BleIntercomFrameTypeRequest , BleIntercomFrameTypeResponse }
 Enumeration of intercom frame types. More...
 

Detailed Description

Typedefs used for data exchange via intercom between ble services on both chips.

Macro Definition Documentation

◆ MAX_BLE_INTERCOM_FRAME_SIZE

#define MAX_BLE_INTERCOM_FRAME_SIZE   (INTERCOM_FRAME_DATA_SIZE - sizeof(BleIntercomFrameHeader))

Maximum possible ble payload size per one frame.

Is less than maximum intercom frame by size of BleIntercomFrameHeader

Typedef Documentation

◆ BleIntercomFrameHeader

Frame header with fields which help control frame exchange.

Contains all data required to send packets via intercom

◆ BleIntercomServiceData

Inner service data frame type.

This struct is send as a data in BleIntercomFrameGeneric

Enumeration Type Documentation

◆ BleIntercomFrameSource

Enumeration of intercom frame sources.

Allows to differ ble commands data from ble services data.

Enumerator
BleIntercomFrameSourceUnknown 

Stub in order to avoid empty frames with zeros from becoming valid.

BleIntercomFrameSourceSystem 

This frame contains ble command data and will be processed by ble.

BleIntercomFrameSourceService 

This frame contains ble service data and will be provided to it for further processing.

◆ BleIntercomFrameType

Enumeration of intercom frame types.

There are to frame types, request and response

Enumerator
BleIntercomFrameTypeUnknown 

Stub in order to avoid empty frames with zeros from becoming valid.

BleIntercomFrameTypeRequest 

Request frame, which contains command or data to be processed by this side.

BleIntercomFrameTypeResponse 

Response frame contains the result from other side.