Restore STM32F1 series to working order. (#10229)
The `_O2` attribute is no longer needed on the malyanlcd function, and the macros have broken timer numbers - reset this to a function to return the right device. Also fix the bit order cast in SPI.
This commit is contained in:
committed by
Scott Lahteine
parent
d1f14202a9
commit
7dc256432f
@@ -32,6 +32,7 @@
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
#include <stdint.h>
|
||||
#include <libmaple/timer.h>
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Defines
|
||||
@@ -56,8 +57,9 @@ typedef uint16_t hal_timer_t;
|
||||
#define TEMP_TIMER_NUM 2 // index of timer to use for temperature
|
||||
#define TEMP_TIMER_CHAN 1 // Channel of the timer to use for compare and interrupts
|
||||
|
||||
#define CAT(a, ...) a ## __VA_ARGS__
|
||||
#define TIMER_DEV(num) CAT (&timer, num)
|
||||
timer_dev* get_timer_dev(int number);
|
||||
|
||||
#define TIMER_DEV(num) get_timer_dev(num)
|
||||
|
||||
#define STEP_TIMER_DEV TIMER_DEV(STEP_TIMER_NUM)
|
||||
#define TEMP_TIMER_DEV TIMER_DEV(TEMP_TIMER_NUM)
|
||||
@@ -86,7 +88,6 @@ typedef uint16_t hal_timer_t;
|
||||
|
||||
#define HAL_timer_get_count(timer_num) timer_get_count(TIMER_DEV(timer_num))
|
||||
|
||||
|
||||
#define HAL_ENABLE_ISRs() do { if (thermalManager.in_temp_isr)DISABLE_TEMPERATURE_INTERRUPT(); else ENABLE_TEMPERATURE_INTERRUPT(); ENABLE_STEPPER_DRIVER_INTERRUPT(); } while(0)
|
||||
// TODO change this
|
||||
|
||||
|
||||
Reference in New Issue
Block a user