Skip to content

FT_W32_WriteFile ? #9

@evantahler

Description

@evantahler

I have this old C++ Code which I am trying bring over to JS:

while (!Terminated) {

        FT_W32_SetCommBreak(ftHandle);
        FT_W32_ClearCommBreak(ftHandle);


        FT_W32_WriteFile(ftHandle, &StartCode, 1, &bytesWritten, NULL);
        FT_W32_WriteFile(ftHandle, DMXData, 512, &bytesWritten, NULL);

        Sleep(inter_frame_delay);
        NbFramesSent++;
    }

This code is to talk to a DMX lighting controller, which simply does:

  • set the breaks
  • write the start code (0)
  • write an array of 512 integers
  • sleep for 20ms
  • loop.

What would the equivalent methods to FT_W32_SetCommBreak and FT_W32_ClearCommBreak be in this library? Are they handled for you by the write method?

The whole example C++ lib can be found here http://www.enttec.com/index.php?main_menu=Products&pn=70303

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions