Skip to content

FT245 USB FIFO

lbuild module: modm:driver:ft245

The FT245R USB FIFO from Future Technology Devices International is a single chip USB to parallel FIFO bidirectional data transfer interface.

Wr and Rd must be GpioOutputs and set to output mode before. Rxf and Txe must be GpioInputs. Port is switched between input and output mode.

Example

#include <modm/architecture.hpp>
#include <modm/driver/usb/ft245.hpp>
using namespace modm::platform;

using myPort = GpioPort<GpioD0, 8>;
using Rxf    = GpioInputC11;
using Txe    = GpioInputC10;
using Rd     = GpioOutputA15;
using Wr     = GpioOutputA9;

using myFt = modm::Ft245<myPort, Rd, Wr, Rxf, Txe>;

int
main()
{
    Rd::setOutput(modm::Gpio::High);
    Wr::setOutput(modm::Gpio::Low);

    while (true)
    {
        uint8_t c;
        if (myFt::read(c)) {
            myFt::write(c + 1);
        }
    }
}

Dependencies

modm:driver:ft245 modm_driver_ft245 modm: driver: ft245 modm_architecture_gpio modm: architecture: gpio modm_driver_ft245->modm_architecture_gpio