Skip to content

Commit

Permalink
Merge pull request #3282 from benoit-canet/timer
Browse files Browse the repository at this point in the history
native: Resurect native/perif/timer and handle #715 (WIP)
  • Loading branch information
kaspar030 committed Jul 9, 2015
2 parents 70c08b8 + dfbd4f9 commit b2272fc
Show file tree
Hide file tree
Showing 8 changed files with 288 additions and 379 deletions.
1 change: 1 addition & 0 deletions boards/native/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ FEATURES_PROVIDED += config
FEATURES_PROVIDED += cpp
FEATURES_PROVIDED += periph_random
FEATURES_PROVIDED += periph_rtc
FEATURES_PROVIDED += periph_timer
FEATURES_MCU_GROUP = x86
2 changes: 1 addition & 1 deletion cpu/native/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ ifeq ($(BUILDOSXNATIVE),1)
export NATIVEINCLUDES += -I$(RIOTBASE)/sys/malloc/include
endif

export USEMODULE += periph
export USEMODULE += periph hwtimer_compat
333 changes: 0 additions & 333 deletions cpu/native/hwtimer_cpu.c

This file was deleted.

3 changes: 2 additions & 1 deletion cpu/native/include/hwtimer_cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@
extern "C" {
#endif

#define HWTIMER_MAXTIMERS 4
#define HWTIMER_MAXTIMERS 1
#define HWTIMER_SPEED 1000000
#define HWTIMER_MAXTICKS (0xFFFFFFFF)
#define HWTIMER_SPIN_BARRIER 20

#ifdef __cplusplus
}
Expand Down
11 changes: 11 additions & 0 deletions cpu/native/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,17 @@
#define RTC_NUMOF (1)
/** @} */

/**
* @name Timer peripheral configuration
* @{
*/
#define TIMER_NUMOF (1U)
#define TIMER_0_EN 1

/** @def set TIMER0 for hwtimer wrapper */
#define HW_TIMER TIMER_0
/** @} */

#ifdef __cplusplus
}
#endif
Expand Down
Loading

0 comments on commit b2272fc

Please sign in to comment.