Skip to content

Commit

Permalink
Merge pull request #31 from darkxst/mgm240p
Browse files Browse the repository at this point in the history
Support Sparkfun Things Plus Matter MGM240p
  • Loading branch information
darkxst authored Jan 7, 2024
2 parents e3a8e4f + d3a4969 commit 909d8cc
Show file tree
Hide file tree
Showing 12 changed files with 1,549 additions and 0 deletions.
38 changes: 38 additions & 0 deletions EmberZNet/MGM240P/0001-config-configure-usart-vcom-B1B0-D3D4.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
--- a/config/sl_iostream_usart_vcom_config.h 2023-03-14 15:14:40.895685292 +0100
+++ b/config/sl_iostream_usart_vcom_config.h 2023-03-14 15:32:20.543280395 +0100
@@ -84,21 +84,24 @@
// <<< sl:start pin_tool >>>
// <usart signal=TX,RX,(CTS),(RTS)> SL_IOSTREAM_USART_VCOM
// $[USART_SL_IOSTREAM_USART_VCOM]
-#warning "IO Stream USART peripheral not configured"
-// #define SL_IOSTREAM_USART_VCOM_PERIPHERAL USART0
-// #define SL_IOSTREAM_USART_VCOM_PERIPHERAL_NO 0
+#define SL_IOSTREAM_USART_VCOM_PERIPHERAL USART0
+#define SL_IOSTREAM_USART_VCOM_PERIPHERAL_NO 0

-// #define SL_IOSTREAM_USART_VCOM_TX_PORT gpioPortC
-// #define SL_IOSTREAM_USART_VCOM_TX_PIN 11
+// USART0 TX on PB01
+#define SL_IOSTREAM_USART_VCOM_TX_PORT gpioPortA
+#define SL_IOSTREAM_USART_VCOM_TX_PIN 5

-// #define SL_IOSTREAM_USART_VCOM_RX_PORT gpioPortC
-// #define SL_IOSTREAM_USART_VCOM_RX_PIN 10
+// USART0 RX on PB00
+#define SL_IOSTREAM_USART_VCOM_RX_PORT gpioPortA
+#define SL_IOSTREAM_USART_VCOM_RX_PIN 6

-// #define SL_IOSTREAM_USART_VCOM_CTS_PORT gpioPortA
-// #define SL_IOSTREAM_USART_VCOM_CTS_PIN 12
+// USART0 CTS on PD03
+//#define SL_IOSTREAM_USART_VCOM_CTS_PORT gpioPortB
+//#define SL_IOSTREAM_USART_VCOM_CTS_PIN 1

-// #define SL_IOSTREAM_USART_VCOM_RTS_PORT gpioPortC
-// #define SL_IOSTREAM_USART_VCOM_RTS_PIN 8
+// USART0 RTS on PD04
+//#define SL_IOSTREAM_USART_VCOM_RTS_PORT gpioPortB
+//#define SL_IOSTREAM_USART_VCOM_RTS_PIN 0
// [USART_SL_IOSTREAM_USART_VCOM]$
// <<< sl:end pin_tool >>>

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
--- a/config/sl_uartdrv_usart_vcom_config.h 2023-03-16 01:55:55.270307126 +0100
+++ b/config/sl_uartdrv_usart_vcom_config.h 2023-03-16 02:00:15.095622384 +0100
@@ -76,21 +76,21 @@
// <<< sl:start pin_tool >>>
// <usart signal=TX,RX,(CTS),(RTS)> SL_UARTDRV_USART_VCOM
// $[USART_SL_UARTDRV_USART_VCOM]
-#warning "UARTDRV USART peripheral not configured"
-// #define SL_UARTDRV_USART_VCOM_PERIPHERAL USART0
-// #define SL_UARTDRV_USART_VCOM_PERIPHERAL_NO 0
+// #warning "UARTDRV USART peripheral not configured"
+#define SL_UARTDRV_USART_VCOM_PERIPHERAL USART0
+#define SL_UARTDRV_USART_VCOM_PERIPHERAL_NO 0

