WiFi: Fix compiling for compilers not running C++11 language features.
This commit is contained in:
parent
b86a7748b1
commit
407931288a
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Copyright (C) 2007 Tim Seidel
|
||||
Copyright (C) 2008-2021 DeSmuME team
|
||||
Copyright (C) 2008-2022 DeSmuME team
|
||||
|
||||
This file is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -4678,7 +4678,7 @@ void WifiHandler::CommTrigger()
|
|||
|
||||
if((io.US_COUNT & 3) == 0)
|
||||
{
|
||||
const WifiTXLocIndex txSlotIndex = wifi.txCurrentSlot;
|
||||
const WifiTXLocIndex txSlotIndex = (WifiTXLocIndex)wifi.txCurrentSlot;
|
||||
bool isTXSlotBusy = false;
|
||||
|
||||
switch(txSlotIndex)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Copyright (C) 2007 Tim Seidel
|
||||
Copyright (C) 2014 pleonex
|
||||
Copyright (C) 2008-2018 DeSmuME team
|
||||
Copyright (C) 2008-2022 DeSmuME team
|
||||
|
||||
This file is part of DeSmuME
|
||||
|
||||
|
@ -31,6 +31,12 @@
|
|||
#include <vector>
|
||||
#include "emufile.h"
|
||||
|
||||
#if defined(__cplusplus) && (__cplusplus < 201103L)
|
||||
#define DESMUME_ENUM(type,name) enum name
|
||||
#else
|
||||
#define DESMUME_ENUM(type,name) enum name : type
|
||||
#endif
|
||||
|
||||
#define REG_WIFI_ID 0x000
|
||||
#define REG_WIFI_MODE 0x004
|
||||
#define REG_WIFI_WEP 0x006
|
||||
|
@ -210,7 +216,7 @@ struct slock;
|
|||
typedef slock slock_t;
|
||||
|
||||
// RF2958 Register Addresses
|
||||
enum RegAddrRF2958 : s32
|
||||
DESMUME_ENUM(s32, RegAddrRF2958)
|
||||
{
|
||||
REG_RF2958_CFG1 = 0,
|
||||
REG_RF2958_IPLL1 = 1,
|
||||
|
@ -753,7 +759,7 @@ typedef struct
|
|||
u8 data[105];
|
||||
} bb_t;
|
||||
|
||||
enum WifiRFStatus : s32
|
||||
DESMUME_ENUM(s32, WifiRFStatus)
|
||||
{
|
||||
WifiRFStatus0_Initial = 0,
|
||||
WifiRFStatus1_TXComplete = 1,
|
||||
|
@ -767,7 +773,7 @@ enum WifiRFStatus : s32
|
|||
WifiRFStatus9_Idle = 9
|
||||
};
|
||||
|
||||
enum WifiIRQ : s32
|
||||
DESMUME_ENUM(s32, WifiIRQ)
|
||||
{
|
||||
WifiIRQ00_RXComplete = 0,
|
||||
WifiIRQ01_TXComplete = 1,
|
||||
|
@ -787,14 +793,14 @@ enum WifiIRQ : s32
|
|||
WifiIRQ15_TimeslotPreBeacon = 15
|
||||
};
|
||||
|
||||
enum EAPStatus : s32
|
||||
DESMUME_ENUM(s32, EAPStatus)
|
||||
{
|
||||
APStatus_Disconnected = 0,
|
||||
APStatus_Authenticated,
|
||||
APStatus_Associated
|
||||
};
|
||||
|
||||
enum WifiTXLocIndex : s32
|
||||
DESMUME_ENUM(s32, WifiTXLocIndex)
|
||||
{
|
||||
WifiTXLocIndex_LOC1 = 0,
|
||||
WifiTXLocIndex_CMD = 1,
|
||||
|
@ -804,7 +810,7 @@ enum WifiTXLocIndex : s32
|
|||
WifiTXLocIndex_CMDREPLY = 5
|
||||
};
|
||||
|
||||
enum WifiStageID : s32
|
||||
DESMUME_ENUM(s32, WifiStageID)
|
||||
{
|
||||
WifiStageID_PreambleDone = 0,
|
||||
WifiStageID_TransmitDone = 1,
|
||||
|
@ -813,14 +819,14 @@ enum WifiStageID : s32
|
|||
WifiStageID_CmdReplyTransferDone = 4
|
||||
};
|
||||
|
||||
enum WifiEmulationLevel : s32
|
||||
DESMUME_ENUM(s32, WifiEmulationLevel)
|
||||
{
|
||||
WifiEmulationLevel_Off = 0,
|
||||
WifiEmulationLevel_Normal = 10000,
|
||||
WifiEmulationLevel_Compatibility = 65535
|
||||
};
|
||||
|
||||
enum WifiCommInterfaceID : s32
|
||||
DESMUME_ENUM(s32, WifiCommInterfaceID)
|
||||
{
|
||||
WifiCommInterfaceID_AdHoc = 0,
|
||||
WifiCommInterfaceID_Infrastructure = 1
|
||||
|
@ -2787,7 +2793,7 @@ typedef struct
|
|||
bb_t bb;
|
||||
u8 RAM[0x2000];
|
||||
|
||||
WifiTXLocIndex txCurrentSlot;
|
||||
s32 txCurrentSlot; // Possible values are declared in WifiTXLocIndex.
|
||||
TXPacketInfo txPacketInfo[6];
|
||||
u32 cmdCount_u32;
|
||||
u64 usecCounter;
|
||||
|
@ -2822,14 +2828,14 @@ typedef struct
|
|||
} DesmumeFrameHeader; // Should total 16 bytes
|
||||
|
||||
// IEEE 802.11 Frame Information
|
||||
enum WifiFrameType : s32
|
||||
DESMUME_ENUM(s32, WifiFrameType)
|
||||
{
|
||||
WifiFrameType_Management = 0,
|
||||
WifiFrameType_Control = 1,
|
||||
WifiFrameType_Data = 2
|
||||
};
|
||||
|
||||
enum WifiFrameManagementSubtype : s32
|
||||
DESMUME_ENUM(s32, WifiFrameManagementSubtype)
|
||||
{
|
||||
WifiFrameManagementSubtype_AssociationRequest = 0x00,
|
||||
WifiFrameManagementSubtype_AssociationResponse = 0x01,
|
||||
|
@ -2849,7 +2855,7 @@ enum WifiFrameManagementSubtype : s32
|
|||
WifiFrameManagementSubtype_RESERVED0F = 0x0F
|
||||
};
|
||||
|
||||
enum WifiFrameControlSubtype : s32
|
||||
DESMUME_ENUM(s32, WifiFrameControlSubtype)
|
||||
{
|
||||
WifiFrameControlSubtype_RESERVED00 = 0x00,
|
||||
WifiFrameControlSubtype_RESERVED01 = 0x01,
|
||||
|
@ -2869,7 +2875,7 @@ enum WifiFrameControlSubtype : s32
|
|||
WifiFrameControlSubtype_EndAck = 0x0F
|
||||
};
|
||||
|
||||
enum WifiFrameDataSubtype : s32
|
||||
DESMUME_ENUM(s32, WifiFrameDataSubtype)
|
||||
{
|
||||
WifiFrameDataSubtype_Data = 0x00,
|
||||
WifiFrameDataSubtype_DataAck = 0x01,
|
||||
|
@ -2889,7 +2895,7 @@ enum WifiFrameDataSubtype : s32
|
|||
WifiFrameDataSubtype_RESERVED0F = 0x0F
|
||||
};
|
||||
|
||||
enum WifiFCFromToState : s32
|
||||
DESMUME_ENUM(s32, WifiFCFromToState)
|
||||
{
|
||||
WifiFCFromToState_STA2STA = 0x0,
|
||||
WifiFCFromToState_STA2DS = 0x1,
|
||||
|
|
Loading…
Reference in New Issue