Hello guys
I am writting an brand new class for keypad interrupt and I encountering several problem for my program and I dont understand what is the problem about, hope you guys can help me, here are some of my errors
 1) _row1trig.rise(&trigRow1); "no instance of overloaded function "mbed::InterruptIn::rise" matches the argument list" in file "/keypad.cpp", Line: 18, Col: 42
 2) I received some of the error saying that some of my variable (_cols, _row1Name etc etc) is not defined but however i had already defined it, so i not sure what is the problem
Here is my code, really hope you guys can help me thanks!
 
#include "keypad.h"
Keypad::Keypad(PinName col1, PinName col2, PinName col3, PinName col4,
       PinName row1, PinName row2, PinName row3, PinName row4):
  _row1(row1), _row2(row2), _row3(row3), _row4(row4), _cols(col1, col2, col3, col4),
  _row1trig(row1), _row2trig(row2), _row3trig(row3), _row4trig(row4),
 _row1Name(row1), _row2Name(row2), _row3Name(row3), _row4Name(row4)
{  
}
int Keypad::start()
{
      _cols = 0x0F;
  
  // Attach triggers
  _row1trig.rise(&trigRow1);   
  
  //"no instance of overloaded function "mbed::InterruptIn::rise" matches the argument list" in file "/keypad.cpp", Line: 18, Col: 42
  
  _row2trig.rise(&trigRow2);
  _row3trig.rise(&trigRow3);
  _row4trig.rise(&trigRow4);
}
    
int Keypad::stop()
{
  return 0;
}
void trigRow1()
{
  checkCol(_row1Name);
}
void trigRow2()
{
  checkCol(_row2Name);
}
void trigRow3()
{
  checkCol(_row3Name);
}
void trigRow4()
{
  checkCol(_row4Name);
}
void checkCol(char row){
  DigitalOut p(row);
  p = 0x1;
  _cols.input();
  unsigned char cols = _cols.read();
  if(cols) {
     cols = _lg2(cols);
    
}
char Keypad::getIndex()
{
  _index = keys(unsigned char row, unsigned char col);
}
 
                    
                 
                
            
Hello guys
I am writting an brand new class for keypad interrupt and I encountering several problem for my program and I dont understand what is the problem about, hope you guys can help me, here are some of my errors
1) _row1trig.rise(&trigRow1); "no instance of overloaded function "mbed::InterruptIn::rise" matches the argument list" in file "/keypad.cpp", Line: 18, Col: 42
2) I received some of the error saying that some of my variable (_cols, _row1Name etc etc) is not defined but however i had already defined it, so i not sure what is the problem
Here is my code, really hope you guys can help me thanks!
#include "keypad.h" Keypad::Keypad(PinName col1, PinName col2, PinName col3, PinName col4, PinName row1, PinName row2, PinName row3, PinName row4): _row1(row1), _row2(row2), _row3(row3), _row4(row4), _cols(col1, col2, col3, col4), _row1trig(row1), _row2trig(row2), _row3trig(row3), _row4trig(row4), _row1Name(row1), _row2Name(row2), _row3Name(row3), _row4Name(row4) { } int Keypad::start() { _cols = 0x0F; // Attach triggers _row1trig.rise(&trigRow1); //"no instance of overloaded function "mbed::InterruptIn::rise" matches the argument list" in file "/keypad.cpp", Line: 18, Col: 42 _row2trig.rise(&trigRow2); _row3trig.rise(&trigRow3); _row4trig.rise(&trigRow4); } int Keypad::stop() { return 0; } void trigRow1() { checkCol(_row1Name); } void trigRow2() { checkCol(_row2Name); } void trigRow3() { checkCol(_row3Name); } void trigRow4() { checkCol(_row4Name); } void checkCol(char row){ DigitalOut p(row); p = 0x1; _cols.input(); unsigned char cols = _cols.read(); if(cols) { cols = _lg2(cols); } char Keypad::getIndex() { _index = keys(unsigned char row, unsigned char col); }