BLE_L2CAP_CbRegisterSpsm
C
uint16_t BLE_L2CAP_CbRegisterSpsm(uint16_t spsm, uint16_t mtu, uint16_t mps, uint16_t initCredits, uint8_t permission);Description
Registers an SPSM (Simplified Protocol/Service Multiplexer).
Note
This function must be called before establishing a credit-based channel.
Parameters
| Parameter | Description |
|---|---|
| [in] spsm | The SPSM value. See the range L2CAP SPSM dynamic range. |
| [in] mtu | The Maximum Transmission Unit. See the range L2CAP minimum MTU size ,Maximum PDU size. |
| [in] mps | The Maximum PDU (Protocol Data Unit) Payload Size. See the minimum size L2CAP minimum MPS size. |
| [in] initCredits | The initial number of credits. |
| [in] permission | The permission setting for the SPSM. See L2CAP Permission definitions |
Return values
| Return value | Description |
|---|---|
| MBA_RES_SUCCESS | SSuccessfully registered the SPSM. |
| MBA_RES_INVALID_PARA | Invalid parameter, such as an out-of-range MTU. |
| MBA_RES_FAIL | Failed to register the SPSM. |
