modm API documentation

Classes

class  modm::Ft245< PORT, RD, WR, RXF, TXE >
 

Detailed Description

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;
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);
}
}
}