Files
platformio-core/tests/ino2cpp/basic/basic.ino

48 lines
505 B
Arduino
Raw Normal View History

#define SQR(a) \
( a * a )
2016-08-31 01:26:08 +03:00
typedef struct Item item;
struct Item {
2016-08-31 00:16:23 +03:00
byte foo[50];
int bar;
2016-08-31 01:26:08 +03:00
void (*noob)(item*);
2016-08-31 00:16:23 +03:00
};
2016-08-31 01:26:08 +03:00
// test callback
class Foo {
public:
Foo(void (*function)()) {
#warning "Line number is 16"
}
bool childFunc() {
}
2016-08-31 01:26:08 +03:00
};
Foo foo(&fooCallback);
2016-08-31 01:26:08 +03:00
//
2016-08-31 01:26:08 +03:00
void setup() {
struct Item item1;
myFunction(&item1);
2016-08-31 00:16:23 +03:00
}
2016-08-31 00:16:23 +03:00
void loop() {
}
2016-08-31 01:26:08 +03:00
void myFunction(struct Item *item) {
}
#warning "Line number is 43"
2016-08-31 01:26:08 +03:00
void fooCallback(){
2016-08-31 00:16:23 +03:00
}