Skip to content

These module docs are in beta and may be incomplete.

modm:driver:ft245: FT245 USB FIFO

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 (1)
    {
        uint8_t c;
        if (myFt::read(c)) {
            myFt::write(c + 1);
        }
    }
}

Content

// Class
class modm::Ft245< typename PORT , typename RD , typename WR , typename RXF , typename TXE  >;

Dependencies

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