git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7298 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2014-09-21 11:42:29 +00:00
parent 2788713570
commit f15f3af02d
4 changed files with 8 additions and 8 deletions

View File

@ -508,7 +508,7 @@ void icu_lld_start(ICUDriver *icup) {
osalDbgAssert((psc <= 0xFFFF) && osalDbgAssert((psc <= 0xFFFF) &&
((psc + 1) * icup->config->frequency) == icup->clock, ((psc + 1) * icup->config->frequency) == icup->clock,
"invalid frequency"); "invalid frequency");
icup->tim->PSC = (uint16_t)psc; icup->tim->PSC = psc;
icup->tim->ARR = 0xFFFF; icup->tim->ARR = 0xFFFF;
if (icup->config->channel == ICU_CHANNEL_1) { if (icup->config->channel == ICU_CHANNEL_1) {

View File

@ -256,7 +256,7 @@ typedef enum {
/** /**
* @brief ICU counter type. * @brief ICU counter type.
*/ */
typedef uint16_t icucnt_t; typedef uint32_t icucnt_t;
/** /**
* @brief Driver configuration structure. * @brief Driver configuration structure.

View File

@ -170,7 +170,7 @@ OSAL_IRQ_HANDLER(STM32_TIM1_UP_HANDLER) {
* @isr * @isr
*/ */
OSAL_IRQ_HANDLER(STM32_TIM1_CC_HANDLER) { OSAL_IRQ_HANDLER(STM32_TIM1_CC_HANDLER) {
uint16_t sr; uint32_t sr;
OSAL_IRQ_PROLOGUE(); OSAL_IRQ_PROLOGUE();
@ -307,7 +307,7 @@ OSAL_IRQ_HANDLER(STM32_TIM8_UP_HANDLER) {
* @isr * @isr
*/ */
OSAL_IRQ_HANDLER(STM32_TIM8_CC_HANDLER) { OSAL_IRQ_HANDLER(STM32_TIM8_CC_HANDLER) {
uint16_t sr; uint32_t sr;
OSAL_IRQ_PROLOGUE(); OSAL_IRQ_PROLOGUE();
@ -528,8 +528,8 @@ void pwm_lld_start(PWMDriver *pwmp) {
osalDbgAssert((psc <= 0xFFFF) && osalDbgAssert((psc <= 0xFFFF) &&
((psc + 1) * pwmp->config->frequency) == pwmp->clock, ((psc + 1) * pwmp->config->frequency) == pwmp->clock,
"invalid frequency"); "invalid frequency");
pwmp->tim->PSC = (uint16_t)psc; pwmp->tim->PSC = psc;
pwmp->tim->ARR = (uint16_t)(pwmp->period - 1); pwmp->tim->ARR = pwmp->period - 1;
pwmp->tim->CR2 = pwmp->config->cr2; pwmp->tim->CR2 = pwmp->config->cr2;
/* Output enables and polarities setup.*/ /* Output enables and polarities setup.*/

View File

@ -305,7 +305,7 @@ typedef uint32_t pwmchnmsk_t;
/** /**
* @brief Type of a PWM counter. * @brief Type of a PWM counter.
*/ */
typedef uint16_t pwmcnt_t; typedef uint32_t pwmcnt_t;
/** /**
* @brief Type of a PWM driver channel configuration structure. * @brief Type of a PWM driver channel configuration structure.
@ -430,7 +430,7 @@ struct PWMDriver {
* @notapi * @notapi
*/ */
#define pwm_lld_change_period(pwmp, period) \ #define pwm_lld_change_period(pwmp, period) \
((pwmp)->tim->ARR = (uint16_t)((period) - 1)) ((pwmp)->tim->ARR = ((period) - 1))
/*===========================================================================*/ /*===========================================================================*/
/* External declarations. */ /* External declarations. */