CC3000HostDriver for device TI CC3000 some changes were made due to mbed compiler and the use of void*

Dependents:   CC3000Test

Embed: (wiki syntax)

« Back to documentation index

Evnt_handler_api

Evnt_handler_api

Functions

static long hci_event_unsol_flowcontrol_handler (char *pEvent)
 hci_event_unsol_flowcontrol_handler
static void update_socket_active_status (char *resp_params)
 update_socket_active_status
void hci_unsol_handle_patch_request (char *event_hdr)
 hci_unsol_handle_patch_request
unsigned char * hci_event_handler (char *pRetParams, unsigned char *from, unsigned char *fromlen)
 hci_event_handler
long hci_unsol_event_handler (char *event_hdr)
 hci_unsol_event_handler
long hci_unsolicited_event_handler (void)
 hci_unsolicited_event_handler
void set_socket_active_status (long Sd, long Status)
 set_socket_active_status
long get_socket_active_status (long Sd)
 get_socket_active_status
void SimpleLinkWaitEvent (unsigned short usOpcode, long *pRetParams)
 SimpleLinkWaitEvent.
void SimpleLinkWaitData (unsigned char *pBuf, unsigned char *from, unsigned char *fromlen)
 SimpleLinkWaitData.

Function Documentation

long get_socket_active_status ( long  Sd )

get_socket_active_status

Parameters:
SdSocket IS
Returns:
Current status of the socket.

Retrieve socket status

Definition at line 766 of file evnt_handler.cpp.

unsigned char* hci_event_handler ( char *  pRetParams,
unsigned char *  from,
unsigned char *  fromlen 
)

hci_event_handler

Parameters:
pRetParamsincoming data buffer
fromfrom information (in case of data received)
fromlenfrom information length (in case of data received)
Returns:
none

Parse the incoming events packets and issues corresponding event handler from global array of handlers pointers

Definition at line 223 of file evnt_handler.cpp.

long hci_event_unsol_flowcontrol_handler ( char *  pEvent ) [static]

hci_event_unsol_flowcontrol_handler

Parameters:
pEventpointer to the string contains parameters for IPERF
Returns:
ESUCCESS if successful, EFAIL if an error occurred

Called in case unsolicited event from type HCI_EVNT_DATA_UNSOL_FREE_BUFF has received. Keep track on the number of packets transmitted and update the number of free buffer in the SL device.

Definition at line 729 of file evnt_handler.cpp.

long hci_unsol_event_handler ( char *  event_hdr )

hci_unsol_event_handler

Parameters:
event_hdrevent header
Returns:
1 if event supported and handled 0 if event is not supported

Handle unsolicited events

Definition at line 510 of file evnt_handler.cpp.

void hci_unsol_handle_patch_request ( char *  event_hdr )

hci_unsol_handle_patch_request

Parameters:
event_hdrevent header
Returns:
none

Handle unsolicited event from type patch request

Definition at line 142 of file evnt_handler.cpp.

long hci_unsolicited_event_handler ( void   )

hci_unsolicited_event_handler

Parameters:
None
Returns:
ESUCCESS if successful, EFAIL if an error occurred

Parse the incoming unsolicited event packets and issues corresponding event handler.

Definition at line 664 of file evnt_handler.cpp.

void set_socket_active_status ( long  Sd,
long  Status 
)

set_socket_active_status

Parameters:
Sd
Status
Returns:
none

Check if the socket ID and status are valid and set accordingly the global socket status

Definition at line 705 of file evnt_handler.cpp.

void SimpleLinkWaitData ( unsigned char *  pBuf,
unsigned char *  from,
unsigned char *  fromlen 
)

SimpleLinkWaitData.

Parameters:
pBufdata buffer
fromfrom information
fromlenfrom information length
Returns:
none

Wait for data, pass it to the hci_event_handler and update in a global variable that there is data to read.

Definition at line 842 of file evnt_handler.cpp.

void SimpleLinkWaitEvent ( unsigned short  usOpcode,
long *  pRetParams 
)

SimpleLinkWaitEvent.

Parameters:
usOpcodecommand operation code
pRetParamscommand return parameters
Returns:
none

Wait for event, pass it to the hci_event_handler and update the event opcode in a global variable.

Definition at line 815 of file evnt_handler.cpp.

void update_socket_active_status ( char *  resp_params ) [static]

update_socket_active_status

Parameters:
resp_paramsSocket IS
Returns:
Current status of the socket.

Retrieve socket status

Definition at line 786 of file evnt_handler.cpp.