With my embedded Cosmic C compiler, interrupt functions are preceded by @interrupt. With this prefix, UEStudio does not show these functions in the function list. I attempted to modify the wordfile adding "@" to the regular expressions like so:
I'm not great with regular expressions and would appreciate any help.
Below is my function used for receiving messages from a data bus and placing them in a queue. Normal program execution is interrupted when a message is received by the hardware buffer and calls this function.
Thanks!
Code: Select all
/Function String = "%^([@_a-zA-Z_0-9^[^]*]+^)[ ^t]+([^p*&:, ^t^[^]a-zA-Z_0-9.!]++)[~;]"
/Function String 1 = "%[@_a-zA-Z_0-9*]*::^([a-zA-Z_0-9^~]+^)[ ^t^p]++([^p*&:, ^t^[^]/*^-'=:&a-zA-Z_0-9./(!]++)[~;]"
/Function String 2 = "%[@_a-zA-Z_0-9][a-zA-Z_0-9^[^]]+[ ^t*]+^([a-zA-Z_0-9]+^)[ ^t]++([^p*&:, ^t^[^]a-zA-Z_0-9./(!]++)[~;]"
/Function String 3 = "%[@_a-zA-Z_0-9*&$^[^]*]+[ ^t]+[a-zA-Z_0-9*&$^[^]]+[ ^t*]+^([a-zA-Z_0-9]+^)[ ^t]++([^p*&:, ^t^[^]a-zA-Z_0-9./(!]++)[~;]"
/Function String 4 = "%[@_a-z_0-9^[^]*]++ [a-z_0-9*^[^]]+[ ^t]++[a-z_0-9*^[^]]+[ ^t]++^([*a-z_0-9]+^)[ ^t]++([^p*&:, ^t^[^]a-z_0-9./(!]++)[~;]"
/Function String 5 = "%^([@_a-zA-Z_0-9^[^]*]+^)[ ^t]++([^p*&:, ^t^[^]a-zA-Z_0-9./()!]++)[~;]"
Below is my function used for receiving messages from a data bus and placing them in a queue. Normal program execution is interrupted when a message is received by the hardware buffer and calls this function.
Code: Select all
@interrupt void can_rx(void)
{
volatile unsigned char received_length;
volatile unsigned char count;
if (QUEUE_RX.q_count >= MAXQUEUE)
{
goto end; //Queue is full
}
else
{
QUEUE_RX.q_count++;
QUEUE_RX.q_rear = (QUEUE_RX.q_rear + 1) % MAXQUEUE;
QUEUE_RX.Store_RX[QUEUE_RX.q_rear].IDR0 = CANRXFG[0];
QUEUE_RX.Store_RX[QUEUE_RX.q_rear].IDR1 = CANRXFG[1];
QUEUE_RX.Store_RX[QUEUE_RX.q_rear].IDR2 = CANRXFG[2];
QUEUE_RX.Store_RX[QUEUE_RX.q_rear].IDR3 = CANRXFG[3];
QUEUE_RX.Store_RX[QUEUE_RX.q_rear].DLC = (CANRXFG[12] & 0x0f); // Lower nibble
received_length = (QUEUE_RX.Store_RX[QUEUE_RX.q_rear].DLC);
for (count = 0; count < received_length; count++)
{
QUEUE_RX.Store_RX[QUEUE_RX.q_rear].Data[count] = CANRXFG[count+4];
}
}
end:
CANRFLG = CANRFLG | 0x01;
}