From d6d279edb532544f47934aa4f30c7eed25e66349 Mon Sep 17 00:00:00 2001 From: hjjeon0608 Date: Wed, 2 Sep 2015 17:11:59 +0900 Subject: [PATCH 1/7] Peripheral drivers are moved from cmsis to hal folder. And cmsis.h, cmsis_nvic.c, cmsis_nvic.h, system_W7500x.c, system_W7500x.h and W7500x.h are moved to upper folder. --- .../TARGET_W7500x/{TARGET_WIZwiki_W7500 => }/W7500x.h | 0 .../TARGET_W7500x/{TARGET_WIZwiki_W7500 => }/cmsis.h | 0 .../TARGET_W7500x/{TARGET_WIZwiki_W7500 => }/cmsis_nvic.c | 0 .../TARGET_W7500x/{TARGET_WIZwiki_W7500 => }/cmsis_nvic.h | 0 .../TARGET_W7500x/{TARGET_WIZwiki_W7500 => }/system_W7500x.c | 0 .../TARGET_W7500x/{TARGET_WIZwiki_W7500 => }/system_W7500x.h | 0 .../TARGET_W7500x/W7500x_Peripheral_Library}/W7500x_adc.c | 0 .../TARGET_W7500x/W7500x_Peripheral_Library}/W7500x_adc.h | 0 .../TARGET_W7500x/W7500x_Peripheral_Library}/W7500x_conf.h | 0 .../TARGET_W7500x/W7500x_Peripheral_Library}/W7500x_crg.c | 0 .../TARGET_W7500x/W7500x_Peripheral_Library}/W7500x_crg.h | 0 .../TARGET_W7500x/W7500x_Peripheral_Library}/W7500x_dualtimer.c | 0 .../TARGET_W7500x/W7500x_Peripheral_Library}/W7500x_dualtimer.h | 0 .../TARGET_W7500x/W7500x_Peripheral_Library}/W7500x_exti.c | 0 .../TARGET_W7500x/W7500x_Peripheral_Library}/W7500x_exti.h | 0 .../TARGET_W7500x/W7500x_Peripheral_Library}/W7500x_gpio.c | 0 .../TARGET_W7500x/W7500x_Peripheral_Library}/W7500x_gpio.h | 0 .../TARGET_W7500x/W7500x_Peripheral_Library}/W7500x_i2c.c | 0 .../TARGET_W7500x/W7500x_Peripheral_Library}/W7500x_i2c.h | 0 .../TARGET_W7500x/W7500x_Peripheral_Library}/W7500x_pwm.c | 0 .../TARGET_W7500x/W7500x_Peripheral_Library}/W7500x_pwm.h | 0 .../TARGET_W7500x/W7500x_Peripheral_Library}/W7500x_uart.c | 0 .../TARGET_W7500x/W7500x_Peripheral_Library}/W7500x_uart.h | 0 23 files changed, 0 insertions(+), 0 deletions(-) rename libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/{TARGET_WIZwiki_W7500 => }/W7500x.h (100%) rename libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/{TARGET_WIZwiki_W7500 => }/cmsis.h (100%) rename libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/{TARGET_WIZwiki_W7500 => }/cmsis_nvic.c (100%) rename libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/{TARGET_WIZwiki_W7500 => }/cmsis_nvic.h (100%) rename libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/{TARGET_WIZwiki_W7500 => }/system_W7500x.c (100%) rename libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/{TARGET_WIZwiki_W7500 => }/system_W7500x.h (100%) rename libraries/mbed/targets/{cmsis/TARGET_WIZNET/TARGET_W7500x => hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library}/W7500x_adc.c (100%) rename libraries/mbed/targets/{cmsis/TARGET_WIZNET/TARGET_W7500x => hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library}/W7500x_adc.h (100%) rename libraries/mbed/targets/{cmsis/TARGET_WIZNET/TARGET_W7500x => hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library}/W7500x_conf.h (100%) rename libraries/mbed/targets/{cmsis/TARGET_WIZNET/TARGET_W7500x => hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library}/W7500x_crg.c (100%) rename libraries/mbed/targets/{cmsis/TARGET_WIZNET/TARGET_W7500x => hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library}/W7500x_crg.h (100%) rename libraries/mbed/targets/{cmsis/TARGET_WIZNET/TARGET_W7500x => hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library}/W7500x_dualtimer.c (100%) rename libraries/mbed/targets/{cmsis/TARGET_WIZNET/TARGET_W7500x => hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library}/W7500x_dualtimer.h (100%) rename libraries/mbed/targets/{cmsis/TARGET_WIZNET/TARGET_W7500x => hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library}/W7500x_exti.c (100%) rename libraries/mbed/targets/{cmsis/TARGET_WIZNET/TARGET_W7500x => hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library}/W7500x_exti.h (100%) rename libraries/mbed/targets/{cmsis/TARGET_WIZNET/TARGET_W7500x => hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library}/W7500x_gpio.c (100%) rename libraries/mbed/targets/{cmsis/TARGET_WIZNET/TARGET_W7500x => hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library}/W7500x_gpio.h (100%) rename libraries/mbed/targets/{cmsis/TARGET_WIZNET/TARGET_W7500x => hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library}/W7500x_i2c.c (100%) rename libraries/mbed/targets/{cmsis/TARGET_WIZNET/TARGET_W7500x => hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library}/W7500x_i2c.h (100%) rename libraries/mbed/targets/{cmsis/TARGET_WIZNET/TARGET_W7500x => hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library}/W7500x_pwm.c (100%) rename libraries/mbed/targets/{cmsis/TARGET_WIZNET/TARGET_W7500x => hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library}/W7500x_pwm.h (100%) rename libraries/mbed/targets/{cmsis/TARGET_WIZNET/TARGET_W7500x => hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library}/W7500x_uart.c (100%) rename libraries/mbed/targets/{cmsis/TARGET_WIZNET/TARGET_W7500x => hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library}/W7500x_uart.h (100%) diff --git a/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/TARGET_WIZwiki_W7500/W7500x.h b/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x.h similarity index 100% rename from libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/TARGET_WIZwiki_W7500/W7500x.h rename to libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x.h diff --git a/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/TARGET_WIZwiki_W7500/cmsis.h b/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/cmsis.h similarity index 100% rename from libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/TARGET_WIZwiki_W7500/cmsis.h rename to libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/cmsis.h diff --git a/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/TARGET_WIZwiki_W7500/cmsis_nvic.c b/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/cmsis_nvic.c similarity index 100% rename from libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/TARGET_WIZwiki_W7500/cmsis_nvic.c rename to libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/cmsis_nvic.c diff --git a/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/TARGET_WIZwiki_W7500/cmsis_nvic.h b/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/cmsis_nvic.h similarity index 100% rename from libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/TARGET_WIZwiki_W7500/cmsis_nvic.h rename to libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/cmsis_nvic.h diff --git a/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/TARGET_WIZwiki_W7500/system_W7500x.c b/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/system_W7500x.c similarity index 100% rename from libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/TARGET_WIZwiki_W7500/system_W7500x.c rename to libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/system_W7500x.c diff --git a/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/TARGET_WIZwiki_W7500/system_W7500x.h b/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/system_W7500x.h similarity index 100% rename from libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/TARGET_WIZwiki_W7500/system_W7500x.h rename to libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/system_W7500x.h diff --git a/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_adc.c b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_adc.c similarity index 100% rename from libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_adc.c rename to libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_adc.c diff --git a/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_adc.h b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_adc.h similarity index 100% rename from libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_adc.h rename to libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_adc.h diff --git a/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_conf.h b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_conf.h similarity index 100% rename from libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_conf.h rename to libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_conf.h diff --git a/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_crg.c b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_crg.c similarity index 100% rename from libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_crg.c rename to libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_crg.c diff --git a/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_crg.h b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_crg.h similarity index 100% rename from libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_crg.h rename to libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_crg.h diff --git a/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_dualtimer.c b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_dualtimer.c similarity index 100% rename from libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_dualtimer.c rename to libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_dualtimer.c diff --git a/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_dualtimer.h b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_dualtimer.h similarity index 100% rename from libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_dualtimer.h rename to libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_dualtimer.h diff --git a/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_exti.c b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_exti.c similarity index 100% rename from libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_exti.c rename to libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_exti.c diff --git a/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_exti.h b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_exti.h similarity index 100% rename from libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_exti.h rename to libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_exti.h diff --git a/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_gpio.c b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_gpio.c similarity index 100% rename from libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_gpio.c rename to libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_gpio.c diff --git a/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_gpio.h b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_gpio.h similarity index 100% rename from libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_gpio.h rename to libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_gpio.h diff --git a/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_i2c.c b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_i2c.c similarity index 100% rename from libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_i2c.c rename to libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_i2c.c diff --git a/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_i2c.h b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_i2c.h similarity index 100% rename from libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_i2c.h rename to libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_i2c.h diff --git a/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_pwm.c b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_pwm.c similarity index 100% rename from libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_pwm.c rename to libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_pwm.c diff --git a/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_pwm.h b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_pwm.h similarity index 100% rename from libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_pwm.h rename to libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_pwm.h diff --git a/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_uart.c b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_uart.c similarity index 100% rename from libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_uart.c rename to libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_uart.c diff --git a/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_uart.h b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_uart.h similarity index 100% rename from libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_uart.h rename to libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_uart.h From 17d6ff861a69724352e8c72bb411c7f42cf7e9f4 Mon Sep 17 00:00:00 2001 From: hjjeon0608 Date: Wed, 2 Sep 2015 17:14:12 +0900 Subject: [PATCH 2/7] objects.h, PeripheralNames.h and PortNames.h are moved from TARGET_WIZwiki_W7500 folder to upper folder because they are not dependent to mcu. --- .../TARGET_W7500x/PeripheralNames.h | 78 +++++++++++++ .../TARGET_WIZNET/TARGET_W7500x/PortNames.h | 48 ++++++++ .../hal/TARGET_WIZNET/TARGET_W7500x/objects.h | 105 ++++++++++++++++++ 3 files changed, 231 insertions(+) create mode 100644 libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/PeripheralNames.h create mode 100644 libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/PortNames.h create mode 100644 libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/objects.h diff --git a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/PeripheralNames.h b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/PeripheralNames.h new file mode 100644 index 0000000000..ca7b5392d3 --- /dev/null +++ b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/PeripheralNames.h @@ -0,0 +1,78 @@ +/* mbed Microcontroller Library + ******************************************************************************* + * Copyright (c) 2015 WIZnet Co.,Ltd. All rights reserved. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of ARM Limited nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ******************************************************************************* + */ + +#ifndef MBED_PERIPHERALNAMES_H +#define MBED_PERIPHERALNAMES_H + +#include "cmsis.h" +#include "PinNames.h" +#ifdef __cplusplus +extern "C" { +#endif + +typedef enum { + ADC_0 = (int)W7500x_ADC_BASE +} ADCName; + +typedef enum { + UART_0 = (int)W7500x_UART0_BASE, + UART_1 = (int)W7500x_UART1_BASE +} UARTName; + +#define STDIO_UART_TX PC_2 +#define STDIO_UART_RX PC_3 +#define STDIO_UART UART_1 + +typedef enum { + SPI_0 = (int)SSP0_BASE, + SPI_1 = (int)SSP1_BASE +} SPIName; + +typedef enum { + I2C_0 = (int)I2C0_BASE, + I2C_1 = (int)I2C1_BASE +} I2CName; + +typedef enum { + PWM_0 = (int)PWM_CH0_BASE, + PWM_1 = (int)PWM_CH1_BASE, + PWM_2 = (int)PWM_CH2_BASE, + PWM_3 = (int)PWM_CH3_BASE, + PWM_4 = (int)PWM_CH4_BASE, + PWM_5 = (int)PWM_CH5_BASE, + PWM_6 = (int)PWM_CH6_BASE, + PWM_7 = (int)PWM_CH7_BASE +} PWMName; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/PortNames.h b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/PortNames.h new file mode 100644 index 0000000000..6a8638752e --- /dev/null +++ b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/PortNames.h @@ -0,0 +1,48 @@ +/* mbed Microcontroller Library + ******************************************************************************* + * Copyright (c) 2015 WIZnet Co.,Ltd. All rights reserved. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of ARM Limited nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ******************************************************************************* + */ + +#ifndef MBED_PORTNAMES_H +#define MBED_PORTNAMES_H + +#ifdef __cplusplus +extern "C" { +#endif + +typedef enum { + PortA = 0, + PortB = 1, + PortC = 2, + PortD = 3, +} PortName; + +#ifdef __cplusplus +} +#endif +#endif diff --git a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/objects.h b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/objects.h new file mode 100644 index 0000000000..8b75ce9588 --- /dev/null +++ b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/objects.h @@ -0,0 +1,105 @@ +/* mbed Microcontroller Library + ******************************************************************************* + * Copyright (c) 2015 WIZnet Co.,Ltd. All rights reserved. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of ARM Limited nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ******************************************************************************* + */ + +#ifndef MBED_OBJECTS_H +#define MBED_OBJECTS_H + +#include "cmsis.h" +#include "PortNames.h" +#include "PeripheralNames.h" +#include "PinNames.h" +#include "PortNames.h" + +#ifdef __cplusplus +extern "C" { +#endif + +struct gpio_irq_s { + IRQn_Type irq_n; + uint32_t event; + PinName pin; + uint32_t pin_index; + uint32_t pin_num; + uint32_t port_num; + uint32_t rise_null; + uint32_t fall_null; +}; + +struct port_s { + PortName port; + uint32_t mask; + PinDirection direction; + __IO uint32_t *reg_in; + __IO uint32_t *reg_out; +}; + +struct analogin_s { + ADCName adc; + PinName pin; +}; + +struct serial_s { + UARTName uart; + int index; // Used by irq + uint32_t baudrate; + uint32_t databits; + uint32_t stopbits; + uint32_t parity; + PinName pin_tx; + PinName pin_rx; +}; + +struct spi_s { + SSP_TypeDef *spi; +}; + +struct i2c_s { + I2CName I2Cx; + PinName sda; + PinName scl; + uint16_t ADDRESS; + uint16_t is_setAddress; +}; + +struct pwmout_s { + PWM_CHn_TypeDef * PWM_CHx; + PinName pin; + uint32_t period; + uint32_t pulse; + uint32_t PrescalerValue; +}; + +#include "gpio_object.h" + +#ifdef __cplusplus +} +#endif + +#endif From 428eae0cdce55892bef775b118975a766550f15f Mon Sep 17 00:00:00 2001 From: hjjeon0608 Date: Wed, 2 Sep 2015 17:15:13 +0900 Subject: [PATCH 3/7] objects.h, PeripheralNames.h and PortNames.h are moved from TARGET_WIZwiki_W7500 folder to upper folder. --- .../TARGET_WIZwiki_W7500/PeripheralNames.h | 78 ------------- .../TARGET_WIZwiki_W7500/PortNames.h | 48 -------- .../TARGET_WIZwiki_W7500/objects.h | 105 ------------------ 3 files changed, 231 deletions(-) delete mode 100644 libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/TARGET_WIZwiki_W7500/PeripheralNames.h delete mode 100644 libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/TARGET_WIZwiki_W7500/PortNames.h delete mode 100644 libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/TARGET_WIZwiki_W7500/objects.h diff --git a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/TARGET_WIZwiki_W7500/PeripheralNames.h b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/TARGET_WIZwiki_W7500/PeripheralNames.h deleted file mode 100644 index ca7b5392d3..0000000000 --- a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/TARGET_WIZwiki_W7500/PeripheralNames.h +++ /dev/null @@ -1,78 +0,0 @@ -/* mbed Microcontroller Library - ******************************************************************************* - * Copyright (c) 2015 WIZnet Co.,Ltd. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of ARM Limited nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ******************************************************************************* - */ - -#ifndef MBED_PERIPHERALNAMES_H -#define MBED_PERIPHERALNAMES_H - -#include "cmsis.h" -#include "PinNames.h" -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { - ADC_0 = (int)W7500x_ADC_BASE -} ADCName; - -typedef enum { - UART_0 = (int)W7500x_UART0_BASE, - UART_1 = (int)W7500x_UART1_BASE -} UARTName; - -#define STDIO_UART_TX PC_2 -#define STDIO_UART_RX PC_3 -#define STDIO_UART UART_1 - -typedef enum { - SPI_0 = (int)SSP0_BASE, - SPI_1 = (int)SSP1_BASE -} SPIName; - -typedef enum { - I2C_0 = (int)I2C0_BASE, - I2C_1 = (int)I2C1_BASE -} I2CName; - -typedef enum { - PWM_0 = (int)PWM_CH0_BASE, - PWM_1 = (int)PWM_CH1_BASE, - PWM_2 = (int)PWM_CH2_BASE, - PWM_3 = (int)PWM_CH3_BASE, - PWM_4 = (int)PWM_CH4_BASE, - PWM_5 = (int)PWM_CH5_BASE, - PWM_6 = (int)PWM_CH6_BASE, - PWM_7 = (int)PWM_CH7_BASE -} PWMName; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/TARGET_WIZwiki_W7500/PortNames.h b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/TARGET_WIZwiki_W7500/PortNames.h deleted file mode 100644 index 6a8638752e..0000000000 --- a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/TARGET_WIZwiki_W7500/PortNames.h +++ /dev/null @@ -1,48 +0,0 @@ -/* mbed Microcontroller Library - ******************************************************************************* - * Copyright (c) 2015 WIZnet Co.,Ltd. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of ARM Limited nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ******************************************************************************* - */ - -#ifndef MBED_PORTNAMES_H -#define MBED_PORTNAMES_H - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { - PortA = 0, - PortB = 1, - PortC = 2, - PortD = 3, -} PortName; - -#ifdef __cplusplus -} -#endif -#endif diff --git a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/TARGET_WIZwiki_W7500/objects.h b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/TARGET_WIZwiki_W7500/objects.h deleted file mode 100644 index 8b75ce9588..0000000000 --- a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/TARGET_WIZwiki_W7500/objects.h +++ /dev/null @@ -1,105 +0,0 @@ -/* mbed Microcontroller Library - ******************************************************************************* - * Copyright (c) 2015 WIZnet Co.,Ltd. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of ARM Limited nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ******************************************************************************* - */ - -#ifndef MBED_OBJECTS_H -#define MBED_OBJECTS_H - -#include "cmsis.h" -#include "PortNames.h" -#include "PeripheralNames.h" -#include "PinNames.h" -#include "PortNames.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct gpio_irq_s { - IRQn_Type irq_n; - uint32_t event; - PinName pin; - uint32_t pin_index; - uint32_t pin_num; - uint32_t port_num; - uint32_t rise_null; - uint32_t fall_null; -}; - -struct port_s { - PortName port; - uint32_t mask; - PinDirection direction; - __IO uint32_t *reg_in; - __IO uint32_t *reg_out; -}; - -struct analogin_s { - ADCName adc; - PinName pin; -}; - -struct serial_s { - UARTName uart; - int index; // Used by irq - uint32_t baudrate; - uint32_t databits; - uint32_t stopbits; - uint32_t parity; - PinName pin_tx; - PinName pin_rx; -}; - -struct spi_s { - SSP_TypeDef *spi; -}; - -struct i2c_s { - I2CName I2Cx; - PinName sda; - PinName scl; - uint16_t ADDRESS; - uint16_t is_setAddress; -}; - -struct pwmout_s { - PWM_CHn_TypeDef * PWM_CHx; - PinName pin; - uint32_t period; - uint32_t pulse; - uint32_t PrescalerValue; -}; - -#include "gpio_object.h" - -#ifdef __cplusplus -} -#endif - -#endif From b329a1e6b51f745efacd492df76cc4e3ffa22c31 Mon Sep 17 00:00:00 2001 From: hjjeon0608 Date: Wed, 2 Sep 2015 17:32:01 +0900 Subject: [PATCH 4/7] I found wrong pin name during re-struct the folders. So I correct this. --- .../TARGET_WIZwiki_W7500/PeripheralPins.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/TARGET_WIZwiki_W7500/PeripheralPins.c b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/TARGET_WIZwiki_W7500/PeripheralPins.c index 6c5c5ae6d4..8df216352e 100644 --- a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/TARGET_WIZwiki_W7500/PeripheralPins.c +++ b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/TARGET_WIZwiki_W7500/PeripheralPins.c @@ -73,7 +73,7 @@ const PinMap PinMap_I2C_SCL[] = { {PA_9, I2C_0, WIZ_PIN_DATA(WIZ_MODE_AF, WIZ_GPIO_NOPULL, Px_AFSR_AF0)}, {PC_8, I2C_0, WIZ_PIN_DATA(WIZ_MODE_AF, WIZ_GPIO_NOPULL, Px_AFSR_AF2)}, {PC_4, I2C_1, WIZ_PIN_DATA(WIZ_MODE_AF, WIZ_GPIO_NOPULL, Px_AFSR_AF0)}, - {PC_5, I2C_1, WIZ_PIN_DATA(WIZ_MODE_AF, WIZ_GPIO_NOPULL, Px_AFSR_AF2)}, + {PA_5, I2C_1, WIZ_PIN_DATA(WIZ_MODE_AF, WIZ_GPIO_NOPULL, Px_AFSR_AF2)}, {NC, NC, 0} }; @@ -82,32 +82,32 @@ const PinMap PinMap_I2C_SCL[] = { const PinMap PinMap_SPI_SCLK[] = { {PA_6 , SPI_0, WIZ_PIN_DATA(WIZ_MODE_AF, WIZ_GPIO_NOPULL, Px_AFSR_AF0)}, {PB_1 , SPI_1, WIZ_PIN_DATA(WIZ_MODE_AF, WIZ_GPIO_NOPULL, Px_AFSR_AF0)}, - {PC_12, SPI_0, WIZ_PIN_DATA(WIZ_MODE_AF, WIZ_GPIO_NOPULL, Px_AFSR_AF3)}, - {PA_12, SPI_1, WIZ_PIN_DATA(WIZ_MODE_AF, WIZ_GPIO_NOPULL, Px_AFSR_AF3)}, + {PC_13, SPI_0, WIZ_PIN_DATA(WIZ_MODE_AF, WIZ_GPIO_NOPULL, Px_AFSR_AF2)}, + {PA_12, SPI_1, WIZ_PIN_DATA(WIZ_MODE_AF, WIZ_GPIO_NOPULL, Px_AFSR_AF2)}, {NC , NC , 0} }; const PinMap PinMap_SPI_MOSI[] = { {PA_8 , SPI_0, WIZ_PIN_DATA(WIZ_MODE_AF, WIZ_GPIO_NOPULL, Px_AFSR_AF0)}, {PB_3 , SPI_1, WIZ_PIN_DATA(WIZ_MODE_AF, WIZ_GPIO_NOPULL, Px_AFSR_AF0)}, - {PC_10, SPI_0, WIZ_PIN_DATA(WIZ_MODE_AF, WIZ_GPIO_NOPULL, Px_AFSR_AF3)}, - {PA_14, SPI_1, WIZ_PIN_DATA(WIZ_MODE_AF, WIZ_GPIO_NOPULL, Px_AFSR_AF3)}, + {PC_15, SPI_0, WIZ_PIN_DATA(WIZ_MODE_AF, WIZ_GPIO_NOPULL, Px_AFSR_AF2)}, + {PA_14, SPI_1, WIZ_PIN_DATA(WIZ_MODE_AF, WIZ_GPIO_NOPULL, Px_AFSR_AF2)}, {NC , NC , 0} }; const PinMap PinMap_SPI_MISO[] = { {PA_7 , SPI_0, WIZ_PIN_DATA(WIZ_MODE_AF, WIZ_GPIO_NOPULL, Px_AFSR_AF0)}, {PB_2 , SPI_1, WIZ_PIN_DATA(WIZ_MODE_AF, WIZ_GPIO_NOPULL, Px_AFSR_AF0)}, - {PC_11, SPI_0, WIZ_PIN_DATA(WIZ_MODE_AF, WIZ_GPIO_NOPULL, Px_AFSR_AF3)}, - {PA_13, SPI_1, WIZ_PIN_DATA(WIZ_MODE_AF, WIZ_GPIO_NOPULL, Px_AFSR_AF3)}, + {PC_14, SPI_0, WIZ_PIN_DATA(WIZ_MODE_AF, WIZ_GPIO_NOPULL, Px_AFSR_AF2)}, + {PA_13, SPI_1, WIZ_PIN_DATA(WIZ_MODE_AF, WIZ_GPIO_NOPULL, Px_AFSR_AF2)}, {NC , NC , 0} }; const PinMap PinMap_SPI_SSEL[] = { {PA_5 , SPI_0, WIZ_PIN_DATA(WIZ_MODE_AF, WIZ_GPIO_NOPULL, Px_AFSR_AF0)}, {PB_0 , SPI_1, WIZ_PIN_DATA(WIZ_MODE_AF, WIZ_GPIO_NOPULL, Px_AFSR_AF0)}, - {PC_13, SPI_0, WIZ_PIN_DATA(WIZ_MODE_AF, WIZ_GPIO_NOPULL, Px_AFSR_AF3)}, - {PA_11, SPI_1, WIZ_PIN_DATA(WIZ_MODE_AF, WIZ_GPIO_NOPULL, Px_AFSR_AF3)}, + {PC_12, SPI_0, WIZ_PIN_DATA(WIZ_MODE_AF, WIZ_GPIO_NOPULL, Px_AFSR_AF2)}, + {PA_11, SPI_1, WIZ_PIN_DATA(WIZ_MODE_AF, WIZ_GPIO_NOPULL, Px_AFSR_AF2)}, {NC , NC , 0} }; From 01ce5e6580103d1c9146d414430ffc817f2c43c8 Mon Sep 17 00:00:00 2001 From: hjjeon0608 Date: Wed, 2 Sep 2015 17:34:19 +0900 Subject: [PATCH 5/7] Move defines of UART from PeripheralNames.h to device.h because to move PeripheralNames.h(not dependent mcu) to upper folder. --- .../TARGET_W7500x/TARGET_WIZwiki_W7500/device.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/TARGET_WIZwiki_W7500/device.h b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/TARGET_WIZwiki_W7500/device.h index 1e5a50d2c1..fe976be652 100644 --- a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/TARGET_WIZwiki_W7500/device.h +++ b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/TARGET_WIZwiki_W7500/device.h @@ -67,6 +67,11 @@ #define DEVICE_STDIO_MESSAGES 1 +#define STDIO_UART_TX PC_2 +#define STDIO_UART_RX PC_3 +#define STDIO_UART UART_1 + + #define DEVICE_ERROR_RED 0 #include "objects.h" From 3208676d7ac6d5ca89e6abe984e7bc3988288f11 Mon Sep 17 00:00:00 2001 From: hjjeon0608 Date: Wed, 2 Sep 2015 17:55:26 +0900 Subject: [PATCH 6/7] We handle including header by W7500x_conf.h. But now I deleted the W7500x_conf.h and all peri drivers have own including header. And some code are optimized and removed warning. --- .../cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x.h | 16 ++++++++++++++++ .../TARGET_W7500x/PeripheralNames.h | 3 --- .../W7500x_Peripheral_Library/W7500x_adc.c | 1 + .../W7500x_dualtimer.c | 1 + .../W7500x_Peripheral_Library/W7500x_exti.c | 3 ++- .../W7500x_Peripheral_Library/W7500x_gpio.c | 3 +-- .../W7500x_Peripheral_Library/W7500x_gpio.h | 15 --------------- .../W7500x_Peripheral_Library/W7500x_i2c.c | 18 ++++++++---------- .../W7500x_Peripheral_Library/W7500x_i2c.h | 4 ++-- .../W7500x_Peripheral_Library/W7500x_pwm.c | 1 + .../W7500x_Peripheral_Library/W7500x_uart.c | 1 + .../TARGET_WIZNET/TARGET_W7500x/analogin_api.c | 1 + .../TARGET_WIZNET/TARGET_W7500x/gpio_irq_api.c | 2 +- .../TARGET_WIZNET/TARGET_W7500x/gpio_object.h | 1 + .../hal/TARGET_WIZNET/TARGET_W7500x/i2c_api.c | 9 +++++---- .../hal/TARGET_WIZNET/TARGET_W7500x/pinmap.c | 2 ++ .../TARGET_WIZNET/TARGET_W7500x/pwmout_api.c | 1 + .../hal/TARGET_WIZNET/TARGET_W7500x/rtc_api.c | 2 ++ .../TARGET_WIZNET/TARGET_W7500x/serial_api.c | 1 + .../TARGET_WIZNET/TARGET_W7500x/us_ticker.c | 2 ++ 20 files changed, 49 insertions(+), 38 deletions(-) diff --git a/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x.h b/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x.h index 4adb010f60..dbee0c1b2c 100644 --- a/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x.h +++ b/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x.h @@ -1146,6 +1146,22 @@ typedef struct //ToDo +typedef enum +{ + PAD_PA = 0, + PAD_PB, + PAD_PC, + PAD_PD +}PAD_Type; + +typedef enum +{ + PAD_AF0 = Px_AFSR_AF0, + PAD_AF1 = Px_AFSR_AF1, + PAD_AF2 = Px_AFSR_AF2, + PAD_AF3 = Px_AFSR_AF3 +}PAD_AF_TypeDef; + #if !defined (USE_HAL_DRIVER) #define USE_HAL_DRIVER diff --git a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/PeripheralNames.h b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/PeripheralNames.h index ca7b5392d3..973ff199b8 100644 --- a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/PeripheralNames.h +++ b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/PeripheralNames.h @@ -46,9 +46,6 @@ typedef enum { UART_1 = (int)W7500x_UART1_BASE } UARTName; -#define STDIO_UART_TX PC_2 -#define STDIO_UART_RX PC_3 -#define STDIO_UART UART_1 typedef enum { SPI_0 = (int)SSP0_BASE, diff --git a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_adc.c b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_adc.c index cd473752b5..c713cc5698 100644 --- a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_adc.c +++ b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_adc.c @@ -1,4 +1,5 @@ #include "W7500x.h" +#include "W7500x_adc.h" void ADC_PowerDownEnable (FunctionalState NewState) { diff --git a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_dualtimer.c b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_dualtimer.c index 64eec8836b..4b28fa56f5 100644 --- a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_dualtimer.c +++ b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_dualtimer.c @@ -13,6 +13,7 @@ /* Includes -------------------------------------------*/ #include "W7500x.h" +#include "W7500x_dualtimer.h" void DUALTIMER_ClockEnable(DUALTIMER_TypeDef* DUALTIMERn) { diff --git a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_exti.c b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_exti.c index ab6b1e4948..c3008f5803 100644 --- a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_exti.c +++ b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_exti.c @@ -1,5 +1,6 @@ #include "W7500x.h" - +#include "W7500x_exti.h" +#include "W7500x_gpio.h" /** diff --git a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_gpio.c b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_gpio.c index 7ee38aa721..1257eb4fa8 100644 --- a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_gpio.c +++ b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_gpio.c @@ -1,6 +1,5 @@ #include "W7500x.h" - - +#include "W7500x_gpio.h" void HAL_GPIO_DeInit(GPIO_TypeDef* GPIOx) { diff --git a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_gpio.h b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_gpio.h index b8dad4332b..8f2834bddf 100644 --- a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_gpio.h +++ b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_gpio.h @@ -83,21 +83,6 @@ typedef enum Bit_SET }BitAction; -typedef enum -{ - PAD_PA = 0, - PAD_PB, - PAD_PC, - PAD_PD -}PAD_Type; - -typedef enum -{ - PAD_AF0 = Px_AFSR_AF0, - PAD_AF1 = Px_AFSR_AF1, - PAD_AF2 = Px_AFSR_AF2, - PAD_AF3 = Px_AFSR_AF3 -}PAD_AF_TypeDef; #define IS_PAD_TYPE(Px) (((Px) == PAD_PA) || ((Px) == PAD_PB) \ ((Px) == PAD_PC) || ((Px) == PAD_PD)) diff --git a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_i2c.c b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_i2c.c index 01ea720476..5efe1ac9fc 100644 --- a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_i2c.c +++ b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_i2c.c @@ -28,8 +28,9 @@ ******************************************************************************* */ /*include -------------------------------------*/ -#include #include "W7500x.h" +#include "W7500x_i2c.h" +#include "W7500x_gpio.h" GPIO_InitTypeDef GPIO_InitDef; @@ -61,8 +62,8 @@ uint32_t I2C_Init(I2C_ConfigStruct* conf) HAL_GPIO_ResetBits((GPIO_TypeDef*)(GPIOA_BASE + (sda_port_num << 24)), sda_pin_index); //Pin muxing - HAL_PAD_AFConfig(scl_port_num, scl_pin_index, PAD_AF1); - HAL_PAD_AFConfig(sda_port_num, sda_pin_index, PAD_AF1); + HAL_PAD_AFConfig((PAD_Type)scl_port_num, (uint16_t)scl_pin_index, PAD_AF1); + HAL_PAD_AFConfig((PAD_Type)sda_port_num, (uint16_t)sda_pin_index, PAD_AF1); return 0; } @@ -98,9 +99,6 @@ uint8_t I2C_ReadBitSDA(I2C_ConfigStruct* conf) if(HAL_GPIO_ReadInputDataBit((GPIO_TypeDef*)(GPIOA_BASE + (sda_port_num << 24)), sda_pin_index)) return 1; - else - return 0; - return 0; } @@ -193,7 +191,7 @@ int I2C_Write(I2C_ConfigStruct* conf, uint8_t addr, uint8_t* data, uint32_t len) //Write addr if(I2C_WriteByte(conf, addr) != 0) { - printf("Received NACK at address phase!!\r\n"); + //printf("Received NACK at address phase!!\r\n"); return -1; } @@ -218,7 +216,7 @@ int I2C_WriteRepeated(I2C_ConfigStruct* conf, uint8_t addr, uint8_t* data, uint3 //Write addr if(I2C_WriteByte(conf, addr) != 0) { - printf("Received NACK at address phase!!\r\n"); + //printf("Received NACK at address phase!!\r\n"); return -1; } @@ -241,7 +239,7 @@ int I2C_Read(I2C_ConfigStruct* conf, uint8_t addr, uint8_t* data, uint32_t len) //Write addr | read command if(I2C_WriteByte(conf, (addr | 1)) != 0) { - printf("Received NACK at address phase!!\r\n"); + //printf("Received NACK at address phase!!\r\n"); return -1; } @@ -270,7 +268,7 @@ int I2C_ReadRepeated(I2C_ConfigStruct* conf, uint8_t addr, uint8_t* data, uint32 //Write addr | read command if(I2C_WriteByte(conf, (addr | 1)) != 0) { - printf("Received NACK at address phase!!\r\n"); + //printf("Received NACK at address phase!!\r\n"); return -1; } diff --git a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_i2c.h b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_i2c.h index 60685f8b20..f99545796a 100644 --- a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_i2c.h +++ b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_i2c.h @@ -28,11 +28,11 @@ ******************************************************************************* */ /*include -------------------------------------*/ -#include "W7500x.h" - #ifndef __W7500X_I2C_H #define __W7500X_I2C_H +#include "W7500x.h" + typedef enum { I2C_PA_5 = 0x05, diff --git a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_pwm.c b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_pwm.c index d364279a3a..aff33d3915 100644 --- a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_pwm.c +++ b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_pwm.c @@ -13,6 +13,7 @@ /* Includes -------------------------------------------*/ #include "W7500x.h" +#include "W7500x_pwm.h" void PWM_DeInit(PWM_CHn_TypeDef* PWM_CHn) { diff --git a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_uart.c b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_uart.c index 67eba2e88d..fb90e393f9 100644 --- a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_uart.c +++ b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_uart.c @@ -14,6 +14,7 @@ /* Includes ------------------------------------------------------------------*/ #include "W7500x.h" +#include "W7500x_uart.h" void UART_StructInit(UART_InitTypeDef* UART_InitStruct) { diff --git a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/analogin_api.c b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/analogin_api.c index 0725ce673a..6b3b45961a 100644 --- a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/analogin_api.c +++ b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/analogin_api.c @@ -36,6 +36,7 @@ #include "wait_api.h" #include "cmsis.h" #include "pinmap.h" +#include "W7500x_adc.h" #include "PeripheralPins.h" diff --git a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/gpio_irq_api.c b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/gpio_irq_api.c index fd84f5951a..10ef6ae19b 100644 --- a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/gpio_irq_api.c +++ b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/gpio_irq_api.c @@ -46,7 +46,7 @@ static uint32_t channel_ids[4][16]; #ifdef __cplusplus extern "C"{ #endif - +void port_generic_handler(GPIO_TypeDef* GPIOx, uint32_t port_num); void PORT0_Handler(void) { diff --git a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/gpio_object.h b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/gpio_object.h index ff64208b31..005fa7ec17 100644 --- a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/gpio_object.h +++ b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/gpio_object.h @@ -32,6 +32,7 @@ #define MBED_GPIO_OBJECT_H #include "mbed_assert.h" +#include "W7500x_gpio.h" #ifdef __cplusplus extern "C" { diff --git a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/i2c_api.c b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/i2c_api.c index d8bf78ceea..e06a1a2acc 100644 --- a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/i2c_api.c +++ b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/i2c_api.c @@ -40,6 +40,7 @@ #include "wait_api.h" #include "us_ticker_api.h" +#include "W7500x_i2c.h" /* Timeout values for flags and events waiting loops. These timeouts are not based on accurate values, they just guarantee that the application will @@ -106,12 +107,12 @@ int i2c_read(i2c_t *obj, int address, char *data, int length, int stop) if(stop) { - if(I2C_Read(&conf, address, data, length) != 0) + if(I2C_Read(&conf, address, (uint8_t*)data, length) != 0) return -1; } else { - if(I2C_ReadRepeated(&conf, address, data, length) != 0) + if(I2C_ReadRepeated(&conf, address, (uint8_t*)data, length) != 0) return -1; } @@ -129,12 +130,12 @@ int i2c_write(i2c_t *obj, int address, const char *data, int length, int stop) if(stop) { - if(I2C_Write(&conf, address, data, length) != 0) + if(I2C_Write(&conf, address, (uint8_t*)data, length) != 0) return -1; } else { - if(I2C_WriteRepeated(&conf, address, data, length) != 0) + if(I2C_WriteRepeated(&conf, address, (uint8_t*)data, length) != 0) return -1; } diff --git a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/pinmap.c b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/pinmap.c index 6f4579cdf0..c69be952a2 100644 --- a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/pinmap.c +++ b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/pinmap.c @@ -32,6 +32,8 @@ #include "pinmap.h" #include "PortNames.h" #include "mbed_error.h" +#include "W7500x.h" +#include "W7500x_gpio.h" uint32_t Get_GPIO_BaseAddress(uint32_t port_idx) diff --git a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/pwmout_api.c b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/pwmout_api.c index db6d9a5ef7..b659084f81 100644 --- a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/pwmout_api.c +++ b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/pwmout_api.c @@ -35,6 +35,7 @@ #include "pinmap.h" #include "mbed_error.h" #include "PeripheralPins.h" +#include "W7500x_pwm.h" static PWM_TimerModeInitTypeDef TimerModeStructure; diff --git a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/rtc_api.c b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/rtc_api.c index 1b58166e08..e789f4afb1 100644 --- a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/rtc_api.c +++ b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/rtc_api.c @@ -14,6 +14,8 @@ * limitations under the License. */ #include "rtc_api.h" +#include "cmsis.h" +#include "W7500x_pwm.h" time_t wiz_rtc_time; char rtc_enabled = 0; diff --git a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/serial_api.c b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/serial_api.c index 8867d39f80..ab29cd73f9 100644 --- a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/serial_api.c +++ b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/serial_api.c @@ -37,6 +37,7 @@ #include "pinmap.h" #include #include "PeripheralPins.h" +#include "W7500x_uart.h" #define UART_NUM (2) diff --git a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/us_ticker.c b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/us_ticker.c index e230963441..cd4e3071c6 100644 --- a/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/us_ticker.c +++ b/libraries/mbed/targets/hal/TARGET_WIZNET/TARGET_W7500x/us_ticker.c @@ -32,6 +32,8 @@ #include "us_ticker_api.h" #include "PeripheralNames.h" #include "system_W7500x.h" +#include "W7500x_dualtimer.h" +#include "W7500x_pwm.h" #define TIMER_0 DUALTIMER0_0 #define TIMER_1 PWM_CH1 From cbe00fd83224f019d97fb1b9582c2b17cbfe24e1 Mon Sep 17 00:00:00 2001 From: hjjeon0608 Date: Wed, 2 Sep 2015 17:59:15 +0900 Subject: [PATCH 7/7] Remove '#include W7500x_conf.h' Add assert parameter define. --- .../cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x.h b/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x.h index dbee0c1b2c..b4a6946c76 100644 --- a/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x.h +++ b/libraries/mbed/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x.h @@ -125,7 +125,6 @@ typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus; - /** * @} */ @@ -1146,6 +1145,7 @@ typedef struct //ToDo + typedef enum { PAD_PA = 0, @@ -1170,9 +1170,16 @@ typedef enum #if defined (USE_HAL_DRIVER) - #include "W7500x_conf.h" +// #include "system_W7500x.h" +// #include "W7500x_conf.h" #endif +#ifdef USE_FULL_ASSERT + #define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__,__LINE__)) +#else + #define assert_param(expr) ((void)0) +#endif /* USE_FULL_ASSERT */ + #ifdef __cplusplus } #endif