Scott Lahteine
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with
22 additions and
10 deletions
-
Marlin/src/HAL/HAL_DUE/fastio_Due.h
-
Marlin/src/HAL/HAL_STM32/fastio_STM32.h
-
Marlin/src/HAL/HAL_STM32F1/fastio_Stm32f1.h
-
Marlin/src/HAL/HAL_STM32F4/fastio_STM32F4.h
-
Marlin/src/HAL/HAL_STM32F7/fastio_STM32F7.h
-
buildroot/share/tests/STM32F1_tests
|
|
@ -47,7 +47,7 @@ |
|
|
|
|
|
|
|
// Due has 12 PWMs assigned to logical pins 2-13.
|
|
|
|
// 6, 7, 8 & 9 come from the PWM controller. The others come from the timers.
|
|
|
|
#define USEABLE_HARDWARE_PWM(p) ((2 <= p) && (p <= 13)) |
|
|
|
#define USEABLE_HARDWARE_PWM(p) WITHIN(p, 2, 13) |
|
|
|
|
|
|
|
#ifndef MASK |
|
|
|
#define MASK(PIN) (1 << PIN) |
|
|
|
|
|
@ -29,8 +29,6 @@ |
|
|
|
|
|
|
|
#define _BV(b) (1 << (b)) |
|
|
|
|
|
|
|
#define USEABLE_HARDWARE_PWM(p) true |
|
|
|
|
|
|
|
#define READ(IO) digitalRead(IO) |
|
|
|
#define WRITE(IO,V) digitalWrite(IO,V) |
|
|
|
#define WRITE_VAR(IO,V) WRITE(IO,V) |
|
|
@ -51,3 +49,6 @@ |
|
|
|
#define GET_INPUT(IO) |
|
|
|
#define GET_OUTPUT(IO) |
|
|
|
#define GET_TIMER(IO) |
|
|
|
|
|
|
|
#define PWM_PIN(p) true |
|
|
|
#define USEABLE_HARDWARE_PWM(p) PWM_PIN(p) |
|
|
|
|
|
@ -50,9 +50,7 @@ |
|
|
|
#define GET_OUTPUT(IO) (_GET_MODE(IO) == GPIO_OUTPUT_PP) |
|
|
|
#define GET_TIMER(IO) (PIN_MAP[IO].timer_device != NULL) |
|
|
|
|
|
|
|
/**
|
|
|
|
* TODO: Write a macro to test if PIN is PWM or not. |
|
|
|
*/ |
|
|
|
#define PWM_PIN(p) true |
|
|
|
#define PWM_PIN(p) digitalPinHasPWM(p) |
|
|
|
#define USEABLE_HARDWARE_PWM(p) PWM_PIN(p) |
|
|
|
|
|
|
|
#endif // _FASTIO_STM32F1_H
|
|
|
|
|
|
@ -32,8 +32,6 @@ |
|
|
|
#undef _BV |
|
|
|
#define _BV(b) (1 << (b)) |
|
|
|
|
|
|
|
#define USEABLE_HARDWARE_PWM(p) true |
|
|
|
|
|
|
|
#define READ(IO) digitalRead(IO) |
|
|
|
#define WRITE(IO,V) digitalWrite(IO,V) |
|
|
|
#define WRITE_VAR(IO,V) WRITE(IO,V) |
|
|
@ -55,6 +53,12 @@ |
|
|
|
#define GET_OUTPUT(IO) |
|
|
|
#define GET_TIMER(IO) |
|
|
|
|
|
|
|
#define PWM_PIN(p) digitalPinHasPWM(p) |
|
|
|
#define USEABLE_HARDWARE_PWM(p) PWM_PIN(p) |
|
|
|
|
|
|
|
//
|
|
|
|
// Pins Definitions
|
|
|
|
//
|
|
|
|
#define PORTA 0 |
|
|
|
#define PORTB 1 |
|
|
|
#define PORTC 2 |
|
|
|
|
|
@ -52,6 +52,12 @@ |
|
|
|
#define GET_OUTPUT(IO) |
|
|
|
#define GET_TIMER(IO) |
|
|
|
|
|
|
|
#define PWM_PIN(p) digitalPinHasPWM(p) |
|
|
|
#define USEABLE_HARDWARE_PWM(p) PWM_PIN(p) |
|
|
|
|
|
|
|
//
|
|
|
|
// Pins Definitions
|
|
|
|
//
|
|
|
|
#define PORTA 0 |
|
|
|
#define PORTB 1 |
|
|
|
#define PORTC 2 |
|
|
|
|
|
@ -8,5 +8,8 @@ opt_set MOTHERBOARD BOARD_STM32F1R |
|
|
|
opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT |
|
|
|
exec_test $1 $2 "STM32F1R EEPROM_SETTINGS EEPROM_CHITCHAT REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT" |
|
|
|
|
|
|
|
#cleanup |
|
|
|
opt_enable SPINDLE_LASER_ENABLE |
|
|
|
exec_test $1 $2 "STM32F1R SPINDLE_LASER_ENABLE" |
|
|
|
|
|
|
|
# cleanup |
|
|
|
restore_configs |
|
|
|