From 48b51079b5540aa8cc826f30f0596ea51fb5f3d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20BRIDAY?= Date: Fri, 20 Sep 2019 09:59:03 +0200 Subject: [PATCH] tpl_tick type is now generated by goil. Default to uint32 --- .../msp430x/tpl_target_specific_types.goilTemplate | 11 +++++++++++ .../code/tpl_app_custom_types_h.goilTemplate | 12 ++++++++++++ os/tpl_os_custom_types.h | 8 -------- 3 files changed, 23 insertions(+), 8 deletions(-) create mode 100644 goil/templates/code/msp430/msp430x/tpl_target_specific_types.goilTemplate diff --git a/goil/templates/code/msp430/msp430x/tpl_target_specific_types.goilTemplate b/goil/templates/code/msp430/msp430x/tpl_target_specific_types.goilTemplate new file mode 100644 index 000000000..46bbb46a5 --- /dev/null +++ b/goil/templates/code/msp430/msp430x/tpl_target_specific_types.goilTemplate @@ -0,0 +1,11 @@ +/** + * tpl_tick is used for relative and absolute dates. + * tpl_tick should be an unsigned datatype. + * + * On MSP430, tpl_ticks should be limited to 16 bits + * (on 32 bits, arguments for system call SetRelAlarm + * would be passed through the stack, which is not + * possible) + */ +typedef uint16 tpl_tick; + diff --git a/goil/templates/code/tpl_app_custom_types_h.goilTemplate b/goil/templates/code/tpl_app_custom_types_h.goilTemplate index 3a8b4a125..442719d8c 100755 --- a/goil/templates/code/tpl_app_custom_types_h.goilTemplate +++ b/goil/templates/code/tpl_app_custom_types_h.goilTemplate @@ -246,6 +246,18 @@ end if #endif /* WITH_AUTOSAR */ +/* target specific types */ + +% template if exists tpl_target_specific_types or % +/** + * tpl_tick is used for relative and absolute dates. + * tpl_tick should be an unsigned datatype. + * + * Default aliased type is "unsigned long int" + */ +typedef uint32 tpl_tick; +%end template% + #endif /* TPL_APP_CUSTOM_TYPES_H */ /* End of file % !FILENAME % */ diff --git a/os/tpl_os_custom_types.h b/os/tpl_os_custom_types.h index 9877d39b9..4a0800624 100644 --- a/os/tpl_os_custom_types.h +++ b/os/tpl_os_custom_types.h @@ -31,14 +31,6 @@ #include "tpl_os_application_def.h" #include "tpl_app_custom_types.h" -/** - * tpl_tick is used for relative and absolute dates. - * tpl_tick should be an unsigned datatype. - * - * Default aliased type is "unsigned long int" - */ -typedef uint32 tpl_tick; - /** * tpl_buffer is a pointer to a chunk of data in memory */