Skip to content

Commit e85eca2

Browse files
committed
HAL cleanup, Teensy 3.1 platform
1 parent 940c59d commit e85eca2

File tree

12 files changed

+146
-78
lines changed

12 files changed

+146
-78
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ env:
1414
- TEST_PLATFORM="LPC1768"
1515
- TEST_PLATFORM="LPC1769"
1616
- TEST_PLATFORM="STM32F1"
17+
- TEST_PLATFORM="teensy31"
1718
- TEST_PLATFORM="teensy35"
1819
- TEST_PLATFORM="linux_native"
1920
- TEST_PLATFORM="esp32"

Marlin/Configuration.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,6 @@
461461
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
462462
#define PID_K1 0.95 // Smoothing factor within any PID loop
463463
#if ENABLED(PIDTEMP)
464-
//#define MIN_POWER 0
465464
//#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
466465
//#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
467466
//#define PID_DEBUG // Sends debug data to the serial port.

Marlin/src/HAL/HAL_DUE/EepromEmulation_Due.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@
3131

3232
#ifdef ARDUINO_ARCH_SAM
3333

34-
#include "../shared/persistent_store_api.h"
3534
#include "../../inc/MarlinConfig.h"
3635

3736
#if ENABLED(EEPROM_SETTINGS) && NONE(I2C_EEPROM, SPI_EEPROM)
3837

3938
#include "../shared/Marduino.h"
39+
#include "../shared/persistent_store_api.h"
4040

4141
#define EEPROMSize 4096
4242
#define PagesPerGroup 128

Marlin/src/HAL/HAL_TEENSY31_32/HAL.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,17 @@
1919
* along with this program. If not, see <http://www.gnu.org/licenses/>.
2020
*
2121
*/
22+
#pragma once
2223

2324
/**
2425
* Description: HAL for Teensy 3.5 and Teensy 3.6
2526
*/
2627

27-
#pragma once
28-
2928
#define CPU_32_BIT
3029

3130
#include "../shared/Marduino.h"
32-
33-
#include "../math_32bit.h"
34-
#include "../HAL_SPI.h"
31+
#include "../shared/math_32bit.h"
32+
#include "../shared/HAL_SPI.h"
3533

3634
#include "fastio_Teensy.h"
3735
#include "watchdog_Teensy.h"

Marlin/src/HAL/HAL_TEENSY31_32/persistent_store_impl.cpp

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,10 @@
2424

2525
#include "../shared/persistent_store_api.h"
2626

27-
namespace HAL {
28-
namespace PersistentStore {
27+
bool PersistentStore::access_start() { return true; }
28+
bool PersistentStore::access_finish() { return true; }
2929

30-
bool access_start() { return true; }
31-
bool access_finish() { return true; }
32-
33-
bool write_data(int &pos, const uint8_t *value, uint16_t size, uint16_t *crc) {
30+
bool PersistentStore::write_data(int &pos, const uint8_t *value, uint16_t size, uint16_t *crc) {
3431
while (size--) {
3532
uint8_t * const p = (uint8_t * const)pos;
3633
uint8_t v = *value;
@@ -50,7 +47,7 @@ bool write_data(int &pos, const uint8_t *value, uint16_t size, uint16_t *crc) {
5047
return false;
5148
}
5249

53-
bool read_data(int &pos, uint8_t* value, uint16_t size, uint16_t *crc, const bool writing/*=true*/) {
50+
bool PersistentStore::read_data(int &pos, uint8_t* value, uint16_t size, uint16_t *crc, const bool writing/*=true*/) {
5451
do {
5552
uint8_t c = eeprom_read_byte((uint8_t*)pos);
5653
if (writing) *value = c;
@@ -61,8 +58,5 @@ bool read_data(int &pos, uint8_t* value, uint16_t size, uint16_t *crc, const boo
6158
return false;
6259
}
6360

64-
} // PersistentStore
65-
} // HAL
66-
6761
#endif // EEPROM_SETTINGS
6862
#endif // __MK20DX256__

Marlin/src/HAL/HAL_TEENSY35_36/persistent_store_impl.cpp

Lines changed: 0 additions & 50 deletions
This file was deleted.

Marlin/src/HAL/HAL_TEENSY35_36/pinsDebug.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1717
*
1818
*/
19-
20-
#ifndef HAL_PINSDEBUG_TEENSY_H
19+
#pragma once
2120

2221
#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
2322
#define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin
@@ -103,5 +102,3 @@ bool HAL_pwm_status(int8_t pin) {
103102
}
104103

105104
static void HAL_pwm_details(uint8_t pin) { /* TODO */ }
106-
107-
#endif

Marlin/src/pins/stm32/pins_JGAURORA_A5S_A1.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@
3939
// #define MCU_STM32F103ZE // not yet required
4040
// Enable EEPROM Emulation for this board, so that we don't overwrite factory data
4141

42-
// #define I2C_EEPROM // AT24C64
43-
// #define E2END 0x7FFF // 64KB
44-
// #define FLASH_EEPROM_EMULATION 1
45-
// #define E2END 0xFFF // 4KB
46-
// #define E2END uint32(EEPROM_START_ADDRESS + (EEPROM_PAGE_SIZE * 2) - 1)
47-
// #define EEPROM_CHITCHAT
48-
// #define DEBUG_EEPROM_READWRITE
42+
//#define I2C_EEPROM // AT24C64
43+
//#define E2END 0x7FFF // 64KB
44+
//#define FLASH_EEPROM_EMULATION
45+
//#define E2END 0xFFF // 4KB
46+
//#define E2END uint32(EEPROM_START_ADDRESS + (EEPROM_PAGE_SIZE * 2) - 1)
47+
//#define EEPROM_CHITCHAT
48+
//#define DEBUG_EEPROM_READWRITE
4949

5050
//
5151
// Limit Switches

0 commit comments

Comments
 (0)