From 7329eca7bd1a955dfa911dd189fb0d2510b9fbb7 Mon Sep 17 00:00:00 2001 From: Rei Vilo Date: Wed, 6 Nov 2019 09:55:04 +0100 Subject: [PATCH 1/2] =?UTF-8?q?Issue=2035=20=E2=80=94=20Fix=20for=20SPI=5F?= =?UTF-8?q?MODE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cores/msp432r/ti/runtime/wiring/SPI.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cores/msp432r/ti/runtime/wiring/SPI.h b/cores/msp432r/ti/runtime/wiring/SPI.h index 3b388dfd..e581d5e8 100644 --- a/cores/msp432r/ti/runtime/wiring/SPI.h +++ b/cores/msp432r/ti/runtime/wiring/SPI.h @@ -38,10 +38,10 @@ #include #include -#define SPI_MODE0 SPI_POL0_PHA1 -#define SPI_MODE1 SPI_POL0_PHA0 -#define SPI_MODE2 SPI_POL0_PHA1 -#define SPI_MODE3 SPI_POL0_PHA0 +#define SPI_MODE0 SPI_POL0_PHA0 +#define SPI_MODE1 SPI_POL0_PHA1 +#define SPI_MODE2 SPI_POL0_PHA0 +#define SPI_MODE3 SPI_POL0_PHA1 #define MSBFIRST 1 #define LSBFIRST 0 From fa10b281d119126eab1a2ea3361e734ed1b1f8be Mon Sep 17 00:00:00 2001 From: Rei Vilo Date: Thu, 7 Nov 2019 17:00:32 +0100 Subject: [PATCH 2/2] SPI - Fixed polarity POL control --- cores/msp432r/ti/runtime/wiring/SPI.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cores/msp432r/ti/runtime/wiring/SPI.h b/cores/msp432r/ti/runtime/wiring/SPI.h index e581d5e8..59539ad2 100644 --- a/cores/msp432r/ti/runtime/wiring/SPI.h +++ b/cores/msp432r/ti/runtime/wiring/SPI.h @@ -40,8 +40,8 @@ #define SPI_MODE0 SPI_POL0_PHA0 #define SPI_MODE1 SPI_POL0_PHA1 -#define SPI_MODE2 SPI_POL0_PHA0 -#define SPI_MODE3 SPI_POL0_PHA1 +#define SPI_MODE2 SPI_POL1_PHA0 +#define SPI_MODE3 SPI_POL1_PHA1 #define MSBFIRST 1 #define LSBFIRST 0