Skip to content

Instantly share code, notes, and snippets.

⚾️
codeball

Jack Ch. ser-mk

⚾️
codeball
  • remotelabx
Block or report user

Report or block ser-mk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ser-mk
ser-mk / A.markdown
Created Feb 20, 2016 — forked from umpirsky/A.markdown
Sublime Text Monokai Sidebar Theme.
View A.markdown
@ser-mk
ser-mk / stm32f10x_i2c.c
Created Jan 11, 2019
example unsafe conversions of pointer in SPL
View stm32f10x_i2c.c
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;
@ser-mk
ser-mk / led.cpp
Last active Jan 13, 2019
C version of led blink
View led.cpp
// Step 1: Enable the clock to PORT B
RCC->APB2ENR |= RCC_APB2ENR_IOPCEN;
// Step 2: Change PB0's mode to 0x3 (output) and cfg to 0x0 (push-pull)
GPIOC->CRH = GPIO_CRH_MODE13_0 | GPIO_CRH_MODE13_1;
// Step 3: Set PB0 high
GPIOC->BSRR = GPIO_BSRR_BS13;
// Step 4: Reset PB0 low
@ser-mk
ser-mk / Memcheck_issue.c
Created Jan 13, 2019
issue of Memcheck
View Memcheck_issue.c
int * p = (int*)0x654;
*p = 0x123;
You can’t perform that action at this time.