I’m not that familiar with the FDTI library, but it looks like you’ll need to write some platform-specific code (the PDF describes windows and linux code, not sure if the linux code is also supposed to work on OSX). So you’d use `ccall` to set up the handle as per the FTDI docs. One tricky bit is that it looks like the event can get signaled from a separate thread. Julia code should not in general get called from a separate thread.
Check out the manual: http://julia.readthedocs.org/en/latest/manual/calling-c-and-fortran-code/ <http://julia.readthedocs.org/en/latest/manual/calling-c-and-fortran-code/>, specifically the part about SingleAsyncWork, which is the mechanism for waking up a waiting Julia Task from a different thread. I have a use case for SingleAsyncWork that I’ll be digging into soon, so I’m hoping to add a more concrete example to the docs for it and hopefully make it a little easier to make use of it. -s > On Sep 27, 2015, at 12:36 PM, Chris Stook <chris.st...@gmail.com> wrote: > > I am wrapping this c library: > > http://www.ftdichip.com/Support/Documents/ProgramGuides/D2XX_Programmer's_Guide(FT_000071).pdf > > <http://www.ftdichip.com/Support/Documents/ProgramGuides/D2XX_Programmer's_Guide(FT_000071).pdf> > > The function FT_SetEventNotification requires passing a handle to an event. > The closest thing I see in julia is a Condition(). Would it make sense to > pass a pointer to a condition to this function? What is the proper way to > handle this? > > Thanks, > Chris >