Migration Example#
This section provides an example of rewriting a WiSeConnect SDK v2.x Wi-Fi Access Point (AP) application with the v3.x API.
Some code, such as that for event handlers, is omitted for brevity.
In the example below:
In the
main()
function, we replaced the v2.xrsi_task_create()
andrsi_start_os_scheduler()
API calls with the FreeRTOSosThreadNew()
API call, to create a new FreeRTOS task to run the application.In the initialization function, we replaced the v2.x
rsi_driver_init()
,rsi_wlan_register_callbacks()
,rsi_task_create()
, andrsi_wireless_init()
API calls with the v3.xsl_net_init()
API call, to initialize the WiSeConnect SDK and SiWx917 device.In the initialization function, we replaced the v2.x
rsi_config_ipaddress()
andrsi_wlan_ap_start()
API calls with the v3.xsl_net_up()
API call, to start the wireless access point and configure its IP address.
v2.x API Code | v3.x API Code |
---|---|
|
|
|
|
| |
| |
| |
| |
| |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|