![Texas Instruments CC3220 Скачать руководство пользователя страница 93](http://html.mh-extra.com/html/texas-instruments/cc3220/cc3220_programmers-manual_1094609093.webp)
Operation Modes
93
SWRU455A – February 2017 – Revised March 2017
Copyright © 2017, Texas Instruments Incorporated
Socket
asynchronous event SL_SOCKET_TRIGGER_EVENT_SELECT.
•
Detecting select events should notify the main task trigger event of arrival, call select again.
describes a general flow of using trigger mode for accept on a server socket.
Figure 6-3. Trigger Mode Flow
An example of select trigger event handle:
void
SimpleLinkSocketTriggerEventHandler(SlSockTriggerEvent_t
*pSlTriggerEvent)
{
switch
(pSlTriggerEvent ->Id)
{
case
SL_SOCKET_TRIGGER_EVENT_SELECT:
{
//Notify main task trigger event arrive, wake up and call select again
break
;
}
default
:
break
;
}
}
6.7.2.1
Trigger Mode for Accept
1. Open the TCP Server Socket and call sl_Select on the following socket.
_i16 Status,Sd,LocalSd;
_u16 nfds;
SlSockAddrIn_t
LocalAddr,Addr;
SlTimeval_t timeVal;
SlFdSet_t
rxSet;