HAL_ChibiOS: added assert for systime_t size

This commit is contained in:
Andrew Tridgell 2019-12-08 22:49:06 +11:00 committed by Randy Mackay
parent 805d8ed776
commit e35f253803
1 changed files with 6 additions and 0 deletions

View File

@ -25,6 +25,12 @@
#include "hal.h"
#include <hrt.h>
#if CH_CFG_ST_RESOLUTION == 16
static_assert(sizeof(systime_t) == 2, "expected 16 bit systime_t");
#elif CH_CFG_ST_RESOLUTION == 32
static_assert(sizeof(systime_t) == 4, "expected 32 bit systime_t");
#endif
extern const AP_HAL::HAL& hal;
extern "C"
{