ARMmbed

MODSERIAL attach problem! Help

Hello, I use the MODSERIAL library on KL25Z is when I want to attach a function, the compiler indicates the following error message: Error: No instance of overloaded function “AjK::MODSERIAL::attach” matches the argument list in “main.cpp”, Line: 23, Col: 15

Here is the code:

#include “mbed.h”
#include “MODSERIAL.h”

#define COM_SPEED_LONG 19200
#define COM_SPEED_SHORT 19200

MODSERIAL PC_Short(PTA2,PTA1);
MODSERIAL PC_Long(PTE0,PTE1);

void test()
{
int toto;
toto +=3;
}

int main()
{//main

PC_Long.baud (COM_SPEED_LONG);
PC_Short.baud (COM_SPEED_SHORT);
      
PC_Short.attach(& test, MODSERIAL::RxIrq);

while(true)
    {//lecture           

                   
    }//lecture     

}//main