Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions arch/arm/src/nrf52/nrf52_tim_lowerhalf.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@
#define NRF52_TIMER_RES (NRF52_TIM_WIDTH_32B)
#define NRF52_TIMER_MAX (4294967295ul)
#define NRF52_TIMER_PRE (NRF52_TIM_PRE_1000000)
#define NRF52_TIMER_PER (1000000)
#define NRF52_TIMER_PER (1000000ull)

/* Maximum supported timeout */

#define NRF52_TIMER_MAXTIMEOUT (NRF52_TIMER_MAX * (1000000 / NRF52_TIMER_PER))
#define NRF52_TIMER_MAXTIMEOUT (NRF52_TIMER_MAX * 1000000ull / NRF52_TIMER_PER)

/****************************************************************************
* Private Types
Expand Down Expand Up @@ -373,7 +373,7 @@ static int nrf52_timer_settimeout(struct timer_lowerhalf_s *lower,
goto errout;
}

cc = (timeout * NRF52_TIMER_PER / 1000000);
cc = (uint32_t)(timeout * NRF52_TIMER_PER / 1000000);
NRF52_TIM_SETCC(priv->tim, NRF52_TIMER_CC, cc);

errout:
Expand Down
6 changes: 3 additions & 3 deletions arch/arm/src/nrf53/nrf53_tim_lowerhalf.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@
#define NRF53_TIMER_RES (NRF53_TIM_WIDTH_32B)
#define NRF53_TIMER_MAX (4294967295ul)
#define NRF53_TIMER_PRE (NRF53_TIM_PRE_1000000)
#define NRF53_TIMER_PER (1000000)
#define NRF53_TIMER_PER (1000000ull)

/* Maximum supported timeout */

#define NRF53_TIMER_MAXTIMEOUT (NRF53_TIMER_MAX * (1000000 / NRF53_TIMER_PER))
#define NRF53_TIMER_MAXTIMEOUT (NRF53_TIMER_MAX * 1000000ull / NRF53_TIMER_PER)

/****************************************************************************
* Private Types
Expand Down Expand Up @@ -373,7 +373,7 @@ static int nrf53_timer_settimeout(struct timer_lowerhalf_s *lower,
goto errout;
}

cc = (timeout * NRF53_TIMER_PER / 1000000);
cc = (uint32_t)(timeout * NRF53_TIMER_PER / 1000000);
NRF53_TIM_SETCC(priv->tim, NRF53_TIMER_CC, cc);

errout:
Expand Down
6 changes: 3 additions & 3 deletions arch/arm/src/nrf91/nrf91_tim_lowerhalf.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@
#define NRF91_TIMER_RES (NRF91_TIM_WIDTH_32B)
#define NRF91_TIMER_MAX (4294967295ul)
#define NRF91_TIMER_PRE (NRF91_TIM_PRE_1000000)
#define NRF91_TIMER_PER (1000000)
#define NRF91_TIMER_PER (1000000ull)

/* Maximum supported timeout */

#define NRF91_TIMER_MAXTIMEOUT (NRF91_TIMER_MAX * (1000000 / NRF91_TIMER_PER))
#define NRF91_TIMER_MAXTIMEOUT (NRF91_TIMER_MAX * 1000000ull / NRF91_TIMER_PER)

/****************************************************************************
* Private Types
Expand Down Expand Up @@ -373,7 +373,7 @@ static int nrf91_timer_settimeout(struct timer_lowerhalf_s *lower,
goto errout;
}

cc = (timeout * NRF91_TIMER_PER / 1000000);
cc = (uint32_t)(timeout * NRF91_TIMER_PER / 1000000);
NRF91_TIM_SETCC(priv->tim, NRF91_TIMER_CC, cc);

errout:
Expand Down
Loading