Bind the Device Enable/Disable Line
235
SWRU455A – February 2017 – Revised March 2017
Copyright © 2017, Texas Instruments Incorporated
Porting the Host Driver
Table 17-1. : Selecting Capabilities (continued)
GroupName and Macro
Normal APIs Level
(#undef SL_INC_EXT_API)
Extended APIs Level
(#define SL_INC_EXT_API)
SL_INC_NET_CFG_PKG
sl_NetCfgGet
sl_NetCfgSet
sl_NetCfgGet
sl_NetCfgSet
sl_MacAdrrGet
sl_MacAdrrSet
SL_INC_NET_UTIL_PKG
sl_NetUtilGet
sl_NetUtilSet
sl_NetUtilCmd
sl_NetUtilGet
sl_NetUtilSet
sl_NetUtilCmd
SL_INC_NVMEM_PKG
sl_FsOpen
sl_FsClose
sl_FsRead
sl_FsWrite
sl_FsDel
sl_FsOpen
sl_FsClose
sl_FsRead
sl_FsWrite
sl_FsDel
sl_FsGetInfo
sl_FsCtl
sl_FsProgram
sl_FsGetFileList
NOTE:
There is no option to enable or disable a particular function.
17.4 Bind the Device Enable/Disable Line
The CC3120 has two external hardware lines that can be used to enable or disable the device:
•
nReset – Puts the device in shutdown mode
•
nHib – Puts the device in hibernate mode
For more information, see
.
NOTE:
Only one of these lines or modes can be used. During sl_Start or sl_Stop, the driver calls the
macros to force one of these lines to high or low in the correct sequence.
To bind one of these lines, the following macros must be defined correctly:
•
sl_DeviceEnable – To force the line to high level
•
sl_DeviceDisable – To force the line to low level
Example:
#
define
sl_DeviceEnable()
(P4OUT |= BIT1)
#
define
sl_DeviceDisable()
(P4OUT &= ~BIT1)
If some initializations are required before the enable or disable macros are called, the host application can
also define the following optional macro:
sl_DeviceEnablePreamble
This macro is called during sl_Start before sl_DeviceEnable is called. The macro can be used as a
placeholder to implement any preprocess operations before enabling networking operations.
17.5 Implement the Interface Communication Abstract Layer
The SimpleLink Wi-Fi CC3120 device supports two standard communication interfaces: SPI and UART.