210 #ifndef ti_drivers_rf__include
211 #define ti_drivers_rf__include
219 #include <ti/sysbios/BIOS.h>
220 #include <ti/sysbios/knl/Clock.h>
221 #include <ti/sysbios/knl/Semaphore.h>
222 #include <driverlib/rf_common_cmd.h>
223 #include <driverlib/rf_prop_cmd.h>
241 #define RF_EventCmdDone (1<<0)
242 #define RF_EventLastCmdDone (1<<1)
243 #define RF_EventTxDone (1<<4)
244 #define RF_EventTXAck (1<<5)
245 #define RF_EventTxCtrl (1<<6)
246 #define RF_EventTxCtrlAck (1<<7)
247 #define RF_EventTxCtrlAckAck (1<<8)
248 #define RF_EventTxRetrans (1<<9)
249 #define RF_EventTxEntryDone (1<<10)
250 #define RF_EventTxBufferChange (1<<11)
251 #define RF_EventRxOk (1<<16)
252 #define RF_EventRxNOk (1<<17)
253 #define RF_EventRxIgnored (1<<18)
254 #define RF_EventRxEmpty (1<<19)
255 #define RF_EventRxCtrl (1<<20)
256 #define RF_EventRxCtrlAck (1<<21)
257 #define RF_EventRxBufFull (1<<22)
258 #define RF_EventRxEntryDone (1<<23)
259 #define RF_EventDataWritten (1<<24)
260 #define RF_EventNDataWritten (1<<25)
261 #define RF_EventRxAborted (1<<26)
262 #define RF_EventRxCollisionDetected (1<<27)
263 #define RF_EventModulesUnlocked (1<<29)
264 #define RF_EventInternalError (uint32_t)(1<<31)
265 #define RF_EventMdmSoft 0x0000002000000000
273 #define RF_EventCmdCancelled 0x1000000000000000
274 #define RF_EventCmdAborted 0x2000000000000000
275 #define RF_EventCmdStopped 0x4000000000000000
276 #define RF_EventCmdError 0x8000000000000000
277 #define RF_EventRatCh 0x0800000000000000
278 #define RF_EventPowerUp 0x0400000000000000
280 #define RF_EventError 0x0200000000000000
301 #define RF_CTRL_SET_INACTIVITY_TIMEOUT 0
310 #define RF_GET_RSSI_ERROR_VAL (-128)
311 #define RF_CMDHANDLE_FLUSH_ALL (-1)
312 #define RF_ALLOC_ERROR (-2)
313 #define RF_ERROR_INVALID_RFMODE (-256)
314 #define RF_ERROR_CMDFS_SYNTH_PROG (-257)
317 typedef rfc_radioOp_t RF_Op;
324 void (*cpePatchFxn)(void);
325 void (*mcePatchFxn)(void);
326 void (*rfePatchFxn)(void);
357 rfc_CMD_PROP_RADIO_SETUP_t
prop;
435 typedef void (*
RF_Callback)(RF_Handle h, RF_CmdHandle ch, RF_EventMask e);
593 extern RF_EventMask
RF_pendCmd(RF_Handle h, RF_CmdHandle ch, RF_EventMask bmEvent);
751 extern int8_t
RF_ratCompare(RF_Handle h, rfc_CMD_SET_RAT_CMP_t* pCmdStruct, \
814 #undef ti_sysbios_family_arm_m3_Hwi__nolocalnames
RF_CmdHandle ch
cmd handle
Definition: RF.h:422
Cmd not executed as radio is inactive.
Definition: RF.h:341
RF parameter struct RF parameters are used with the RF_open() and RF_Params_init() call...
Definition: RF.h:440
uint32_t startTime
Start time window in us (from current time) for radio access.
Definition: RF.h:459
RF_InfoType
RF_getParamsType contains the options available for using the RF_getParams()
Definition: RF.h:414
void * pPowerCb
Power up callback.
Definition: RF.h:390
RF_Stat
RF Stat reported as return value for RF_ratCmd(), RF_getRssi(). RF_setTxPwr(), RF_cancelCmd() ...
Definition: RF.h:339
uint8_t rfMode
Variable for device operation mode; must be set to RF_MODE_MULTIPLE for dual mode operation...
Definition: RF.h:323
RF_Priority priority
Intra client priority.
Definition: RF.h:451
void(* RF_Callback)(RF_Handle h, RF_CmdHandle ch, RF_EventMask e)
RF callback function pointer type RF callbacks can occur at the completion of posted RF operation (ch...
Definition: RF.h:435
uint8_t swiHwPriority
Priority for HW SWI. Used for all RAT channel callbacks.
Definition: RF.h:372
RF_Mode * pRfMode
Mode of operation.
Definition: RF.h:386
RF_EventMask RF_pendCmd(RF_Handle h, RF_CmdHandle ch, RF_EventMask bmEvent)
Wait for posted command to complete Wait until completion of RF command identified by handle ch for c...
uint32_t nPowerUpDuration
Measured poweruptime in us or specified startup time (if left default it will measure) ...
Definition: RF.h:388
RF_CmdHandle RF_postCmd(RF_Handle h, RF_Op *pOp, RF_Priority ePri, RF_Callback pCb, RF_EventMask bmEvent)
Post an RF operation (chain) to the command queue Post an RF_Op to the RF command queue of the client...
Cmd done and Successful.
Definition: RF.h:345
struct RFCC26XX_HWAttrs RFCC26XX_HWAttrs
RF Hardware attributes.
Cmd not executed as RF driver is busy.
Definition: RF.h:340
Highest, use sparingly.
Definition: RF.h:332
RF_Stat RF_runImmediateCmd(RF_Handle h, uint32_t *pCmdStruct)
Send any Immediate command.
uint64_t RF_EventMask
Event mask type (construct mask with combinations of RF_EventMask)
Definition: RF.h:351
bool bYielded
Client has indicated that there are no more commands.
Definition: RF.h:404
uint32_t nPowerUpDuration
Measured poweruptime in us or specified startup time (if left default it will measure) ...
Definition: RF.h:442
Cmd scheduled for execution.
Definition: RF.h:346
void RF_close(RF_Handle h)
Close client connection to RF driver.
int8_t RF_ratCompare(RF_Handle h, rfc_CMD_SET_RAT_CMP_t *pCmdStruct, uint32_t compareTime, RF_Callback pRatCb)
Setup RAT compare, and callback when compare matches. Note radio needs to be on for RAT to operate...
uint8_t hwiCpe0Priority
Priority for INT_RFC_CPE_0 interrupt.
Definition: RF.h:369
RF_Stat RF_ratDisableChannel(RF_Handle h, int8_t ratChannelNum)
Disable a RAT channel.
RF_Handle RF_open(RF_Object *pObj, RF_Mode *pRfMode, RF_RadioSetup *pOpSetup, RF_Params *params)
Open client connection to RF driver.
RF_Stat RF_ratHwOutput(RF_Handle h, uint16_t config)
Setup RAT HW output. Note radio needs to be on for RAT to operate. If radio is off, this API returns RF_ALLOC_ERROR.
uint32_t RF_getCurrentTime(void)
Return current radio timer value.
RF_getParamsVal used to input and return RF driver paramters with RF_getParams()
Definition: RF.h:421
RF_Object * RF_Handle
A handle that is returned from a RF_open() call Used for further RF client interaction with the RF dr...
Definition: RF.h:411
int8_t RF_ratCapture(RF_Handle h, uint16_t config, RF_Callback pRatCb)
Setup RAT capture, and callback when capture event happens. Note radio needs to be on for RAT to oper...
void * pCbSync
Internal storage for user callback.
Definition: RF.h:400
RF Hardware attributes.
Definition: RF.h:368
RF_EventMask RF_runCmd(RF_Handle h, RF_Op *pOp, RF_Priority ePri, RF_Callback pCb, RF_EventMask bmEvent)
Runs synchronously a (chain of) RF operation(s) Allows a (chain of) operation(s) to be posted to the ...
rfc_radioOp_t RF_Op
Alias for the data type of the header common to all radio operations.
Definition: RF.h:318
Normal, usually best choice.
Definition: RF.h:334
void * pErrCb
Error callback.
Definition: RF.h:391
int8_t RF_getRssi(RF_Handle h)
Get rssi value.
Low, use for infinite or background commands.
Definition: RF.h:335
bool bRadioState
Radio state.
Definition: RF.h:424
RF_RadioSetup * pOpSetup
Radio setup radio operation, only ram right now.
Definition: RF.h:387
uint32_t endTime
End time window in us (from current time) for radio access.
Definition: RF.h:460
uint32_t duration
Radio access duration requested by the client.
Definition: RF.h:458
RF_EventMask unpendCause
Return value for RF_pendCmd()
Definition: RF.h:401
void RF_yield(RF_Handle h)
Signal that radio client is not going to issue more commands in a while.
uint32_t endTime
End time in us for the radio command.
Definition: RF.h:452
uint32_t nInactivityTimeout
Inactivity timeout in us.
Definition: RF.h:385
Get bitmap for the avail RAT channel.
Definition: RF.h:416
RF_Stat RF_flushCmd(RF_Handle h, RF_CmdHandle ch, uint8_t mode)
Abort/stop/cancel command and any subsequent commands in command queue If command is running...
RF_Stat RF_cancelCmd(RF_Handle h, RF_CmdHandle ch, uint8_t mode)
Abort/stop/cancel single command in command queue If command is running, aborts/stops it and posts ca...
RF schedule command parameter struct RF schedule command parameters are used with the RF_scheduleCmd(...
Definition: RF.h:450
RF_Callback pPowerCb
Power up callback.
Definition: RF.h:444
int16_t RF_CmdHandle
A command handle that is returned from RF_postCmd() Used by RF_pendCmd() and RF_flushCmd(). A negative value indicates an error.
Definition: RF.h:363
uint16_t availRatCh
RAT channels available.
Definition: RF.h:423
RF_CmdHandle volatile chLastPosted
Command handle of most recently posted command.
Definition: RF.h:403
uint8_t swiCpe0Priority
Priority for CPE_0 SWI.
Definition: RF.h:371
RF_Op * RF_getCmdOp(RF_Handle h, RF_CmdHandle cmdHnd)
Get command structure pointer.
General error specifier.
Definition: RF.h:344
bool bPowerUpXOSC
Allways enable XOSC_HF at chip wakeup.
Definition: RF.h:443
rfc_CMD_RADIO_SETUP_t common
Common mode setup (BLE, IEEE modes)
Definition: RF.h:356
RF request access parameter struct RF request access command parameters are used with the RF_requestA...
Definition: RF.h:457
RF_Stat RF_getInfo(RF_Handle h, RF_InfoType type, RF_InfoVal *pValue)
Get value for some RF driver parameters.
Cmd done but with error in CMDSTA.
Definition: RF.h:342
RF_Priority
Priority of RF commands.
Definition: RF.h:331
Invalid API parameters.
Definition: RF.h:343
High, time-critical commands in synchronous protocols.
Definition: RF.h:333
Union of the different flavors of RADIO_SETUP commands.
Definition: RF.h:354
Clock_Struct clkInactivity
Clock used for inactivity timeouts.
Definition: RF.h:402
uint32_t nInactivityTimeout
Inactivity timeout in us, default is infinite.
Definition: RF.h:441
rfc_CMD_FS_t cmdFs
FS command encapsulating FS state.
Definition: RF.h:396
RF_Stat RF_requestAccess(RF_Handle h, RF_AccessParams *pParams)
Request radio access.
RF_Stat RF_runDirectCmd(RF_Handle h, uint32_t cmd)
Send any Direct command.
RF_EventMask volatile eventSync
Event mask/value used by runCmd() and waitCmd()
Definition: RF.h:399
Get RF_CmdHandle for current cmd.
Definition: RF.h:415
Struct defining operating mode of RF driver.
Definition: RF.h:322
bool bPowerUpXOSC
Allways enable XOSC_HF at chip wakeup.
Definition: RF.h:389
rfc_command_t commandId
Can be used simply to get RF operation ID.
Definition: RF.h:355
rfc_CMD_PROP_RADIO_SETUP_t prop
Radio setup for PROP mode.
Definition: RF.h:357
API ran successfully.
Definition: RF.h:347
RF_Callback pErrCb
Error callback.
Definition: RF.h:445
RF_CmdHandle RF_scheduleCmd(RF_Handle h, RF_Op *pOp, RF_ScheduleCmdParams *pSchParams, RF_Callback pCb, RF_EventMask bmEvent)
Schedule an RF operation (chain) to the command queue Schedule an RF_Op to the RF command queue of th...
RF_Stat RF_control(RF_Handle h, int8_t ctrl, void *args)
Set RF control parameters.
uint8_t hwiHwPriority
Priority for INT_RFC_HW_COMB interrupt.
Definition: RF.h:370
void RF_Params_init(RF_Params *params)
Function to initialize the RF_Params struct to its defaults.
Struct used to store RF client state and configuration Pointer to an RF_Object is used as handles (RF...
Definition: RF.h:382
Semaphore_Struct semSync
Semaphore used by runCmd(), pendCmd() and powerdown sequence.
Definition: RF.h:398
Get Radio state 0: Radio OFF, 1: Radio ON.
Definition: RF.h:417
RF_Priority priority
Access priority.
Definition: RF.h:461