From 7434c2882085625b7fd3f8f92012c6e55f65f2b9 Mon Sep 17 00:00:00 2001 From: bsongis Date: Tue, 24 Jun 2014 11:09:19 +0200 Subject: [PATCH] Pulled from ersky9x --- radio/src/targets/sky9x/board_sky9x.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/radio/src/targets/sky9x/board_sky9x.cpp b/radio/src/targets/sky9x/board_sky9x.cpp index 481abe3f3..93d3fa4d7 100644 --- a/radio/src/targets/sky9x/board_sky9x.cpp +++ b/radio/src/targets/sky9x/board_sky9x.cpp @@ -475,11 +475,13 @@ void opentxBootloader(); // Need PA3 and PA4 set to peripheral A void i2cInit() { - register Pio *pioptr ; - register uint32_t timing ; + register Pio *pioptr; + register uint32_t timing; PMC->PMC_PCER0 |= 0x00080000L ; // Enable peripheral clock to TWI0 + TWI0->TWI_CR = TWI_CR_SWRST ; // Reset in case we are restarting + /* Configure PIO */ pioptr = PIOA ; pioptr->PIO_ABCDSR[0] &= ~0x00000018 ; // Peripheral A