opto_set_intrmask
int opto_set_intrmask (
int fd;
unsigned char* im;
);
|
Description
Applies a new interrupt mask. The new mask takes effect imediately.
Parameters
This function accepts the following parameters:
- fd is the device file descriptor obtained through the open(2) call.
- im is a pointer to an unsigned char which contains the new interrupt
mask. The bits 0-7 in the interrupt mask correspond to the
internal interrupt channels IN0-IN7. If a bit is set, the
corresponding interrupt channel will be enabled, otherwise it
will be disabled. Note that the hardware documentation states exactly the opposite.
Don't believe them, believe me.
Return Values
On success, the function will return 0. On failure, it will return
a non-null value, which is one of standard error codes.