Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Skyward Boardcore
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
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
Nicolò Caruso
Skyward Boardcore
Commits
81a3814e
Commit
81a3814e
authored
5 years ago
by
Luca Erbetta
Browse files
Options
Downloads
Patches
Plain Diff
[HWTimer] unsigned int -> uint32_t
parent
2a470d1b
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/shared/drivers/HardwareTimer.h
+8
-8
8 additions, 8 deletions
src/shared/drivers/HardwareTimer.h
with
8 additions
and
8 deletions
src/shared/drivers/HardwareTimer.h
+
8
−
8
View file @
81a3814e
...
...
@@ -40,22 +40,22 @@ public:
* @brief returns the timer clock frequency before the prescaler.
* Function borrowed from the SyncronizedServo class in Miosix.
*
* @return
unsigned int
Prescaler input frequency
* @return Prescaler input frequency
*/
static
u
nsigned
in
t
getPrescalerInputFrequency
(
InputClock
input_clock
)
static
u
int32_
t
getPrescalerInputFrequency
(
InputClock
input_clock
)
{
// The global variable SystemCoreClock from ARM's CMSIS allows to
// know
// the CPU frequency.
u
nsigned
in
t
freq
=
SystemCoreClock
;
u
int32_
t
freq
=
SystemCoreClock
;
// The position of the PPRE1 bit in RCC->CFGR is different in some stm32
#ifdef _ARCH_CORTEXM3_STM32
const
u
nsigned
in
t
ppre1
=
8
;
const
u
int32_
t
ppre1
=
8
;
#error "Architecture not currently supported"
#else // stm32f2 and f4
const
u
nsigned
in
t
ppre1
=
10
;
const
u
nsigned
in
t
ppre2
=
13
;
const
u
int32_
t
ppre1
=
10
;
const
u
int32_
t
ppre2
=
13
;
#endif
// The timer frequency may however be a submultiple of the CPU
// frequency,
...
...
@@ -104,7 +104,7 @@ public:
* @param psc_input_freq Input frequency of the timer's prescaler, see
* TimerUtils::getPrescalerInputFrequency()
*/
HardwareTimer
(
TIM_TypeDef
*
timer
,
u
nsigned
in
t
psc_input_freq
)
HardwareTimer
(
TIM_TypeDef
*
timer
,
u
int32_
t
psc_input_freq
)
:
tim
(
timer
),
prescaler_freq
(
psc_input_freq
)
{
}
...
...
@@ -187,7 +187,7 @@ public:
private
:
TIM_TypeDef
*
tim
;
u
nsigned
in
t
prescaler_freq
;
u
int32_
t
prescaler_freq
;
bool
ticking
=
false
;
uint16_t
prescaler
=
0
;
...
...
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