mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
HAL_ChibiOS: use a 16 bit sysinterval_t on 16 bit timers
prevent mixed size subtraction errors
This commit is contained in:
parent
39d7447695
commit
ab4fb4a7de
@ -99,7 +99,7 @@ extern "C" {
|
|||||||
* @note Allowed values are 16, 32 or 64 bits.
|
* @note Allowed values are 16, 32 or 64 bits.
|
||||||
*/
|
*/
|
||||||
#if !defined(CH_CFG_INTERVALS_SIZE)
|
#if !defined(CH_CFG_INTERVALS_SIZE)
|
||||||
#define CH_CFG_INTERVALS_SIZE 32
|
#define CH_CFG_INTERVALS_SIZE CH_CFG_ST_RESOLUTION
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -33,6 +33,7 @@ static_assert(sizeof(systime_t) == 2, "expected 16 bit systime_t");
|
|||||||
#elif CH_CFG_ST_RESOLUTION == 32
|
#elif CH_CFG_ST_RESOLUTION == 32
|
||||||
static_assert(sizeof(systime_t) == 4, "expected 32 bit systime_t");
|
static_assert(sizeof(systime_t) == 4, "expected 32 bit systime_t");
|
||||||
#endif
|
#endif
|
||||||
|
static_assert(sizeof(systime_t) == sizeof(sysinterval_t), "expected systime_t same size as sysinterval_t");
|
||||||
|
|
||||||
#if defined(HAL_EXPECTED_SYSCLOCK)
|
#if defined(HAL_EXPECTED_SYSCLOCK)
|
||||||
#ifdef STM32_SYS_CK
|
#ifdef STM32_SYS_CK
|
||||||
|
Loading…
Reference in New Issue
Block a user