Skip to content

Commit

Permalink
Version 0.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Dec 27, 2023
1 parent c1ec1a4 commit e258d50
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"type": "git",
"url": "https://github.com/MarlinFirmware/U8glib-HAL.git"
},
"version": "0.5.2",
"version": "0.5.3",
"authors":
[
{
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=U8glib-HAL
version=0.5.2
version=0.5.3
author=Scott Lahteine <u8glib@thinkyhead.com>
maintainer=Scott Lahteine <u8glib@thinkyhead.com>
sentence=A library supporting monochrome TFTs and OLEDs, specifically for use with Marlin Firmware.
Expand Down
2 changes: 1 addition & 1 deletion src/clib/u8g_com_arduino_hw_usart_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

#ifdef ARDUINO

#ifdef __AVR_ATmega32U4__
#ifdef __AVR_ATmega32U4__

#include <avr/interrupt.h>
#include <avr/io.h>
Expand Down
2 changes: 1 addition & 1 deletion src/clib/u8g_com_esp32_ssd_i2c_fn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#ifdef ARDUINO_ARCH_ESP32

#include "u8g.h"
#include "Wire.h"
#include <Wire.h>

/**
* BUFFER_LENGTH is defined in libraries\Wire\utility\WireBase.h
Expand Down
2 changes: 1 addition & 1 deletion src/clib/u8g_com_samd51_hw_spi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#ifdef __SAMD51__

#include "u8g.h"
#include "SPI.h"
#include <SPI.h>

static SPISettings lcdSPIConfig;

Expand Down
2 changes: 1 addition & 1 deletion src/clib/u8g_com_samd51_st7920_hw_spi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#ifdef __SAMD51__

#include "u8g.h"
#include "SPI.h"
#include <SPI.h>

static SPISettings lcdSPIConfig;

Expand Down
11 changes: 4 additions & 7 deletions src/clib/u8g_com_stm32duino_hw_spi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,19 @@
#ifdef ARDUINO_ARCH_STM32

#include "u8g.h"
#include "SPI.h"
#include <SPI.h>

static SPISettings spiConfig;
static uint8_t msgInitCount = 2; // Ignore all messages until 2nd U8G_COM_MSG_INIT


uint8_t u8g_com_stm32duino_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr)
{
uint8_t u8g_com_stm32duino_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) {
if (msgInitCount) {
if (msg == U8G_COM_MSG_INIT) msgInitCount --;
if (msgInitCount) return -1;
}

switch(msg)
{
switch(msg) {
case U8G_COM_MSG_STOP:
break;
case U8G_COM_MSG_INIT:
Expand All @@ -30,7 +28,7 @@ uint8_t u8g_com_stm32duino_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, v
u8g_SetPIOutput(u8g, U8G_PI_RESET);

u8g_SetPILevel(u8g, U8G_PI_CS, 1);

spiConfig = SPISettings(2500000, MSBFIRST, SPI_MODE0); // 2.5 Mbits base clock
SPI.begin();
break;
Expand Down Expand Up @@ -71,4 +69,3 @@ uint8_t u8g_com_stm32duino_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, v
}

#endif // ARDUINO_ARCH_STM32

2 changes: 1 addition & 1 deletion src/clib/u8g_com_stm32duino_ssd_i2c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#if defined(ARDUINO_ARCH_STM32) && !defined(HAL_I2C_MODULE_DISABLED)

#include "u8g.h"
#include "Wire.h"
#include <Wire.h>

/*
BUFFER_LENGTH is defined in libraries\Wire\utility\WireBase.h
Expand Down

0 comments on commit e258d50

Please sign in to comment.