|
diff -cdr nrf52840_dongle/Cargo.toml mdbt50q_rx/Cargo.toml |
|
*** nrf52840_dongle/Cargo.toml 2020-02-01 16:39:13.672443100 +0900 |
|
--- mdbt50q_rx/Cargo.toml 2020-02-01 18:55:28.513801800 +0900 |
|
*************** |
|
*** 1,5 **** |
|
[package] |
|
! name = "nrf52840_dongle" |
|
version = "0.1.0" |
|
authors = ["Tock Project Developers <[email protected]>"] |
|
build = "build.rs" |
|
--- 1,5 ---- |
|
[package] |
|
! name = "mdbt50q_rx" |
|
version = "0.1.0" |
|
authors = ["Tock Project Developers <[email protected]>"] |
|
build = "build.rs" |
|
diff -cdr nrf52840_dongle/Makefile mdbt50q_rx/Makefile |
|
*** nrf52840_dongle/Makefile 2020-02-01 16:39:13.672443100 +0900 |
|
--- mdbt50q_rx/Makefile 2020-02-01 20:06:12.820003600 +0900 |
|
*************** |
|
*** 2,8 **** |
|
|
|
TOCK_ARCH=cortex-m4 |
|
TARGET=thumbv7em-none-eabi |
|
! PLATFORM=nrf52840_dongle |
|
|
|
include ../../Makefile.common |
|
|
|
--- 2,8 ---- |
|
|
|
TOCK_ARCH=cortex-m4 |
|
TARGET=thumbv7em-none-eabi |
|
! PLATFORM=mdbt50q_rx |
|
|
|
include ../../Makefile.common |
|
|
|
diff -cdr nrf52840_dongle/src/main.rs mdbt50q_rx/src/main.rs |
|
*** nrf52840_dongle/src/main.rs 2020-02-01 16:47:02.612774800 +0900 |
|
--- mdbt50q_rx/src/main.rs 2020-02-01 19:56:05.774237300 +0900 |
|
*************** |
|
*** 14,32 **** |
|
use nrf52dk_base::{SpiPins, UartChannel, UartPins}; |
|
|
|
// The nRF52840 Dongle LEDs |
|
! const LED1_PIN: Pin = Pin::P0_06; |
|
! const LED2_R_PIN: Pin = Pin::P0_08; |
|
! const LED2_G_PIN: Pin = Pin::P1_09; |
|
! const LED2_B_PIN: Pin = Pin::P0_12; |
|
|
|
! // The nRF52840 Dongle button |
|
! const BUTTON_PIN: Pin = Pin::P1_06; |
|
const BUTTON_RST_PIN: Pin = Pin::P0_18; |
|
|
|
! const UART_RTS: Pin = Pin::P0_13; |
|
! const UART_TXD: Pin = Pin::P0_15; |
|
! const UART_CTS: Pin = Pin::P0_17; |
|
! const UART_RXD: Pin = Pin::P0_20; |
|
|
|
const SPI_MOSI: Pin = Pin::P1_01; |
|
const SPI_MISO: Pin = Pin::P1_02; |
|
--- 14,39 ---- |
|
use nrf52dk_base::{SpiPins, UartChannel, UartPins}; |
|
|
|
// The nRF52840 Dongle LEDs |
|
! const LED1_PIN: Pin = Pin::P1_13; // Pin::P0_06; |
|
! const LED2_PIN: Pin = Pin::P1_11; |
|
! const LED3_PIN: Pin = Pin::P1_12; // Dummy |
|
! // const LED2_R_PIN: Pin = Pin::P0_08; |
|
! // const LED2_G_PIN: Pin = Pin::P1_09; |
|
! // const LED2_B_PIN: Pin = Pin::P0_12; |
|
|
|
! // The MDBT50Q-RX Dongle button |
|
! const BUTTON_PIN: Pin = Pin::P0_15; // Pin::P1_06; |
|
const BUTTON_RST_PIN: Pin = Pin::P0_18; |
|
|
|
! const UART_RTS: Pin = Pin::P0_05; |
|
! const UART_TXD: Pin = Pin::P0_06; |
|
! const UART_CTS: Pin = Pin::P0_07; |
|
! const UART_RXD: Pin = Pin::P0_08; |
|
! |
|
! // const UART_RTS: Pin = Pin::P0_13; |
|
! // const UART_TXD: Pin = Pin::P0_15; |
|
! // const UART_CTS: Pin = Pin::P0_17; |
|
! // const UART_RXD: Pin = Pin::P0_20; |
|
|
|
const SPI_MOSI: Pin = Pin::P1_01; |
|
const SPI_MISO: Pin = Pin::P1_02; |
|
*************** |
|
*** 107,112 **** |
|
--- 114,128 ---- |
|
capsules::led::ActivationMode::ActiveLow |
|
), |
|
( |
|
+ &nrf52840::gpio::PORT[LED2_PIN], |
|
+ capsules::led::ActivationMode::ActiveLow |
|
+ ), |
|
+ ( |
|
+ &nrf52840::gpio::PORT[LED3_PIN], |
|
+ capsules::led::ActivationMode::ActiveLow |
|
+ ) |
|
+ /* |
|
+ ( |
|
&nrf52840::gpio::PORT[LED2_R_PIN], |
|
capsules::led::ActivationMode::ActiveLow |
|
), |
|
*************** |
|
*** 118,123 **** |
|
--- 134,140 ---- |
|
&nrf52840::gpio::PORT[LED2_B_PIN], |
|
capsules::led::ActivationMode::ActiveLow |
|
) |
|
+ */ |
|
)); |
|
let chip = static_init!(nrf52840::chip::Chip, nrf52840::chip::new()); |
|
|
|
*************** |
|
*** 126,134 **** |
|
BUTTON_RST_PIN, |
|
&nrf52840::gpio::PORT, |
|
gpio, |
|
! LED2_R_PIN, |
|
! LED2_G_PIN, |
|
! LED2_B_PIN, |
|
led, |
|
UartChannel::Pins(UartPins::new(UART_RTS, UART_TXD, UART_CTS, UART_RXD)), |
|
&SpiPins::new(SPI_MOSI, SPI_MISO, SPI_CLK), |
|
--- 143,151 ---- |
|
BUTTON_RST_PIN, |
|
&nrf52840::gpio::PORT, |
|
gpio, |
|
! LED1_PIN, // LED2_R_PIN, |
|
! LED2_PIN, // LED2_G_PIN, |
|
! LED3_PIN, // LED2_B_PIN, |
|
led, |
|
UartChannel::Pins(UartPins::new(UART_RTS, UART_TXD, UART_CTS, UART_RXD)), |
|
&SpiPins::new(SPI_MOSI, SPI_MISO, SPI_CLK), |