new hardware
This commit is contained in:
@@ -38,12 +38,22 @@
|
||||
|
||||
|
||||
#include "U8x8lib.h"
|
||||
|
||||
#ifdef ARDUINO
|
||||
|
||||
#ifdef U8X8_HAVE_HW_SPI
|
||||
#include <SPI.h>
|
||||
#endif
|
||||
|
||||
#ifdef U8X8_HAVE_HW_I2C
|
||||
#include <Wire.h>
|
||||
#endif
|
||||
# ifdef U8X8_HAVE_HW_I2C_TEENSY3
|
||||
# include <i2c_t3.h>
|
||||
# else
|
||||
# include <Wire.h>
|
||||
# endif
|
||||
#endif /* U8X8_HAVE_HW_I2C */
|
||||
|
||||
#endif /* ARDUINO */
|
||||
|
||||
|
||||
|
||||
@@ -72,6 +82,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)
|
||||
{
|
||||
@@ -1315,7 +1326,7 @@ extern "C" uint8_t u8x8_byte_arduino_hw_i2c(U8X8_UNUSED u8x8_t *u8x8, U8X8_UNUSE
|
||||
if ( u8x8->pins[U8X8_PIN_I2C_CLOCK] != U8X8_PIN_NONE && u8x8->pins[U8X8_PIN_I2C_DATA] != U8X8_PIN_NONE )
|
||||
{
|
||||
// second argument for the wire lib is the clock pin. In u8g2, the first argument of the clock pin in the clock/data pair
|
||||
Wire.begin(u8x8->pins[U8X8_PIN_I2C_DATA] , u8x8->pins[U8X8_PIN_I2C_CLOCK]);
|
||||
Wire.begin((int)u8x8->pins[U8X8_PIN_I2C_DATA] , u8x8->pins[U8X8_PIN_I2C_CLOCK]);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1638,6 +1649,7 @@ extern "C" uint8_t u8x8_byte_arduino_ks0108(u8x8_t *u8x8, uint8_t msg, uint8_t a
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /*ARDUINO*/
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user