Re: FreeBSD programming question

2003-08-14 Thread Michael Conlen
select() should work for you, similar to trigering an interrupt. Instead of triggering an ISR select() will sleep until there's an event on the file descriptors. So you open() the device for the serial port and select() on it. When you return from select() the return value will tell you why

FreeBSD programming question

2003-08-09 Thread J. Seth Henry
Not sure if this is the right list or not, but I could really use some pointers. How can I code trap serial port interrupts in my C program? For example, I want to read values from a serial device every user-specified number of seconds, calculate some stuff and then sit for a while. Should the

Re: FreeBSD programming question

2003-08-08 Thread J. Seth Henry
That looks exactly like what I want. I need to resume programming on either serial activity and at periodic intervals. Eventually, I plan to toss networking into the mix, and this program will function as a daemon, but I'm relatively new to programming for *nix (though not new to programming in

Re: FreeBSD programming question

2003-08-07 Thread J. Seth Henry
It appears that my experience on microcontrollers is throwing me off. I'm used to having a touch more control at the hardware level. It sounds like I would be best served by setting up a loop that sleeps for a certain number of milliseconds, and then looks for new data in the serial port buffers.

Re: FreeBSD programming question

2003-08-06 Thread Rui Lopes
On Ter, 2003-08-05 at 22:30, J. Seth Henry wrote: Not sure if this is the right list or not, but I could really use some pointers. How can I code trap serial port interrupts in my C program? You can't attach to interrupts in a userland program, but you can access serial ports by opening any

Re: FreeBSD programming question

2003-08-06 Thread Malcolm Kay
On Wed, 6 Aug 2003 07:00, J. Seth Henry wrote: Not sure if this is the right list or not, but I could really use some pointers. How can I code trap serial port interrupts in my C program? For any modern hosted system interrupt trapping and servicing is in the province of the system -- it