Skip to content

Commit 9d6cd18

Browse files
committed
wifi: winc1500: update HAL version to 19.7.6
1 parent 065e57c commit 9d6cd18

38 files changed

+12506
-9169
lines changed

asf/common/components/wifi/winc1500/bsp/include/nm_bsp.h

Lines changed: 213 additions & 208 deletions
Large diffs are not rendered by default.
Lines changed: 114 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,120 @@
1-
/*
2-
* Copyright (c) 2016 Intel Corporation.
1+
/**
2+
*
3+
* \file
4+
*
5+
* \brief This module contains NMC1500 BSP APIs declarations.
6+
*
7+
* Copyright (c) 2016-2018 Microchip Technology Inc. and its subsidiaries.
8+
*
9+
* \asf_license_start
10+
*
11+
* \page License
12+
*
13+
* Subject to your compliance with these terms, you may use Microchip
14+
* software and any derivatives exclusively with Microchip products.
15+
* It is your responsibility to comply with third party license terms applicable
16+
* to your use of third party software (including open source software) that
17+
* may accompany Microchip software.
18+
*
19+
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
20+
* WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
21+
* INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
22+
* AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
23+
* LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
24+
* LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
25+
* SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
26+
* POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
27+
* ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
28+
* RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
29+
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
30+
*
31+
* \asf_license_stop
332
*
4-
* SPDX-License-Identifier: Apache-2.0
533
*/
6-
34+
/**@defgroup BSPDefine Defines
35+
* @ingroup nm_bsp
36+
* @{
37+
*/
738
#ifndef _NM_BSP_INTERNAL_H_
839
#define _NM_BSP_INTERNAL_H_
940

10-
#if defined(CONFIG_WIFI_WINC1500)
11-
#include <wifi_winc1500_nm_bsp_internal.h>
12-
#endif /* CONFIG_WIFI_WINC1500 */
1341

14-
#endif //_NM_BSP_INTERNAL_H_
42+
43+
#ifdef WIN32
44+
#include "nm_bsp_win32.h"
45+
#endif
46+
47+
#ifdef __K20D50M__
48+
#include "nm_bsp_k20d50m.h"
49+
#endif
50+
51+
#ifdef __MSP430FR5739__
52+
#include "bsp_msp430fr5739.h"
53+
#endif
54+
55+
#ifdef _FREESCALE_MCF51CN128_
56+
#include "bsp/include/nm_bsp_mcf51cn128.h"
57+
#endif
58+
59+
#ifdef __MCF964548__
60+
#include "bsp/include/nm_bsp_mc96f4548.h"
61+
#endif
62+
63+
#ifdef __APP_APS3_CORTUS__
64+
#include "nm_bsp_aps3_cortus.h"
65+
#endif
66+
67+
#if (defined __SAMR21G18A__) || (defined __SAMR21E18A__)
68+
#include "bsp/include/nm_bsp_samr21.h"
69+
#endif
70+
71+
#if (defined __SAML21J18A__) || (defined __SAML21J18B__)
72+
#include "bsp/include/nm_bsp_saml21.h"
73+
#endif
74+
75+
#if (defined __SAML22N18A__)
76+
#include "bsp/include/nm_bsp_saml22.h"
77+
#endif
78+
79+
#if (defined __SAMD21J18A__) || (defined __SAMD21G18A__)
80+
#include "bsp/include/nm_bsp_samd21.h"
81+
#endif
82+
83+
#if (defined __SAM4S16C__) || (defined __SAM4SD32C__)
84+
#include "bsp/include/nm_bsp_sam4s.h"
85+
#endif
86+
87+
#ifdef __SAMG53N19__
88+
#include "bsp/include/nm_bsp_samg53.h"
89+
#endif
90+
91+
#ifdef __SAMG55J19__
92+
#include "bsp/include/nm_bsp_samg55.h"
93+
#endif
94+
95+
#if (defined __SAME70Q21__) || (defined __SAME70Q21B__) || (defined __SAMV71Q21__)
96+
#include "bsp/include/nm_bsp_same70.h"
97+
#endif
98+
99+
#if (defined __SAMR30G18A__) || (defined __SAMR30E18A__)
100+
#include "bsp/include/nm_bsp_samr30.h"
101+
#endif
102+
103+
#ifdef CORTUS_APP
104+
#include "crt_iface.h"
105+
#endif
106+
107+
#ifdef NRF51
108+
#include "nm_bsp_nrf51822.h"
109+
#endif
110+
111+
#ifdef _ARDUINO_UNO_
112+
#include "bsp/include/nm_bsp_arduino_uno.h"
113+
#endif
114+
115+
#ifdef CONFIG_ATMEL_WINC1500
116+
#include "wifi_winc1500_nm_bsp_internal.h"
117+
#endif
118+
119+
120+
#endif //_NM_BSP_INTERNAL_H_

