1 // 2 // Copyright (c) 2010-2018 Antmicro 3 // Copyright (c) 2011-2015 Realtime Embedded 4 // 5 // This file is licensed under the MIT License. 6 // Full license text is available in 'licenses/MIT.txt'. 7 // 8 using System; 9 using Antmicro.Renode.Logging; 10 using Antmicro.Renode.Peripherals.Bus; 11 using Antmicro.Renode.Storage; 12 using Antmicro.Renode.Utilities; 13 using System.IO; 14 using Antmicro.Renode.Core; 15 16 namespace Antmicro.Renode.Peripherals.SD 17 { 18 public sealed class SDHCI : IBytePeripheral, IWordPeripheral, IDoubleWordPeripheral, IDisposable 19 { SDHCI( )20 public SDHCI(/*string fileName, int size, BusWidth bits = BusWidth.Bits32, bool nonPersistent = false*/) 21 { 22 } 23 ReadByte(long offset)24 public byte ReadByte(long offset) 25 { 26 this.LogUnhandledRead(offset); 27 return 0; 28 } 29 ReadWord(long offset)30 public ushort ReadWord(long offset) 31 { 32 this.LogUnhandledRead(offset); 33 return 0; 34 } 35 ReadDoubleWord(long offset)36 public uint ReadDoubleWord(long offset) 37 { 38 switch (offset) { 39 case 0x24: // SDHC_PRNSTS 40 this.Log(LogLevel.Warning, "Read from 0x24 - SDHC_PRNSTS"); 41 return 0xFFFFFFFF; 42 default: 43 this.LogUnhandledRead(offset); 44 break; 45 } 46 return 0; 47 } 48 WriteByte(long offset, byte value)49 public void WriteByte(long offset, byte value) 50 { 51 this.LogUnhandledWrite(offset, value); 52 } 53 WriteWord(long offset, ushort value)54 public void WriteWord(long offset, ushort value) 55 { 56 this.LogUnhandledWrite(offset, value); 57 } 58 WriteDoubleWord(long offset, uint value)59 public void WriteDoubleWord(long offset, uint value) 60 { 61 this.LogUnhandledWrite(offset, value); 62 } 63 Reset()64 public void Reset() 65 { 66 } 67 Dispose()68 public void Dispose() 69 { 70 } 71 72 } 73 } 74 75