[l1-flash/eeprom] Add lock/unlock/eeprom helper routines
stm32: timers: Fix edge polarity setup

The CCxP/CCxNP bits are actually separated by a reserved bit, so the
correct mask is 0xa, (0b1010) not 0x6 (0b0110)

Reported by PyroDevil on the mailinglist