Skip to content

Conversation

@jgillick
Copy link

This PR adds bindings to the FT_GetModemStatus method as well as creates an event emitter that fires ever time any of the modem/line status values change.

I'm planning to use this in order to use the "input" serial wires -- like DCD -- as simple input indicators along-side serial communication.

Usage:

var device = new ftdi.FtdiDevice(0);
device.open({
  baudrate: 9600,
  databits: 8,
  stopbits: 1,
  parity: 'none'
}, (err) => {
  device.on('modemStatus', function (status) { 
    console.log(status);
  });
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants