Dom > Novosti > Sadržaj

FTDI Izvor FT_Emu_main.cpp

May 08, 2019

#include "FT_Platform.h"


#ifdef MSVC_FT800EMU

#include

#include





extern "C" void setup ();

extern "C" void loop ();


ft_int32_t main (ft_int32_t argc, ft_char8_t * argv [])

{\ T

FT800EMU :: Parametri emulatoraParametri;

params.Setup = postavljanje;

params.Loop = petlja;

params.Flags =

FT800EMU :: EmulatorEnableKeyboard

| FT800EMU :: EmulatorEnableMouse

| FT800EMU :: EmulatorEnableAudio

| FT800EMU :: EmulatorEnableDebugShortkeys

| FT800EMU :: EmulatorEnableRegRotate

| FT800EMU :: EmulatorEnableCoprocessor

| FT800EMU :: EmulatorEnableGraphicsMultithread

| FT800EMU :: EmulatorEnableRegPwmDutyEmulation

#if definiran FT_801_ENABLE

| FT800EMU :: EmulatorFT801

#endif

;

FT800EMU :: Emulator.run (param);

//FT800EMU::SPII2C.end ();

}


void Ft_GpuEmu_SPII2C_begin ()

{\ T

FT800EMU :: SPII2C.begin ();

}


void Ft_GpuEmu_SPII2C_csLow ()

{\ T

FT800EMU :: SPII2C.csLow ();

}


void Ft_GpuEmu_SPII2C_csHigh ()

{\ T

FT800EMU :: SPII2C.csHigh ();

}


void Ft_GpuEmu_SPII2C_end ()

{\ T

FT800EMU :: SPII2C.end ();

}


uint8_t Ft_GpuEmu_SPII2C_transfer (podaci uint8_t)

{\ T

return FT800EMU :: SPII2C.transfer (data);

}



void Ft_GpuEmu_SPII2C_StartRead (uint32_t addr)

{\ T

Ft_GpuEmu_SPII2C_csLow ();

Ft_GpuEmu_SPII2C_transfer ((addr >> 16) & 0xFF);

Ft_GpuEmu_SPII2C_transfer ((addr >> 8) & 0xFF);

Ft_GpuEmu_SPII2C_transfer (addr & 0xFF);


Ft_GpuEmu_SPII2C_transfer (0); // Dummy Read Byte

}


void \ t

{\ T

Ft_GpuEmu_SPII2C_csLow ();

Ft_GpuEmu_SPII2C_transfer (((addr >> 16) & 0xFF) | 0x80);

Ft_GpuEmu_SPII2C_transfer ((addr >> 8) & 0xFF);

Ft_GpuEmu_SPII2C_transfer (addr & 0xFF);

}

#endif