mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-24 08:36:14 +01:00
Compare commits
2 Commits
d74d2ceff0
...
add9f25d20
Author | SHA1 | Date | |
---|---|---|---|
|
add9f25d20 | ||
|
753567427e |
|
@ -50,11 +50,16 @@ HardwareSerial Serial6(PA12, PA11); // Rx=PA12, Tx=PA11 -- CN10 pins 12 and 14
|
||||||
// via the debugger on the Nucleo-64. It is therefore unavailable for other DCC-EX uses like WiFi, DFPlayer, etc.
|
// via the debugger on the Nucleo-64. It is therefore unavailable for other DCC-EX uses like WiFi, DFPlayer, etc.
|
||||||
// On the F446RE, Serial3 and Serial5 are easy to use:
|
// On the F446RE, Serial3 and Serial5 are easy to use:
|
||||||
HardwareSerial Serial3(PC11, PC10); // Rx=PC11, Tx=PC10 -- USART3 - F446RE
|
HardwareSerial Serial3(PC11, PC10); // Rx=PC11, Tx=PC10 -- USART3 - F446RE
|
||||||
HardwareSerial Serial5(PD2, PC12); // Rx=PC7, Tx=PC6 -- UART5 - F446RE
|
HardwareSerial Serial5(PD2, PC12); // Rx=PD2, Tx=PC12 -- UART5 - F446RE
|
||||||
// On the F446RE, Serial4 and Serial6 also use pins we can't readily map while using the Arduino pins
|
// On the F446RE, Serial4 and Serial6 also use pins we can't readily map while using the Arduino pins
|
||||||
#elif defined(ARDUINO_NUCLEO_F412ZG) || defined(ARDUINO_NUCLEO_F413ZH) || defined(ARDUINO_NUCLEO_F429ZI) || defined(ARDUINO_NUCLEO_F446ZE)
|
#elif defined(ARDUINO_NUCLEO_F412ZG) || defined(ARDUINO_NUCLEO_F413ZH) || defined(ARDUINO_NUCLEO_F446ZE) || \
|
||||||
|
defined(ARDUINO_NUCLEO_F429ZI) || defined(ARDUINO_NUCLEO_F439ZI)
|
||||||
// Nucleo-144 boards don't have Serial1 defined by default
|
// Nucleo-144 boards don't have Serial1 defined by default
|
||||||
HardwareSerial Serial6(PG9, PG14); // Rx=PG9, Tx=PG14 -- USART6
|
HardwareSerial Serial6(PG9, PG14); // Rx=PG9, Tx=PG14 -- USART6
|
||||||
|
HardwareSerial Serial5(PD2, PC12); // Rx=PD2, Tx=PC12 -- UART5
|
||||||
|
#if !defined(ARDUINO_NUCLEO_F412ZG)
|
||||||
|
HardwareSerial Serial2(PD6, PD5); // Rx=PD6, Tx=PD5 -- UART5
|
||||||
|
#endif
|
||||||
// Serial3 is defined to use USART3 by default, but is in fact used as the diag console
|
// Serial3 is defined to use USART3 by default, but is in fact used as the diag console
|
||||||
// via the debugger on the Nucleo-144. It is therefore unavailable for other DCC-EX uses like WiFi, DFPlayer, etc.
|
// via the debugger on the Nucleo-144. It is therefore unavailable for other DCC-EX uses like WiFi, DFPlayer, etc.
|
||||||
#else
|
#else
|
||||||
|
@ -215,9 +220,9 @@ void DCCTimer::clearPWM() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void DCCTimer::getSimulatedMacAddress(byte mac[6]) {
|
void DCCTimer::getSimulatedMacAddress(byte mac[6]) {
|
||||||
volatile uint32_t *serno1 = (volatile uint32_t *)0x1FFF7A10;
|
volatile uint32_t *serno1 = (volatile uint32_t *)UID_BASE;
|
||||||
volatile uint32_t *serno2 = (volatile uint32_t *)0x1FFF7A14;
|
volatile uint32_t *serno2 = (volatile uint32_t *)UID_BASE+4;
|
||||||
// volatile uint32_t *serno3 = (volatile uint32_t *)0x1FFF7A18;
|
// volatile uint32_t *serno3 = (volatile uint32_t *)UID_BASE+8;
|
||||||
|
|
||||||
volatile uint32_t m1 = *serno1;
|
volatile uint32_t m1 = *serno1;
|
||||||
volatile uint32_t m2 = *serno2;
|
volatile uint32_t m2 = *serno2;
|
||||||
|
|
|
@ -163,7 +163,9 @@ bool WifiESP::setup(const char *SSid,
|
||||||
delay(500);
|
delay(500);
|
||||||
}
|
}
|
||||||
if (WiFi.status() == WL_CONNECTED) {
|
if (WiFi.status() == WL_CONNECTED) {
|
||||||
DIAG(F("Wifi STA IP %s"),WiFi.localIP().toString().c_str());
|
// DIAG(F("Wifi STA IP %s"),WiFi.localIP().toString().c_str());
|
||||||
|
DIAG(F("Wifi in STA mode"));
|
||||||
|
LCD(7, F("IP: %s"), WiFi.softAPIP().toString().c_str());
|
||||||
wifiUp = true;
|
wifiUp = true;
|
||||||
} else {
|
} else {
|
||||||
DIAG(F("Could not connect to Wifi SSID %s"),SSid);
|
DIAG(F("Could not connect to Wifi SSID %s"),SSid);
|
||||||
|
@ -209,8 +211,12 @@ bool WifiESP::setup(const char *SSid,
|
||||||
if (WiFi.softAP(strSSID.c_str(),
|
if (WiFi.softAP(strSSID.c_str(),
|
||||||
havePassword ? password : strPass.c_str(),
|
havePassword ? password : strPass.c_str(),
|
||||||
channel, false, 8)) {
|
channel, false, 8)) {
|
||||||
DIAG(F("Wifi AP SSID %s PASS %s"),strSSID.c_str(),havePassword ? password : strPass.c_str());
|
// DIAG(F("Wifi AP SSID %s PASS %s"),strSSID.c_str(),havePassword ? password : strPass.c_str());
|
||||||
DIAG(F("Wifi AP IP %s"),WiFi.softAPIP().toString().c_str());
|
DIAG(F("Wifi in AP mode"));
|
||||||
|
LCD(5, F("Wifi: %s"), strSSID.c_str());
|
||||||
|
LCD(6, F("PASS: %s"),havePassword ? password : strPass.c_str());
|
||||||
|
// DIAG(F("Wifi AP IP %s"),WiFi.softAPIP().toString().c_str());
|
||||||
|
LCD(7, F("IP: %s"),WiFi.softAPIP().toString().c_str());
|
||||||
wifiUp = true;
|
wifiUp = true;
|
||||||
APmode = true;
|
APmode = true;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -3,7 +3,10 @@
|
||||||
|
|
||||||
#include "StringFormatter.h"
|
#include "StringFormatter.h"
|
||||||
|
|
||||||
#define VERSION "5.2.11"
|
#define VERSION "5.2.12"
|
||||||
|
// 5.2.12 - ESP32 add AP mode LCD messages with SSID/PW for
|
||||||
|
// - STM32 change to UID_BASE constants in DCCTimerSTM32 rather than raw hex addresses for UID registers
|
||||||
|
// - STM32 extra UART/USARTs for larger Nucleo models
|
||||||
// 5.2.11 - Change from TrackManager::returnMode to TrackManager::getMode
|
// 5.2.11 - Change from TrackManager::returnMode to TrackManager::getMode
|
||||||
// 5.2.10 - Include trainbrains.eu block unoccupancy driver
|
// 5.2.10 - Include trainbrains.eu block unoccupancy driver
|
||||||
// - include IO_PCA9555
|
// - include IO_PCA9555
|
||||||
|
|
Loading…
Reference in New Issue
Block a user