1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-26 17:46:14 +01:00

use pragma GCC push and pop correctly

This commit is contained in:
Harald Barth 2022-07-26 12:18:33 +02:00
parent ee639de5d6
commit 0373f060fb
2 changed files with 4 additions and 4 deletions

View File

@ -92,7 +92,7 @@ void DCCWaveform::interruptHandler() {
else DCCACK::checkAck(progTrack.sentResetsSincePacket); else DCCACK::checkAck(progTrack.sentResetsSincePacket);
} }
#pragma GCC push_options #pragma GCC pop_options
// An instance of this class handles the DCC transmissions for one track. (main or prog) // An instance of this class handles the DCC transmissions for one track. (main or prog)
// Interrupts are marshalled via the statics. // Interrupts are marshalled via the statics.
@ -115,7 +115,7 @@ DCCWaveform::DCCWaveform( byte preambleBits, bool isMain) {
#pragma GCC push_options
#pragma GCC optimize ("-O3") #pragma GCC optimize ("-O3")
void DCCWaveform::interrupt2() { void DCCWaveform::interrupt2() {
// calculate the next bit to be sent: // calculate the next bit to be sent:
@ -172,6 +172,7 @@ void DCCWaveform::interrupt2() {
} }
} }
} }
#pragma GCC pop_options
// Wait until there is no packet pending, then make this pending // Wait until there is no packet pending, then make this pending
void DCCWaveform::schedulePacket(const byte buffer[], byte byteCount, byte repeats) { void DCCWaveform::schedulePacket(const byte buffer[], byte byteCount, byte repeats) {
@ -190,4 +191,4 @@ void DCCWaveform::schedulePacket(const byte buffer[], byte byteCount, byte repea
packetPending = true; packetPending = true;
sentResetsSincePacket=0; sentResetsSincePacket=0;
} }
#endif #endif

View File

@ -25,7 +25,6 @@
#ifndef DEFINES_H #ifndef DEFINES_H
#define DEFINES_H #define DEFINES_H
// defines.h relies on macros defined in config.h // defines.h relies on macros defined in config.h
// but it may have already been included (for cosmetic convenence) by the .ino // but it may have already been included (for cosmetic convenence) by the .ino
#ifndef MOTOR_SHIELD_TYPE #ifndef MOTOR_SHIELD_TYPE