Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
marlin-anet-a8
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonas Leder
marlin-anet-a8
Commits
a8638aa2
Commit
a8638aa2
authored
7 years ago
by
Scott Lahteine
Browse files
Options
Downloads
Patches
Plain Diff
Update STM32F1 timer code to use libmaple bb_perip
parent
2e2fd8fd
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Marlin/src/HAL/HAL_STM32F1/HAL_timers_Stm32f1.cpp
+12
-18
12 additions, 18 deletions
Marlin/src/HAL/HAL_STM32F1/HAL_timers_Stm32f1.cpp
with
12 additions
and
18 deletions
Marlin/src/HAL/HAL_STM32F1/HAL_timers_Stm32f1.cpp
+
12
−
18
View file @
a8638aa2
...
@@ -137,34 +137,28 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
...
@@ -137,34 +137,28 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
void
HAL_timer_enable_interrupt
(
const
uint8_t
timer_num
)
{
void
HAL_timer_enable_interrupt
(
const
uint8_t
timer_num
)
{
switch
(
timer_num
)
{
switch
(
timer_num
)
{
case
STEP_TIMER_NUM
:
case
STEP_TIMER_NUM
:
ENABLE_STEPPER_DRIVER_INTERRUPT
();
break
;
timer_enable_irq
(
STEP_TIMER_DEV
,
STEP_TIMER_CHAN
);
case
TEMP_TIMER_NUM
:
ENABLE_TEMPERATURE_INTERRUPT
();
break
;
break
;
default:
break
;
case
TEMP_TIMER_NUM
:
timer_enable_irq
(
TEMP_TIMER_DEV
,
TEMP_TIMER_CHAN
);
break
;
default:
break
;
}
}
}
}
void
HAL_timer_disable_interrupt
(
const
uint8_t
timer_num
)
{
void
HAL_timer_disable_interrupt
(
const
uint8_t
timer_num
)
{
switch
(
timer_num
)
{
switch
(
timer_num
)
{
case
STEP_TIMER_NUM
:
case
STEP_TIMER_NUM
:
DISABLE_STEPPER_DRIVER_INTERRUPT
();
break
;
timer_disable_irq
(
STEP_TIMER_DEV
,
STEP_TIMER_CHAN
);
case
TEMP_TIMER_NUM
:
DISABLE_TEMPERATURE_INTERRUPT
();
break
;
break
;
default:
break
;
case
TEMP_TIMER_NUM
:
}
timer_disable_irq
(
TEMP_TIMER_DEV
,
TEMP_TIMER_CHAN
);
break
;
default:
break
;
}
}
static
inline
bool
timer_irq_enabled
(
const
timer_dev
*
const
dev
,
const
uint8
interrupt
)
{
return
bool
(
*
bb_perip
(
&
(
dev
->
regs
).
adv
->
DIER
,
interrupt
));
}
}
bool
HAL_timer_interrupt_enabled
(
const
uint8_t
timer_num
)
{
bool
HAL_timer_interrupt_enabled
(
const
uint8_t
timer_num
)
{
switch
(
timer_num
)
{
switch
(
timer_num
)
{
case
STEP_TIMER_NUM
:
return
bool
(
TIM_DIER
(
STEP_TIMER_DEV
)
&
STEP_TIMER_CHAN
);
case
STEP_TIMER_NUM
:
return
timer_irq_enabled
(
STEP_TIMER_DEV
,
STEP_TIMER_CHAN
);
case
TEMP_TIMER_NUM
:
return
bool
(
TIM_DIER
(
TEMP_TIMER_DEV
)
&
TEMP_TIMER_CHAN
);
case
TEMP_TIMER_NUM
:
return
timer_irq_enabled
(
TEMP_TIMER_DEV
,
TEMP_TIMER_CHAN
);
}
}
return
false
;
return
false
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment