Merge pull request #719 from keyboardio/avr-guard

Guard AVR-specific parts with ifdefs
device/normcore
Gergely Nagy 5 years ago committed by GitHub
commit 6e4fcaae24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -21,6 +21,8 @@
#pragma once
#ifdef __AVR__
#include "kaleidoscope/MatrixAddr.h"
#include "kaleidoscope_internal/deprecations.h"
@ -402,3 +404,5 @@ class Hardware {
/** @} */
};
}
#endif

@ -18,6 +18,8 @@
Modified 2012 by Todd Krein (todd@krein.org) to implement repeated starts
*/
#ifdef __AVR__
#define ENABLE_TWI_SLAVE_MODE 0
#include <math.h>
@ -559,3 +561,5 @@ ISR(TWI_vect) {
break;
}
}
#endif

@ -16,6 +16,8 @@
with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifdef __AVR__
#ifndef twi_h
#define twi_h
@ -51,3 +53,4 @@ void twi_stop(void);
void twi_releaseBus(void);
#endif
#endif

@ -17,7 +17,6 @@
#pragma once
#include <avr/wdt.h>
#include "kaleidoscope/driver/bootloader/Base.h"
namespace kaleidoscope {

@ -17,6 +17,8 @@
#pragma once
#ifdef __AVR__
#include "kaleidoscope/driver/storage/Base.h"
#include <EEPROM.h>
@ -57,3 +59,5 @@ class AVREEPROM : public kaleidoscope::driver::storage::Base<_StorageProps> {
}
}
}
#endif

@ -15,6 +15,7 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifdef __AVR__
#ifndef KALEIDOSCOPE_VIRTUAL_BUILD
#include <Kaleidoscope-FirmwareDump.h>
@ -72,3 +73,4 @@ EventHandlerResult FirmwareDump::onFocusEvent(const char *command) {
kaleidoscope::plugin::FirmwareDump FirmwareDump;
#endif
#endif

@ -21,6 +21,8 @@
#error "Firmware Dump is not available for virtual builds"
#else
#ifdef __AVR__
#include <Kaleidoscope.h>
namespace kaleidoscope {
@ -42,3 +44,4 @@ class FirmwareDump : public kaleidoscope::Plugin {
extern kaleidoscope::plugin::FirmwareDump FirmwareDump;
#endif
#endif

Loading…
Cancel
Save