Last active
November 15, 2019 02:40
-
-
Save devyte/799c14d9dc5687d1eb722cde985d0269 to your computer and use it in GitHub Desktop.
i2c_slave.cpp
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
void SDAcallback(void) __attribute__((weak)); | |
void SDAcallback(void) | |
{ | |
//weak functiom, used only whwn pure-master case is used. When slave is linked in, this function | |
//gets replaced by a strong-attributed one that is empty. | |
//Master collision detection logic goes here | |
//... | |
} |
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
void SDAcallback(void) | |
{ | |
//strong function, empty of code | |
//replaces weak function in master to remove it for slave case. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment