Page 1 of 1

Interrupt handler in component

Posted: Wed Aug 07, 2019 10:30 pm
by mnf
A bug in 8.2

I tried to create a component that uses an interrupt handler. Unfortunately the name mangling used doesn't seem to apply to the macro called in the enable interrupt icon.

A simple example:
(7.48 KiB) Downloaded 31 times

Which creates a simple component with an Init macro.
(1.03 KiB) Downloaded 30 times

A program that attempts to use this:
(6.17 KiB) Downloaded 23 times

The C generated for the interrupt handler:

Code: Select all

void FCD_0ff51_int_bug1__interrupt_handler()
    //Local variable definitions

    // .n = 1
    FCL_N = 1;


& the interrupt setup using the wrong name is:

Code: Select all


Which gives compilation errors :-(

Is there a way around this - force FC to use a particular name etc ??


Re: Interrupt handler in component

Posted: Thu Aug 08, 2019 10:11 am
by Benj
Hi Martin,

Yes there is an event macro to allow you to add interrupt code inside a component. I'll send you a PM with an example.