Texas Instruments CC2540 Software Developers Manual page 144

Bluetooth low energy
Hide thumbs Also See for CC2540:
Table of Contents

Advertisement

Commands
3. Check for and receive these events in the application
hciStatus_t HCI_EXT_BuildRevision( uint8 mode, uint16 userRevNum)
This command is used to either let the user set their own 16-bit revision number
or read the build revision number of the Bluetooth Low Energy Stack library
software. The default value of the user revision number is zero. When the user
updates a Bluetooth Low Energy project by adding their own code, they may use
this API to set their own revision number. When called with mode set to
HCI_EXT_SET_APP_REVISION, the stack will save this value. No event will be
returned from this API when used this way. TI intended this command to be called
from within the target itself. This does not preclude this command from being
received through the HCI but no event will be returned.
Mode – HCI_EXT_SET_APP_REVISION, HCI_EXT_READ_BUILD_REVISION
Parameters
userRevNum – Any 16-bit value
Returns (only when mode == HCI_EXT_SET_USER_REVISION)
LL_STATUS_ERROR_BAD_PARAMETER: an invalid mode
Corresponding Events (only when mode == HCI_EXT_SET_USER_REVISION)
HCI_VendorSpecifcCommandCompleteEvent
hciStatus_t HCI_EXT_ConnEventNoticeCmd ( uint8 taskID, uint16 taskEvent )
This command is used to configure the device to set an event in the user task
after each connection event completes. A non-zero taskEvent value is enable,
while a zero valued taskEvent is disable.
Note
taskID – task ID of the user
Parameters
taskEvent – task event of the user
SUCCESS or FAILURE
Returns
LL_STATUS_ERROR_BAD_PARAMETER: more than one bit is set.
Example (code additions to SimpleBLEPeripheral.c):
1. Define the event in the application.
144
HCI Extension API
(SimpleBLEPeripheral_ProcessEvent())
NOTE:
A slave with one connection is supported (this API only works when the
device is configured as a slave and connected to one master). Send this
command after establishing a connection.
This command fails to return any events but has a meaningful return
status.
Copyright © 2010–2019, Texas Instruments Incorporated
SUCCESS: build revision set succesfully
SWRU271H – October 2010 – Revised April 2019
www.ti.com
Submit Documentation Feedback

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cc2541

Table of Contents