Created
January 11, 2019 13:58
-
-
Save ser-mk/67d6fe670c0dc7473707f75832b95669 to your computer and use it in GitHub Desktop.
example unsafe conversions of pointer in SPL
This file contains hidden or 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
FlagStatus I2C_GetFlagStatus(I2C_TypeDef* I2Cx, uint32_t I2C_FLAG) | |
{ | |
__IO uint32_t i2creg = 0, i2cxbase = 0; | |
…. | |
/* Get the I2Cx peripheral base address */ | |
i2cxbase = (uint32_t)I2Cx; | |
… |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment