Skip to content

Instantly share code, notes, and snippets.

@ser-mk
Created January 11, 2019 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ser-mk/67d6fe670c0dc7473707f75832b95669 to your computer and use it in GitHub Desktop.
Save ser-mk/67d6fe670c0dc7473707f75832b95669 to your computer and use it in GitHub Desktop.
example unsafe conversions of pointer in SPL
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