🚑️ Init FastIO before anything else (#22508)
This commit is contained in:
		
				
					committed by
					
						
						Scott Lahteine
					
				
			
			
				
	
			
			
			
						parent
						
							924e4f95c8
						
					
				
				
					commit
					bc68664c3b
				
			@@ -61,8 +61,6 @@ TERN_(POSTMORTEM_DEBUGGING, extern void install_min_serial());
 | 
			
		||||
 | 
			
		||||
// HAL initialization task
 | 
			
		||||
void HAL_init() {
 | 
			
		||||
  FastIO_init();
 | 
			
		||||
 | 
			
		||||
  // Ensure F_CPU is a constant expression.
 | 
			
		||||
  // If the compiler breaks here, it means that delay code that should compute at compile time will not work.
 | 
			
		||||
  // So better safe than sorry here.
 | 
			
		||||
 
 | 
			
		||||
@@ -24,7 +24,7 @@
 | 
			
		||||
 | 
			
		||||
#include "../../inc/MarlinConfig.h"
 | 
			
		||||
 | 
			
		||||
GPIO_TypeDef* FastIOPortMap[LastPort + 1];
 | 
			
		||||
GPIO_TypeDef* FastIOPortMap[LastPort + 1] = { 0 };
 | 
			
		||||
 | 
			
		||||
void FastIO_init() {
 | 
			
		||||
  LOOP_L_N(i, NUM_DIGITAL_PINS)
 | 
			
		||||
 
 | 
			
		||||
@@ -38,6 +38,7 @@ extern GPIO_TypeDef * FastIOPortMap[];
 | 
			
		||||
// ------------------------
 | 
			
		||||
 | 
			
		||||
void FastIO_init(); // Must be called before using fast io macros
 | 
			
		||||
#define FASTIO_INIT() FastIO_init()
 | 
			
		||||
 | 
			
		||||
// ------------------------
 | 
			
		||||
// Defines
 | 
			
		||||
 
 | 
			
		||||
@@ -19,15 +19,15 @@
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Support routines for STM32GENERIC (Maple)
 | 
			
		||||
 * Support routines for MAPLE_STM32F1
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Translation of routines & variables used by pinsDebug.h
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef BOARD_NR_GPIO_PINS  // Only in STM32GENERIC (Maple)
 | 
			
		||||
   #error "Expected BOARD_NR_GPIO_PINS not found"
 | 
			
		||||
#ifndef BOARD_NR_GPIO_PINS // Only in MAPLE_STM32F1
 | 
			
		||||
  #error "Expected BOARD_NR_GPIO_PINS not found"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include "fastio.h"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user