added direction type for stm32f1xx compatibility