-// #define SL_UARTDRV_USART_VCOM_TX_PORT gpioPortA
-// #define SL_UARTDRV_USART_VCOM_TX_PIN 0
+#define SL_UARTDRV_USART_VCOM_TX_PORT gpioPortA
+#define SL_UARTDRV_USART_VCOM_TX_PIN 5

-// #define SL_UARTDRV_USART_VCOM_RX_PORT gpioPortA
-// #define SL_UARTDRV_USART_VCOM_RX_PIN 1
+#define SL_UARTDRV_USART_VCOM_RX_PORT gpioPortA
+#define SL_UARTDRV_USART_VCOM_RX_PIN 6

-// #define SL_UARTDRV_USART_VCOM_CTS_PORT gpioPortA
-// #define SL_UARTDRV_USART_VCOM_CTS_PIN 2
+//#define SL_UARTDRV_USART_VCOM_CTS_PORT gpioPortB
+//#define SL_UARTDRV_USART_VCOM_CTS_PIN 1

-// #define SL_UARTDRV_USART_VCOM_RTS_PORT gpioPortA
-// #define SL_UARTDRV_USART_VCOM_RTS_PIN 3
+//#define SL_UARTDRV_USART_VCOM_RTS_PORT gpioPortB
+//#define SL_UARTDRV_USART_VCOM_RTS_PIN 0
// [USART_SL_UARTDRV_USART_VCOM]$
// <<< sl:end pin_tool >>>

Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
From 937b868877e963b1f66451b6109bf788f8c17dbd Mon Sep 17 00:00:00 2001
From: Tim Lunn <[email protected]>
Date: Thu, 28 Dec 2023 18:33:50 +1100
Subject: [PATCH] config: configure cpc usart vcom B1B0

---
config/sl_cpc_drv_uart_usart_vcom_config.h | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/config/sl_cpc_drv_uart_usart_vcom_config.h b/config/sl_cpc_drv_uart_usart_vcom_config.h
index dbce4ed..f100f68 100644
--- a/config/sl_cpc_drv_uart_usart_vcom_config.h
+++ b/config/sl_cpc_drv_uart_usart_vcom_config.h
@@ -59,15 +59,15 @@
// <<< sl:start pin_tool >>>
// <usart signal=TX,RX,(CTS),(RTS)> SL_CPC_DRV_UART_VCOM
// $[USART_SL_CPC_DRV_UART_VCOM]
-#warning "CPC USART peripheral not configured"
-// #define SL_CPC_DRV_UART_VCOM_PERIPHERAL USART0
-// #define SL_CPC_DRV_UART_VCOM_PERIPHERAL_NO 0
-//
-// #define SL_CPC_DRV_UART_VCOM_TX_PORT gpioPortD
-// #define SL_CPC_DRV_UART_VCOM_TX_PIN 13
-//
-// #define SL_CPC_DRV_UART_VCOM_RX_PORT gpioPortD
-// #define SL_CPC_DRV_UART_VCOM_RX_PIN 14
+
+#define SL_CPC_DRV_UART_VCOM_PERIPHERAL USART0
+#define SL_CPC_DRV_UART_VCOM_PERIPHERAL_NO 0
+
+#define SL_CPC_DRV_UART_VCOM_TX_PORT gpioPortA
+#define SL_CPC_DRV_UART_VCOM_TX_PIN 5
+
+#define SL_CPC_DRV_UART_VCOM_RX_PORT gpioPortA
+#define SL_CPC_DRV_UART_VCOM_RX_PIN 6
//
// #define SL_CPC_DRV_UART_VCOM_CTS_PORT gpioPortD
// #define SL_CPC_DRV_UART_VCOM_CTS_PIN 13
--
2.40.1

Loading

0 comments on commit 909d8cc

Please sign in to comment.