refactored how uart spi integrates with chibios