4.2 Adding ATWINC15x0 Driver
Perform the following steps to add the ATWINC15x0 driver in ASF.
Note: It is recommended to use the latest ASF3 ATWINC15x0 driver
for porting.
- Open the Atmel Studio.
- Open the basic reference application from File > New > Example Project.
- Select “WINC1500 AP Scan Example-SAMD21 Xplained Pro”.
- Navigate to “<Root_folder_path>\WINC1500_AP_SCAN_EXAMPLE7\WINC1500_AP_SCAN_EXAMPLE7\src\ASF\common\components\wifi”.
- Copy the “winc1500” folder to the
“<MLA root_path>\apps\tcpip\wifi_PIC24F_WINC15x0\wifi_PIC24F_WINC15x0.X” MLA
development environment.
The folder structure of the ATWINC15x0 driver displays in the following image.
- Modify the
nm_bus_wrapper_samd21.c
,nm_bsp_samd21.c
andnm_bsp_samd21.h
files (marked in red) for porting the ATWINC15x0 driver to PIC24 MCU. - Rename the PIC24 host files
(
nm_bus_wrapper_PIC24.c
,nm_bsp_PIC24.C
andnm_bsp_PIC24.h
), as shown in the following image. - Comment the following code in the
"wifi_PIC24F_WINC15x0\wifi_PIC24F_WINC15x0.X\winc1500\socket\include\m2m_socket_host_if.h"
file.
//typedef sint8 SOCKET;