Fixed eTimer ICU driver.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5653 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
51069d7c81
commit
794c092a2a
|
@ -285,10 +285,10 @@ static void icu_lld_serve_interrupt(ICUDriver *icup) {
|
|||
* @param[in] config the architecture-dependent ICU driver configuration
|
||||
*/
|
||||
static void spc5_icu_smod_init(ICUDriver *icup) {
|
||||
uint32_t psc = (icup->clock / icup->config->frequency);
|
||||
uint32_t psc = (SPC5_ETIMER0_CLK / icup->config->frequency);
|
||||
|
||||
chDbgAssert((psc <= 0xFFFF) &&
|
||||
((psc * icup->config->frequency) == icup->clock) &&
|
||||
((psc * icup->config->frequency) == SPC5_ETIMER0_CLK) &&
|
||||
((psc == 1) || (psc == 2) || (psc == 4) ||
|
||||
(psc == 8) || (psc == 16) || (psc == 32) ||
|
||||
(psc == 64) || (psc == 128)),
|
||||
|
|
|
@ -458,20 +458,19 @@ struct ICUDriver {
|
|||
/**
|
||||
* @brief Driver state.
|
||||
*/
|
||||
icustate_t state;
|
||||
/**
|
||||
* @brief eTimer submodule number.
|
||||
*/
|
||||
uint8_t smod_number;
|
||||
icustate_t state;
|
||||
/**
|
||||
* @brief Current configuration data.
|
||||
*/
|
||||
const ICUConfig *config;
|
||||
/**
|
||||
* @brief Timer base clock.
|
||||
*/
|
||||
uint32_t clock;
|
||||
const ICUConfig *config;
|
||||
#if defined(ICU_DRIVER_EXT_FIELDS)
|
||||
ICU_DRIVER_EXT_FIELDS
|
||||
#endif
|
||||
/* End of the mandatory fields.*/
|
||||
/**
|
||||
* @brief eTimer submodule number.
|
||||
*/
|
||||
uint32_t smod_number;
|
||||
/**
|
||||
* @brief Pointer to the eTimerx registers block.
|
||||
*/
|
||||
|
@ -479,11 +478,11 @@ struct ICUDriver {
|
|||
/**
|
||||
* @brief CCR register used for width capture.
|
||||
*/
|
||||
volatile vuint16_t *wccrp;
|
||||
volatile vuint16_t *wccrp;
|
||||
/**
|
||||
* @brief CCR register used for period capture.
|
||||
*/
|
||||
volatile vuint16_t *pccrp;
|
||||
volatile vuint16_t *pccrp;
|
||||
};
|
||||
|
||||
/*===========================================================================*/
|
||||
|
|
|
@ -357,7 +357,7 @@
|
|||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__)
|
||||
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
|
||||
#define CH_DBG_SYSTEM_STATE_CHECK TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -368,7 +368,7 @@
|
|||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#if !defined(CH_DBG_ENABLE_CHECKS) || defined(__DOXYGEN__)
|
||||
#define CH_DBG_ENABLE_CHECKS FALSE
|
||||
#define CH_DBG_ENABLE_CHECKS TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -380,7 +380,7 @@
|
|||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#if !defined(CH_DBG_ENABLE_ASSERTS) || defined(__DOXYGEN__)
|
||||
#define CH_DBG_ENABLE_ASSERTS FALSE
|
||||
#define CH_DBG_ENABLE_ASSERTS TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -391,7 +391,7 @@
|
|||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#if !defined(CH_DBG_ENABLE_TRACE) || defined(__DOXYGEN__)
|
||||
#define CH_DBG_ENABLE_TRACE FALSE
|
||||
#define CH_DBG_ENABLE_TRACE TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -417,7 +417,7 @@
|
|||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#if !defined(CH_DBG_FILL_THREADS) || defined(__DOXYGEN__)
|
||||
#define CH_DBG_FILL_THREADS FALSE
|
||||
#define CH_DBG_FILL_THREADS TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue