Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stm32f103_rey6: implement std periph driver #26

Merged
merged 2 commits into from
May 21, 2014

Conversation

thomaseichinger
Copy link
Contributor

Implement peripheral driver for timer introduced by @haukepetersen
needs accompanying PR OlegHahm/thirdparty_boards#18 to work

@OlegHahm
Copy link
Owner

OlegHahm commented Apr 1, 2014

Needs rebase.

@thomaseichinger
Copy link
Contributor Author

rebased and updated to newest version in RIOT-OS/RIOT#614

@@ -1,8 +1,8 @@
#ifndef HWTIMER_CPU_H_
#define HWTIMER_CPU_H_

#define HWTIMER_MAXTIMERS 4
#define HWTIMER_SPEED 2000
#define ARCH_MAXTIMERS 4
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use HWTIMER_MAXTIMERS instead of ARCH_MAXTIMERS

@OlegHahm
Copy link
Owner

OlegHahm commented Apr 1, 2014

I get

timer.c: In function `timer_init':
timer.c:85:14: error: `TIMER_1' undeclared (first use in this function)
         case TIMER_1:

and so on.

thomaseichinger added a commit to thomaseichinger/thirdparty_boards that referenced this pull request Apr 2, 2014
@thomaseichinger
Copy link
Contributor Author

I updated RIOT-OS/thirdparty_board#18 to be consistent with this PR an fix the TIMER_1 missing definition.
This current implementation of the timer is kind of all in though hwtimer doesn't make use of the second timer right now. This could maybe be changed in the future.

@thomaseichinger
Copy link
Contributor Author

updated addressing ARCH_MAXTIMERS

MODULE = periph

# include RIOTs generic Makefile
include $(MAKEBASE)/Makefile.base
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use RIOTBASE

@OlegHahm
Copy link
Owner

OlegHahm commented Apr 8, 2014

Now I get repeated

timer.c: In function `timer_init':
timer.c:65:5: warning: enumeration value `TIMER_UNDEFINED' not handled in switch [-Wswitch]
     switch (dev) {

@haukepetersen
Copy link
Contributor

This you get because the timer driver interface was changed, an TIMER_UNDEFINED was added to the type struct...

thomaseichinger added a commit to thomaseichinger/thirdparty_boards that referenced this pull request Apr 11, 2014
@thomaseichinger
Copy link
Contributor Author

updated handling TIMER_UNDEFINED, s/MAKEBASE/RIOTBASE/g in Makefile and rebased

@LudwigKnuepfer
Copy link

Is this in a working condition?

@thomaseichinger
Copy link
Contributor Author

yes it is

@LudwigKnuepfer
Copy link

@haukepetersen can you please review this?

thomaseichinger added a commit to thomaseichinger/thirdparty_boards that referenced this pull request May 14, 2014
@thomaseichinger
Copy link
Contributor Author

@haukepetersen any comments or may I squash?

#define HWTIMER_MAXTICKS (0xFFFF)
#define HWTIMER_MAXTIMERS (4)
#define HWTIMER_SPEED (2303U)
#define HWTIMER_MAXTICKS (0xFFFF)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about a consistent indention?!

@haukepetersen
Copy link
Contributor

Ok, just these 2 minor remarks. I do not have an STMf10x board here - so I trust you that it is working. If you'd address these two things I give an ACK.

@thomaseichinger
Copy link
Contributor Author

updated addressing @haukepetersen's comments and adopted to renaming from active_thread to sched_active_thread.

@haukepetersen
Copy link
Contributor

ACK

@thomaseichinger
Copy link
Contributor Author

squashed and GO

thomaseichinger added a commit that referenced this pull request May 21, 2014
stm32f103_rey6: implement std periph driver
@thomaseichinger thomaseichinger merged commit 7fa1de7 into OlegHahm:master May 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants