WL05 Driver Library – API Documentation

Header image

Main page


§ wl05_register_usercallback()

void wl05_register_usercallback ( void *  callback,
int  type 
)

Register several user callback functions on WL05 events.

Parameters
[in]callbackThe callback function's address
[in]typeType of the callback:
  • 0: Callback on initialization errors
  • 1: Callback on status indications at run time
  • 2: Callback on outgoing data packets
  • 3: Callback on incoming data packets
Returns
Nothing
Since
V0.80
Note
Type 0: The installed handler must be of type: void huge function(int init_error). The WL05 driver will execute this function immediately after an occurred initialization error. The parameter code of type: WL05_InitErrorCodes informs the user about the occurred failure.
Type 1: The installed handler must be of type: void huge function(int indication). The WL05 driver will execute this function immediately after an occurred status change of the WL05 module. The status parameter code of type: WL05_DrvIndicationCodes informs the user about the occurred event.
Type 2: The installed handler must be of type: int huge function(uint8 *buffer, uint16 length). The WL05 driver will execute this function after forwarding the outgoing packet to the WL05 device. The caller is able to check the packet addressed by parameter buffer. Parameter length indicates the length of the packet in bytes. If the return value is not equal to 0, the packet is not forwarded to the WL05 module.
Type 3: The installed handler must be of type: int huge function(uint8 *buffer, uint16 length). The WL05 driver will execute this function after detection of an incoming packet. The caller is able to check the packet addressed by parameter buffer. Parameter length indicates the length of the packet in bytes. If the return value is not equal to 0, the packet is not forwarded to the TCPIP protocol stack.

Important: It is not allowed to call other WL05 API functions e.g. wl05_connect from inside any of the callback functions. To uninstall a function handler, install a NULL pointer. Installation should be done once before installing the driver with Dev_Open_Interface().






Top of page | Main page

Copyright © 2016 Beck IPC GmbH
Generated by Doxygen 1.8.12