mirror of
https://github.com/Klipper3d/klipper.git
synced 2026-05-07 05:47:02 +02:00
avr: Fix missing SP definition in newer avr-libc and missing include in adc.c (#7233)
compatibility fix for newer avr-libc - define stack pointer add missing avr/io.h include to adc.c add missing avr/io.h include to spi.c Signed-off-by: Nicolás Méndez <9phhsyrbm@relay.firefox.com>
This commit is contained in:
committed by
GitHub
parent
594ec7e120
commit
0c2416ea7f
@@ -4,6 +4,7 @@
|
||||
//
|
||||
// This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
|
||||
#include <avr/io.h> // ADCSRA
|
||||
#include "autoconf.h" // CONFIG_MACH_atmega644p
|
||||
#include "command.h" // shutdown
|
||||
#include "gpio.h" // gpio_adc_read
|
||||
|
||||
@@ -12,6 +12,12 @@
|
||||
#include "irq.h" // irq_enable
|
||||
#include "sched.h" // sched_main
|
||||
|
||||
// Newer avr-libc headers expose the stack pointer as SP instead of the
|
||||
// older AVR_STACK_POINTER_REG alias used by Klipper.
|
||||
#ifndef AVR_STACK_POINTER_REG
|
||||
#define AVR_STACK_POINTER_REG SP
|
||||
#endif
|
||||
|
||||
DECL_CONSTANT_STR("MCU", CONFIG_MCU);
|
||||
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
//
|
||||
// This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
|
||||
#include <avr/io.h> // SPCR
|
||||
#include "autoconf.h" // CONFIG_MACH_atmega644p
|
||||
#include "command.h" // shutdown
|
||||
#include "gpio.h" // spi_setup
|
||||
|
||||
Reference in New Issue
Block a user