Описание функции, например, sl_Start(0, 0, 0), используемой для панели запуска cc3200.

Мне нужно подробное описание функции, т.е. sl_Start(0, 0, 0) с точки зрения передаваемого им фактического параметра, я в основном использую его на панели запуска cc3200, используя студию композитора кода.


person Mohit Soni    schedule 30.06.2015    source источник


Ответы (1)


Это в их файле device.h:

\brief Start the SimpleLink device

This function initialize the communication interface, set the enable pin 
of the device, and call to the init complete callback.

\param[in]      pIfHdl              Opened Interface Object. In case the interface 
                                    must be opened outside the SimpleLink Driver, the
                                    user might give the handler to be used in \n
                                    any access of the communication interface with the 
                                    device (UART/SPI). \n
                                    The SimpleLink driver will open an interface port
                                    only if this parameter is null! \n
\param[in]      pDevName            The name of the device to open. Could be used when 
                                    the pIfHdl is null, to transfer information to the 
                                    open interface function \n
                                    This pointer could be used to pass additional information to
                                    sl_IfOpen in case it is required (e.g. UART com port name)
\param[in]      pInitCallBack       Pointer to function that would be called
                                    on completion of the initialization process.\n
                                    If this parameter is NULL the function is 
                                    blocked until the device initialization 
                                    is completed, otherwise the function returns 
                                    immediately.

\return         Returns the current active role (STA/AP/P2P) or an error code:
                - ROLE_STA, ROLE_AP, ROLE_P2P in case of success, 
                  otherwise in failure one of the following is return:
                - ROLE_STA_ERR  (Failure to load MAC/PHY in STA role)
                - ROLE_AP_ERR  (Failure to load MAC/PHY in AP role)
                - ROLE_P2P_ERR  (Failure to load MAC/PHY in P2P role)


 \sa             sl_Stop

\note           belongs to \ref basic_api

\warning        This function must be called before any other SimpleLink API is used, or after sl_Stop is called for reinit the device
\par            Example:
\code            
               An example for open interface without callback routine. The interface name and handler are
               handled by the sl_IfOpen routine: 

                if( sl_Start(NULL, NULL, NULL) < 0 )
               {
                   LOG("Error opening interface to device\n"); 
               }
\endcode

#if _SL_INCLUDE_FUNC(sl_Start)
_i16 sl_Start(const void* pIfHdl, _i8*  pDevName, const P_INIT_CALLBACK pInitCallBack);
#endif
person tzhenghao    schedule 17.11.2015