Added RT counter support to RP2 port.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@14133 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
b420d1665e
commit
9195ca3563
|
@ -177,7 +177,7 @@
|
||||||
* @note The default is @p TRUE.
|
* @note The default is @p TRUE.
|
||||||
*/
|
*/
|
||||||
#if !defined(CH_CFG_USE_TM)
|
#if !defined(CH_CFG_USE_TM)
|
||||||
#define CH_CFG_USE_TM FALSE
|
#define CH_CFG_USE_TM TRUE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
* @name Port Capabilities and Constants
|
* @name Port Capabilities and Constants
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define PORT_SUPPORTS_RT FALSE
|
#define PORT_SUPPORTS_RT TRUE
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Natural alignment constant.
|
* @brief Natural alignment constant.
|
||||||
|
@ -677,6 +677,18 @@ __STATIC_INLINE void port_wait_for_interrupt(void) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Returns the current value of the realtime counter.
|
||||||
|
* @note In this port the RT counter is the same counter used for
|
||||||
|
* system time in tick-less mode, resolution is always 1uS.
|
||||||
|
*
|
||||||
|
* @return The realtime counter value.
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE rtcnt_t port_rt_get_counter_value(void) {
|
||||||
|
|
||||||
|
return TIMER->TIMERAWL;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns a core index.
|
* @brief Returns a core index.
|
||||||
* @return The core index.
|
* @return The core index.
|
||||||
|
|
Loading…
Reference in New Issue