Merge pull request #1613 from wuhanstudio/unified-u8x8lib

Use Arduino functions only when #defined ARDUINO
This commit is contained in:
olikraus 2021-10-06 06:46:31 +02:00 committed by GitHub
commit 2746a5d163
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -38,12 +38,15 @@
#include "U8x8lib.h"
#ifdef ARDUINO
#ifdef U8X8_HAVE_HW_SPI
#include <SPI.h>
#endif
#ifdef U8X8_HAVE_HW_I2C
#include <Wire.h>
#endif
#endif
@ -72,6 +75,7 @@ size_t U8X8::write(uint8_t v)
/*=============================================*/
/*=== ARDUINO GPIO & DELAY ===*/
#ifdef ARDUINO
#ifdef U8X8_USE_PINS
extern "C" uint8_t u8x8_gpio_and_delay_arduino(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, U8X8_UNUSED void *arg_ptr)
{
@ -1638,6 +1642,7 @@ extern "C" uint8_t u8x8_byte_arduino_ks0108(u8x8_t *u8x8, uint8_t msg, uint8_t a
}
#endif
#endif /*ARDUINO*/