diff --git a/core/deps/picotcp/include/pico_config.h b/core/deps/picotcp/include/pico_config.h index 31c875c7a..c43ad5c1b 100644 --- a/core/deps/picotcp/include/pico_config.h +++ b/core/deps/picotcp/include/pico_config.h @@ -3,7 +3,12 @@ See COPYING, LICENSE.GPLv2 and LICENSE.GPLv3 for usage. *********************************************************************/ +#ifdef _MS_VER +#include "pico_defines_msvc.h" +#else #include "pico_defines.h" +#endif + #ifndef INCLUDE_PICO_CONFIG #define INCLUDE_PICO_CONFIG #ifndef __KERNEL__ diff --git a/core/deps/picotcp/include/pico_defines_msvc.h b/core/deps/picotcp/include/pico_defines_msvc.h new file mode 100644 index 000000000..dbe4513e3 --- /dev/null +++ b/core/deps/picotcp/include/pico_defines_msvc.h @@ -0,0 +1,14 @@ +// pico_defines.h for MS VC +#ifndef PICO_DEFINES_H +#define PICO_DEFINES_H + +#define PICO_SUPPORT_ETH +#define PICO_SUPPORT_IPV4 +#define PICO_SUPPORT_IPV4FRAG +#define PICO_SUPPORT_ICMP4 +#define PICO_SUPPORT_TCP +#define PICO_SUPPORT_UDP +#define PICO_SUPPORT_DNS_CLIENT +#define PICO_SUPPORT_CRC +#define PICO_SUPPORT_PPP +#endif diff --git a/core/deps/picotcp/modules/pico_dhcp_client.h b/core/deps/picotcp/modules/pico_dhcp_client.h index 8ec8e27ee..db0b0579a 100644 --- a/core/deps/picotcp/modules/pico_dhcp_client.h +++ b/core/deps/picotcp/modules/pico_dhcp_client.h @@ -7,7 +7,7 @@ *********************************************************************/ #ifndef INCLUDE_PICO_DHCP_CLIENT #define INCLUDE_PICO_DHCP_CLIENT -#include "pico_defines.h" +#include "pico_config.h" #ifdef PICO_SUPPORT_UDP #include "pico_dhcp_common.h" #include "pico_addressing.h" diff --git a/core/deps/picotcp/modules/pico_icmp4.h b/core/deps/picotcp/modules/pico_icmp4.h index 7a3a5e890..739796b35 100644 --- a/core/deps/picotcp/modules/pico_icmp4.h +++ b/core/deps/picotcp/modules/pico_icmp4.h @@ -7,7 +7,7 @@ *********************************************************************/ #ifndef INCLUDE_PICO_ICMP4 #define INCLUDE_PICO_ICMP4 -#include "pico_defines.h" +#include "pico_config.h" #include "pico_addressing.h" #include "pico_protocol.h" diff --git a/core/hw/modem/modem.cpp b/core/hw/modem/modem.cpp index 161abf19a..9022e20de 100644 --- a/core/hw/modem/modem.cpp +++ b/core/hw/modem/modem.cpp @@ -298,8 +298,14 @@ static int modem_sched_func(int tag, int c, int j) callback_cycles = SH4_MAIN_CLOCK / 1000000 * 238; // 238 us break; + + default: + break; } break; + + default: + break; } update_interrupt(); @@ -455,7 +461,7 @@ static void ModemNormalWrite(u32 reg, u32 data) switch(reg) { case 0x02: - modem_regs.reg0f.RTSDT = modem_regs.reg02.v0.RTSDE & connect_state == CONNECTED; + modem_regs.reg0f.RTSDT = modem_regs.reg02.v0.RTSDE && connect_state == CONNECTED; break; case 0x06: @@ -610,7 +616,7 @@ static void ModemNormalWrite(u32 reg, u32 data) } } // Don't allow NEWS to be set if 0 - if (old & (1 << 3) == 0) + if ((old & (1 << 3)) == 0) modem_regs.reg1f.NEWS = 0; if (!modem_regs.reg1f.NEWS) {