Rename ARDUINO_MODE_PINS to MODE_PINS.

This commit is contained in:
Jonathan Naylor 2018-06-19 18:01:24 +01:00
parent ef32988827
commit 2098146af8
7 changed files with 10 additions and 10 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2015,2016,2017 by Jonathan Naylor G4KLX * Copyright (C) 2015,2016,2017,2018 by Jonathan Naylor G4KLX
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -39,7 +39,7 @@
// #define USE_COS_AS_LOCKOUT // #define USE_COS_AS_LOCKOUT
// Use pins to output the current mode // Use pins to output the current mode
// #define ARDUINO_MODE_PINS // #define MODE_PINS
// For the original Arduino Due pin layout // For the original Arduino Due pin layout
// #define ARDUINO_DUE_PAPA // #define ARDUINO_DUE_PAPA

6
IO.cpp
View File

@ -137,7 +137,7 @@ void CIO::selfTest()
// We exclude PTT to avoid trigger the transmitter // We exclude PTT to avoid trigger the transmitter
setLEDInt(ledValue); setLEDInt(ledValue);
setCOSInt(ledValue); setCOSInt(ledValue);
#if defined(ARDUINO_MODE_PINS) #if defined(MODE_PINS)
setDStarInt(ledValue); setDStarInt(ledValue);
setDMRInt(ledValue); setDMRInt(ledValue);
setYSFInt(ledValue); setYSFInt(ledValue);
@ -148,7 +148,7 @@ void CIO::selfTest()
delayInt(250); delayInt(250);
} }
#if defined(ARDUINO_MODE_PINS) #if defined(MODE_PINS)
setDStarInt(true); setDStarInt(true);
setDMRInt(false); setDMRInt(false);
setYSFInt(false); setYSFInt(false);
@ -546,7 +546,7 @@ void CIO::setADCDetection(bool detect)
void CIO::setMode() void CIO::setMode()
{ {
#if defined(ARDUINO_MODE_PINS) #if defined(MODE_PINS)
setDStarInt(m_modemState == STATE_DSTAR); setDStarInt(m_modemState == STATE_DSTAR);
setDMRInt(m_modemState == STATE_DMR); setDMRInt(m_modemState == STATE_DMR);
setYSFInt(m_modemState == STATE_YSF); setYSFInt(m_modemState == STATE_YSF);

View File

@ -92,7 +92,7 @@ void CIO::initInt()
pinMode(PIN_LED, OUTPUT); pinMode(PIN_LED, OUTPUT);
pinMode(PIN_COS, INPUT); pinMode(PIN_COS, INPUT);
#if defined(ARDUINO_MODE_PINS) #if defined(MODE_PINS)
// Set up the mode output pins // Set up the mode output pins
pinMode(PIN_DSTAR, OUTPUT); pinMode(PIN_DSTAR, OUTPUT);
pinMode(PIN_DMR, OUTPUT); pinMode(PIN_DMR, OUTPUT);

View File

@ -812,7 +812,7 @@ void CIO::initInt()
GPIO_InitStruct.GPIO_Mode = GPIO_Mode_IN; GPIO_InitStruct.GPIO_Mode = GPIO_Mode_IN;
GPIO_Init(PORT_COS, &GPIO_InitStruct); GPIO_Init(PORT_COS, &GPIO_InitStruct);
#if defined(ARDUINO_MODE_PINS) #if defined(MODE_PINS)
// DSTAR pin // DSTAR pin
RCC_AHB1PeriphClockCmd(RCC_Per_DSTAR, ENABLE); RCC_AHB1PeriphClockCmd(RCC_Per_DSTAR, ENABLE);
GPIO_InitStruct.GPIO_Pin = PIN_DSTAR; GPIO_InitStruct.GPIO_Pin = PIN_DSTAR;

View File

@ -62,7 +62,7 @@ void CIO::initInt()
pinMode(PIN_LED, OUTPUT); pinMode(PIN_LED, OUTPUT);
pinMode(PIN_COS, INPUT); pinMode(PIN_COS, INPUT);
#if defined(ARDUINO_MODE_PINS) #if defined(MODE_PINS)
// Set up the mode output pins // Set up the mode output pins
pinMode(PIN_DSTAR, OUTPUT); pinMode(PIN_DSTAR, OUTPUT);
pinMode(PIN_DMR, OUTPUT); pinMode(PIN_DMR, OUTPUT);

View File

@ -97,7 +97,7 @@
<Define name="STM32F446xx"/> <Define name="STM32F446xx"/>
<Define name="HSE_VALUE=12000000"/> <Define name="HSE_VALUE=12000000"/>
<Define name="STM32F4_PI"/> <Define name="STM32F4_PI"/>
<Define name="ARDUINO_MODE_PINS"/> <Define name="MODE_PINS"/>
</DefinedSymbols> </DefinedSymbols>
</Compile> </Compile>
<Link useDefault="0"> <Link useDefault="0">

View File

@ -83,7 +83,7 @@ EOF
"3") sed -e 's/\/\/ #define EXTERNAL_OSC 14400000/#define EXTERNAL_OSC 14400000/' $conf > $conf.tmp && mv -f $conf.tmp $conf && echo "14.400 MHz clock enabled";; "3") sed -e 's/\/\/ #define EXTERNAL_OSC 14400000/#define EXTERNAL_OSC 14400000/' $conf > $conf.tmp && mv -f $conf.tmp $conf && echo "14.400 MHz clock enabled";;
"4") sed -e 's/\/\/ #define EXTERNAL_OSC 19200000/#define EXTERNAL_OSC 19200000/' $conf > $conf.tmp && mv -f $conf.tmp $conf && echo "19.200 MHz clock enabled";; "4") sed -e 's/\/\/ #define EXTERNAL_OSC 19200000/#define EXTERNAL_OSC 19200000/' $conf > $conf.tmp && mv -f $conf.tmp $conf && echo "19.200 MHz clock enabled";;
"5") sed -e 's/\/\/ #define USE_COS_AS_LOCKOUT /#define USE_COS_AS_LOCKOUT/' $conf > $conf.tmp && mv -f $conf.tmp $conf && echo "COS as Lockout enabled";; "5") sed -e 's/\/\/ #define USE_COS_AS_LOCKOUT /#define USE_COS_AS_LOCKOUT/' $conf > $conf.tmp && mv -f $conf.tmp $conf && echo "COS as Lockout enabled";;
"6") sed -e 's/\/\/ #define ARDUINO_MODE_PINS/#define ARDUINO_MODE_PINS/' $conf > $conf.tmp && mv -f $conf.tmp $conf && echo "Mode pins enabled";; "6") sed -e 's/\/\/ #define MODE_PINS/#define MODE_PINS/' $conf > $conf.tmp && mv -f $conf.tmp $conf && echo "Mode pins enabled";;
"7") sed -e 's/\/\/ #define ARDUINO_DUE_PAPA/#define ARDUINO_DUE_PAPA/' $conf > $conf.tmp && mv -f $conf.tmp $conf && echo "Layout for the PAPA board enabled";; "7") sed -e 's/\/\/ #define ARDUINO_DUE_PAPA/#define ARDUINO_DUE_PAPA/' $conf > $conf.tmp && mv -f $conf.tmp $conf && echo "Layout for the PAPA board enabled";;
"8") sed -e 's/\/\/ #define ARDUINO_DUE_ZUM_V10/#define ARDUINO_DUE_ZUM_V10/' $conf > $conf.tmp && mv -f $conf.tmp $conf && echo "Layout for ZUM V1.0 and V1.0.1 boards enabled";; "8") sed -e 's/\/\/ #define ARDUINO_DUE_ZUM_V10/#define ARDUINO_DUE_ZUM_V10/' $conf > $conf.tmp && mv -f $conf.tmp $conf && echo "Layout for ZUM V1.0 and V1.0.1 boards enabled";;
"9") sed -e 's/\/\/ #define ARDUINO_DUE_NTH/#define ARDUINO_DUE_NTH/' $conf > $conf.tmp && mv -f $conf.tmp $conf && echo "Layout for SP8NTH board enabled";; "9") sed -e 's/\/\/ #define ARDUINO_DUE_NTH/#define ARDUINO_DUE_NTH/' $conf > $conf.tmp && mv -f $conf.tmp $conf && echo "Layout for SP8NTH board enabled";;