asf/common/components/wifi/winc1500/bus_wrapper/include/nm_bus_wrapper.h

Lines changed: 44 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,29 @@
44
*
55
* \brief This module contains NMC1000 bus wrapper APIs declarations.
66
*
7-
* Copyright (c) 2016-2017 Atmel Corporation. All rights reserved.
7+
* Copyright (c) 2016-2021 Microchip Technology Inc. and its subsidiaries.
88
*
99
* \asf_license_start
1010
*
1111
* \page License
1212
*
13-
* Redistribution and use in source and binary forms, with or without
14-
* modification, are permitted provided that the following conditions are met:
13+
* Subject to your compliance with these terms, you may use Microchip
14+
* software and any derivatives exclusively with Microchip products.
15+
* It is your responsibility to comply with third party license terms applicable
16+
* to your use of third party software (including open source software) that
17+
* may accompany Microchip software.
1518
*
16-
* 1. Redistributions of source code must retain the above copyright notice,
17-
* this list of conditions and the following disclaimer.
18-
*
19-
* 2. Redistributions in binary form must reproduce the above copyright notice,
20-
* this list of conditions and the following disclaimer in the documentation
21-
* and/or other materials provided with the distribution.
22-
*
23-
* 3. The name of Atmel may not be used to endorse or promote products derived
24-
* from this software without specific prior written permission.
25-
*
26-
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
27-
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
28-
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
29-
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
30-
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32-
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33-
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
34-
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
35-
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36-
* POSSIBILITY OF SUCH DAMAGE.
19+
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
20+
* WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
21+
* INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
22+
* AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
23+
* LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
24+
* LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
25+
* SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
26+
* POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
27+
* ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
28+
* RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
29+
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
3730
*
3831
* \asf_license_stop
3932
*
@@ -59,12 +52,12 @@
5952
(same start/stop conditions) ==> I2C only. Parameter:tstrNmI2cSpecial */
6053
#define NM_BUS_IOCTL_RW ((uint8)3) /*!< Read/Write at the same time ==> SPI only. Parameter:tstrNmSpiRw */
6154

