Skip to content

Create new API functions for attachFunctionCallback() #11

@end2endzone

Description

@end2endzone
testarduino::reset(); //to reset to a known state all features. Call between each tests.

void log(const char * iValue, ...);
testarduino::detachAllInterrupts();
testarduino::setPinValue(const uint8_t & pin, const uint16_t & value);

typedef void (*Callback)();
testarduino::attachFunctionCallback(const char * name, Callback c);
testarduino::detachFunctionCallback(const char * name, Callback c);

struct Interrupt
{
  ISR _func;
  uint8_t mode; //CHANGE, FALLING, RISING
};

typedef std::vector<Interrupt> InterruptList;

//define PIN
struct PIN_REGISTRY
{
  uint16_t value; //10 bits to support analog values
  InterruptList interrupts;
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions