LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Interrupt problem on WinSystems PC104 serial I/O code, CVI doesn't like "void interrupt (*old_isr)();"

Solved!
Go to solution

I am working on a WinSystems PC104 stack and need help with the serial I/O interrupt service routine for their COM8 module. WinSystems provided software for the board but LabWindows CVI doesn't like a statement in a structure in the COM8IO header file. The statement is:

 

void interrupt (*old_isr)();

 

The structure is:

 

struct com_port {

        unsigned open_flag;
        unsigned uart_base;
        unsigned int_num;
        long baud_rate;
        void interrupt (*old_isr)();
        int in_ptr;
        int out_ptr;
        int rx_fifo_count;
        unsigned rx_int_count;
        unsigned rx_char_count;
        int tx_head;
        int tx_tail;
        int tx_fifo_count;
        int tx_fifo_max;
        unsigned tx_int_count;
        unsigned tx_char_count;
        unsigned buff_cnt;
        char tx_buffer[BUFFER_SIZE];
        char buffer[BUFFER_SIZE];
        };

and CVI's error messages are:

 

 "COM8IO.H"(53,25)   syntax error; found '*' expecting ')'.
 "COM8IO.H"(53,36)   Illegal return type 'void function'.
 "COM8IO.H"(53,36)   Undefined size for field 'void function function'.

Any suggestions on how to get CVI to accept this statement or how I can modify it to get it to compile?

 

Thanks,

John

0 Kudos
Message 1 of 2
(2,623 Views)
Solution
Accepted by QuerulousJohn

It looks like you are trying to compile code written for MS-DOS, where interrupts are explicitly handled. That part of the code will have to be rewritten to work under Windows, possibly by using the CVI RS-232 library.

--
Martin
Certified CVI Developer
0 Kudos
Message 2 of 2
(2,616 Views)