Prusa MINI Firmware overview
platforms.h
Go to the documentation of this file.
1 /**
2  * Marlin 3D Printer Firmware
3  * Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4  *
5  * Based on Sprinter and grbl.
6  * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 #pragma once
23 
24 #ifdef __AVR__
25  #define HAL_PLATFORM HAL_AVR
26 #elif defined(ARDUINO_ARCH_SAM)
27  #define HAL_PLATFORM HAL_DUE
28 #elif defined(__MK20DX256__)
29  #define HAL_PLATFORM HAL_TEENSY31_32
30 #elif defined(__MK64FX512__) || defined(__MK66FX1M0__)
31  #define HAL_PLATFORM HAL_TEENSY35_36
32 #elif defined(TARGET_LPC1768)
33  #define HAL_PLATFORM HAL_LPC1768
34 #elif defined(__STM32F1__) || defined(TARGET_STM32F1)
35  #define HAL_PLATFORM HAL_STM32F1
36 #elif defined(STM32GENERIC) && (defined(STM32F4) || defined(STM32F7))
37  #define HAL_PLATFORM HAL_STM32_F4_F7
38 #elif defined(ARDUINO_ARCH_STM32)
39  #define HAL_PLATFORM HAL_STM32
40 #elif defined(ARDUINO_ARCH_ESP32)
41  #define HAL_PLATFORM HAL_ESP32
42 #elif defined(__PLAT_LINUX__)
43  #define HAL_PLATFORM HAL_LINUX
44 #elif defined(__SAMD51__)
45  #define HAL_PLATFORM HAL_SAMD51
46 #else
47  #error "Unsupported Platform!"
48 #endif
49 
50 #define XSTR_(M) #M
51 #define XSTR(M) XSTR_(M)
52 #define HAL_PATH(PATH, NAME) XSTR(PATH/HAL_PLATFORM/NAME)