HAL updates
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
|
||||
#include "HAL_Servo_Teensy.h"
|
||||
#include "../../../MarlinConfig.h"
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
|
||||
int8_t libServo::attach(int pin) {
|
||||
|
@ -30,8 +30,6 @@
|
||||
// Includes
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "Arduino.h"
|
||||
|
||||
#include "fastio_Teensy.h"
|
||||
@ -39,10 +37,13 @@
|
||||
|
||||
#include "HAL_timers_Teensy.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Defines
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
#undef MOTHERBOARD
|
||||
#define MOTHERBOARD BOARD_TEENSY35_36
|
||||
|
||||
#define IS_32BIT_TEENSY (defined(__MK64FX512__) || defined(__MK66FX1M0__))
|
||||
@ -79,9 +80,10 @@
|
||||
|
||||
// Fix bug in pgm_read_ptr
|
||||
#undef pgm_read_ptr
|
||||
#define pgm_read_ptr(addr) (*(addr))
|
||||
#define pgm_read_ptr(addr) (*((void**)(addr)))
|
||||
// Add type-checking to pgm_read_word
|
||||
#undef pgm_read_word
|
||||
#define pgm_read_word(addr) (*(addr))
|
||||
#define pgm_read_word(addr) (*((uint16_t*)(addr)))
|
||||
|
||||
#define RST_POWER_ON 1
|
||||
#define RST_EXTERNAL 2
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <SPI.h>
|
||||
#include <pins_arduino.h>
|
||||
#include "spi_pins.h"
|
||||
#include "../../../macros.h"
|
||||
#include "../../core/macros.h"
|
||||
|
||||
static SPISettings spiConfig;
|
||||
|
||||
|
@ -25,7 +25,6 @@
|
||||
* Teensy3.6 (__MK66FX1M0__)
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _HAL_TIMERS_TEENSY_H
|
||||
#define _HAL_TIMERS_TEENSY_H
|
||||
|
||||
|
@ -1,14 +1,11 @@
|
||||
#if defined(__MK64FX512__) || defined(__MK66FX1M0__)
|
||||
|
||||
#include "../persistent_store_api.h"
|
||||
|
||||
#include "../../../types.h"
|
||||
#include "../../../language.h"
|
||||
#include "../../../serial.h"
|
||||
#include "../../../utility.h"
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
#if ENABLED(EEPROM_SETTINGS)
|
||||
|
||||
#include "../persistent_store_api.h"
|
||||
|
||||
namespace HAL {
|
||||
namespace PersistentStore {
|
||||
|
||||
@ -16,7 +13,7 @@ bool access_start() {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool access_finish(){
|
||||
bool access_finish() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -51,8 +48,8 @@ void read_data(int &pos, uint8_t* value, uint16_t size, uint16_t *crc) {
|
||||
} while (--size);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} // PersistentStore
|
||||
} // HAL
|
||||
|
||||
#endif // EEPROM_SETTINGS
|
||||
#endif // ARDUINO_ARCH_AVR
|
||||
#endif // __MK64FX512__ || __MK66FX1M0__
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#if defined(__MK64FX512__) || defined(__MK66FX1M0__)
|
||||
|
||||
#include "../../../Marlin.h"
|
||||
#include "../../Marlin.h"
|
||||
|
||||
#if ENABLED(USE_WATCHDOG)
|
||||
|
||||
|
@ -23,16 +23,16 @@
|
||||
#ifndef WATCHDOG_TEENSY_H
|
||||
#define WATCHDOG_TEENSY_H
|
||||
|
||||
//#include "../../../Marlin.h"
|
||||
#include "../HAL.h"
|
||||
|
||||
// Arduino Due core now has watchdog support
|
||||
|
||||
void watchdog_init();
|
||||
|
||||
inline void watchdog_reset() {
|
||||
// Watchdog refresh sequence
|
||||
WDOG_REFRESH = 0xA602;
|
||||
WDOG_REFRESH = 0xB480;
|
||||
// Watchdog refresh sequence
|
||||
WDOG_REFRESH = 0xA602;
|
||||
WDOG_REFRESH = 0xB480;
|
||||
}
|
||||
|
||||
#endif /* WATCHDOG_TEENSY_H */
|
||||
#endif // WATCHDOG_TEENSY_H
|
||||
|
Reference in New Issue
Block a user