Some common code primarily for projects based on stm32.