62-
#define NM_BUS_IOCTL_WR_RESTART ((uint8)4) /*!< Write buffer then made restart condition then read ==> I2C only. parameter:tstrNmI2cSpecial */
55+
#define NM_BUS_IOCTL_WR_RESTART ((uint8)4) /*!< Write buffer then made restart condition then read ==> I2C only. parameter:tstrNmI2cSpecial */
6356
/**
6457
* @struct tstrNmBusCapabilities
6558
* @brief Structure holding bus capabilities information
6659
* @sa NM_BUS_TYPE_I2C, NM_BUS_TYPE_SPI
67-
*/
60+
*/
6861
typedef struct
6962
{
7063
uint16 u16MaxTrxSz; /*!< Maximum transfer size. Must be >= 16 bytes*/
@@ -74,7 +67,7 @@ typedef struct
7467
* @struct tstrNmI2cDefault
7568
* @brief Structure holding I2C default operation parameters
7669
* @sa NM_BUS_IOCTL_R, NM_BUS_IOCTL_W
77-
*/
70+
*/
7871
typedef struct
7972
{
8073
uint8 u8SlaveAdr;
@@ -86,12 +79,12 @@ typedef struct
8679
* @struct tstrNmI2cSpecial
8780
* @brief Structure holding I2C special operation parameters
8881
* @sa NM_BUS_IOCTL_W_SPECIAL
89-
*/
82+
*/
9083
typedef struct
9184
{
9285
uint8 u8SlaveAdr;
9386
uint8 *pu8Buf1; /*!< pointer to the 1st buffer */
94-
uint8 *pu8Buf2; /*!< pointer to the 2nd buffer */
87+
uint8 *pu8Buf2; /*!< pointer to the 2nd buffer */
9588
uint16 u16Sz1; /*!< 1st buffer size */
9689
uint16 u16Sz2; /*!< 2nd buffer size */
9790
} tstrNmI2cSpecial;
@@ -100,22 +93,22 @@ typedef struct
10093
* @struct tstrNmSpiRw
10194
* @brief Structure holding SPI R/W parameters
10295
* @sa NM_BUS_IOCTL_RW
103-
*/
96+
*/
10497
typedef struct
10598
{
106-
uint8 *pu8InBuf; /*!< pointer to input buffer.
99+
uint8 *pu8InBuf; /*!< pointer to input buffer.
107100
Can be set to null and in this case zeros should be sent at MOSI */
108-
uint8 *pu8OutBuf; /*!< pointer to output buffer.
101+
uint8 *pu8OutBuf; /*!< pointer to output buffer.
109102
Can be set to null and in this case data from MISO can be ignored */
110-
uint16 u16Sz; /*!< Transfere size */
103+
uint16 u16Sz; /*!< Transfere size */
111104
} tstrNmSpiRw;
112105

113106

114107
/**
115108
* @struct tstrNmUartDefault
116109
* @brief Structure holding UART default operation parameters
117110
* @sa NM_BUS_IOCTL_R, NM_BUS_IOCTL_W
118-
*/
111+
*/
119112
typedef struct
120113
{
121114
uint8 *pu8Buf; /*!< Operation buffer */
@@ -132,7 +125,7 @@ extern tstrNmBusCapabilities egstrNmBusCapabilities;
132125
* @fn nm_bus_init
133126
* @brief Initialize the bus wrapper
134127
* @return ZERO in case of success and M2M_ERR_BUS_FAIL in case of failure
135-
*/
128+
*/
136129
sint8 nm_bus_init(void *);
137130

138131
/**
@@ -144,14 +137,14 @@ sint8 nm_bus_init(void *);
144137
* Arbitrary parameter depending on IOCTL
145138
* @return ZERO in case of success and M2M_ERR_BUS_FAIL in case of failure
146139
* @note For SPI only, it's important to be able to send/receive at the same time
147-
*/
140+
*/
148141
sint8 nm_bus_ioctl(uint8 u8Cmd, void* pvParameter);
149142

150143
/**
151144
* @fn nm_bus_deinit
152145
* @brief De-initialize the bus wrapper
153146
* @return ZERO in case of success and M2M_ERR_BUS_FAIL in case of failure
154-
*/
147+
*/
155148
sint8 nm_bus_deinit(void);
156149

157150
/*
@@ -166,11 +159,24 @@ sint8 nm_bus_reinit(void *);
166159
* @fn nm_bus_get_chip_type
167160
* @brief get chip type
168161
* @return ZERO in case of success and M2M_ERR_BUS_FAIL in case of failure
169-
*/
162+
*/
170163
#ifdef CONF_WINC_USE_UART
171164
uint8 nm_bus_get_chip_type(void);
172165
sint8 nm_bus_break(void);
173166
#endif
167+
168+
/**
169+
* @fn spi_rw
170+
* @brief Process SPI Read/Write operation
171+
* @param pu8Mosi TX Data buffer
172+
* @param pu8Miso RX Data buffer
173+
* @param u16Sz Transfer length
174+
* @return ZERO in case of success and M2M_ERR_BUS_FAIL in case of failure
175+
*/
176+
#ifdef CONF_WINC_USE_SPI
177+
sint8 nm_spi_rw(uint8* pu8Mosi, uint8* pu8Miso, uint16 u16Sz);
178+
#endif
179+
174180
#ifdef __cplusplus
175181
}
176182
#endif

0 commit comments

Comments
 (0)