small example with struct for multi params in callbacks
This commit is contained in:
		| @@ -16,6 +16,12 @@ | ||||
| #include "../middleware/blinker.h" | ||||
| #include "app.h" | ||||
|  | ||||
| typedef struct { | ||||
|         uint16_t timeOn; | ||||
|         uint16_t timeOff; | ||||
|         uint8_t n; | ||||
|     } foo; | ||||
|  | ||||
| typedef struct { | ||||
|     LED l1_; | ||||
|     LED l2_; | ||||
| @@ -36,7 +42,9 @@ typedef struct { | ||||
|     BLINKER blL_; | ||||
|     BLINKER blR_; | ||||
|     BLINKER blB_; | ||||
|     BLINKER blT_; | ||||
|     APP app_; | ||||
|     foo bar; | ||||
| } Factory; | ||||
|  | ||||
|  | ||||
| @@ -67,6 +75,7 @@ CLICK_HANDLER* ch3(); | ||||
| BLINKER* blL(); | ||||
| BLINKER* blR(); | ||||
| BLINKER* blB(); | ||||
| BLINKER* blT(); | ||||
|  | ||||
| APP* app(); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user