Created
May 10, 2014 18:19
-
-
Save ultramcu/e262a4cb1a5da180c5ad to your computer and use it in GitHub Desktop.
Arduino Pass by reference
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef struct | |
{ | |
int data; | |
}st_struct; | |
void my_fn(void *st) | |
{ | |
st_struct *s = (st_struct *)st; | |
... | |
} | |
void setup() | |
{ | |
... | |
} | |
void loop() | |
{ | |
... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "arduino_code_st.h" | |
void my_fn(st_struct *st) | |
{ | |
} | |
void setup() | |
{ | |
} | |
void loop() | |
{ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//File path ARDUINO_LIBRARY/arduino_code_st/arduino_code_st.h | |
typedef struct | |
{ | |
int data; | |
}st_struct; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment