HAL include and other adjustments (#14525)
This commit is contained in:
@ -50,3 +50,5 @@
|
||||
#define XSTR_(M) #M
|
||||
#define XSTR(M) XSTR_(M)
|
||||
#define HAL_PATH(PATH, NAME) XSTR(PATH/HAL_PLATFORM/NAME)
|
||||
|
||||
#include HAL_PATH(.,HAL.h)
|
@ -22,8 +22,6 @@
|
||||
// Includes
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "../shared/Marduino.h"
|
||||
#include "../shared/HAL_SPI.h"
|
||||
#include "fastio_AVR.h"
|
||||
@ -33,9 +31,11 @@
|
||||
#ifdef USBCON
|
||||
#include "HardwareSerial.h"
|
||||
#else
|
||||
#define HardwareSerial_h // Hack to prevent HardwareSerial.h header inclusion
|
||||
#include "MarlinSerial.h"
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <util/delay.h>
|
||||
#include <avr/eeprom.h>
|
||||
#include <avr/pgmspace.h>
|
||||
|
@ -275,7 +275,6 @@
|
||||
|
||||
#endif // !USBCON
|
||||
|
||||
|
||||
#ifdef INTERNAL_SERIAL_PORT
|
||||
template <uint8_t serial>
|
||||
struct MarlinInternalSerialCfg {
|
||||
|
@ -36,7 +36,6 @@
|
||||
* (Located in Marlin/buildroot/share/pin_interrupt_test/pin_interrupt_test.ino)
|
||||
*/
|
||||
|
||||
#include "../../core/macros.h"
|
||||
#include "../../module/endstops.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
@ -39,6 +39,8 @@
|
||||
|
||||
#include <pins_arduino.h>
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
|
||||
/**
|
||||
* Utility functions
|
||||
*/
|
||||
|
@ -34,7 +34,7 @@ void HAL_init(void);
|
||||
#include <stdarg.h>
|
||||
#include <algorithm>
|
||||
|
||||
extern "C" volatile millis_t _millis;
|
||||
extern "C" volatile uint32_t _millis;
|
||||
|
||||
#include "../shared/Marduino.h"
|
||||
#include "../shared/math_32bit.h"
|
||||
|
@ -124,6 +124,8 @@ bool SDIO_ReadBlock(uint32_t blockAddress, uint8_t *data) {
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32_t millis();
|
||||
|
||||
bool SDIO_WriteBlock(uint32_t blockAddress, const uint8_t *data) {
|
||||
if (SDIO_GetCardState() != SDIO_CARD_TRANSFER) return false;
|
||||
if (blockAddress >= SdCard.LogBlockNbr) return false;
|
||||
|
@ -1,10 +1,28 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifdef __MK20DX256__
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
#if ENABLED(EEPROM_SETTINGS)
|
||||
|
||||
#include "../persistent_store_api.h"
|
||||
#include "../shared/persistent_store_api.h"
|
||||
|
||||
namespace HAL {
|
||||
namespace PersistentStore {
|
||||
|
@ -33,7 +33,7 @@
|
||||
// Includes
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
#include HAL_PATH(.., HAL.h)
|
||||
#include "../HAL.h"
|
||||
#include <Wire.h>
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
#if ENABLED(SPI_EEPROM)
|
||||
|
||||
#include HAL_PATH(.., HAL.h)
|
||||
#include "../HAL.h"
|
||||
|
||||
#define CMD_WREN 6 // WREN
|
||||
#define CMD_READ 2 // WRITE
|
||||
|
Reference in New Issue
Block a user