A program that shows the use of $Sub$$ and $Super$$ to replace symbols at link time

Dependencies:   mbed

main.cpp

Committer:
chris
Date:
2012-09-20
Revision:
0:1ec2d1478b47

File content as of revision 0:1ec2d1478b47:

#include "mbed.h"
#include "function.h"

extern void $Super$$function(int i);

void $Sub$$function (int i) {
  DigitalOut led(LED3);
  led=i;
  wait(0.1);
  $Super$$function(i);
}

int main() {

    while(1) {
        function(1);
        wait(0.5);
        function(0);
        wait(0.5);
    }
}