🐛 Fix some Simulator on Windows issues (#22516)
This commit is contained in:
committed by
Scott Lahteine
parent
dc67705049
commit
e3c294dc9b
@@ -21,6 +21,8 @@
|
||||
* Support routines for X86_64
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Translation of routines & variables used by pinsDebug.h
|
||||
*/
|
||||
@@ -37,16 +39,16 @@
|
||||
#define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin
|
||||
|
||||
// active ADC function/mode/code values for PINSEL registers
|
||||
constexpr int8_t ADC_pin_mode(pin_t pin) {
|
||||
inline constexpr int8_t ADC_pin_mode(pin_t pin) {
|
||||
return (-1);
|
||||
}
|
||||
|
||||
int8_t get_pin_mode(pin_t pin) {
|
||||
inline int8_t get_pin_mode(pin_t pin) {
|
||||
if (!VALID_PIN(pin)) return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool GET_PINMODE(pin_t pin) {
|
||||
inline bool GET_PINMODE(pin_t pin) {
|
||||
int8_t pin_mode = get_pin_mode(pin);
|
||||
if (pin_mode == -1 || pin_mode == ADC_pin_mode(pin)) // found an invalid pin or active analog pin
|
||||
return false;
|
||||
@@ -54,6 +56,6 @@ bool GET_PINMODE(pin_t pin) {
|
||||
return (Gpio::getMode(pin) != 0); //input/output state
|
||||
}
|
||||
|
||||
bool GET_ARRAY_IS_DIGITAL(pin_t pin) {
|
||||
inline bool GET_ARRAY_IS_DIGITAL(pin_t pin) {
|
||||
return (!IS_ANALOG(pin) || get_pin_mode(pin) != ADC_pin_mode(pin));
|
||||
}
|
||||
|
@@ -59,7 +59,7 @@
|
||||
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
|
||||
#include <U8glib.h>
|
||||
#include <U8glib-HAL.h>
|
||||
#include "../../shared/Delay.h"
|
||||
|
||||
#undef SPI_SPEED
|
||||
|
@@ -63,7 +63,7 @@
|
||||
#define SPI_SPEED 2 // About 2 MHz
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <U8glib.h>
|
||||
#include <U8glib-HAL.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -209,7 +209,7 @@ uint8_t u8g_com_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_pt
|
||||
#endif
|
||||
|
||||
#elif !ANY(TFT_COLOR_UI, TFT_CLASSIC_UI, TFT_LVGL_UI, HAS_MARLINUI_HD44780) && HAS_MARLINUI_U8GLIB
|
||||
#include <U8glib.h>
|
||||
#include <U8glib-HAL.h>
|
||||
uint8_t u8g_com_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) {return 0;}
|
||||
#endif // HAS_MARLINUI_U8GLIB && !U8GLIB_ST7920
|
||||
#endif // __PLAT_NATIVE_SIM__
|
||||
|
@@ -322,7 +322,7 @@ void hook_cpu_exceptions() {
|
||||
|
||||
unsigned long *vecAddr = (unsigned long*)get_vtor();
|
||||
SERIAL_ECHOPGM("Vector table addr: ");
|
||||
SERIAL_PRINTLN(get_vtor(), HEX);
|
||||
SERIAL_PRINTLN(get_vtor(), PrintBase::Hex);
|
||||
|
||||
#ifdef VECTOR_TABLE_SIZE
|
||||
uint32_t vec_size = VECTOR_TABLE_SIZE;
|
||||
@@ -349,7 +349,7 @@ void hook_cpu_exceptions() {
|
||||
alignas(128) static unsigned long vectable[VECTOR_TABLE_SENTINEL];
|
||||
|
||||
SERIAL_ECHOPGM("Detected vector table size: ");
|
||||
SERIAL_PRINTLN(vec_size, HEX);
|
||||
SERIAL_PRINTLN(vec_size, PrintBase::Hex);
|
||||
#endif
|
||||
|
||||
uint32_t defaultFaultHandler = vecAddr[(unsigned)7];
|
||||
|
Reference in New Issue
Block a user