From 2944d95d8677c657924ea5c61fc2cdd130387f11 Mon Sep 17 00:00:00 2001 From: Philipp Klaus Krause Date: Sat, 18 Jun 2016 22:19:58 +0200 Subject: [PATCH] Fix kernel/atom.h extra semicolon --- kernel/atom.h | 11 ++--------- ports/stm8/atomport-asm-sdcc.s | 1 - ports/stm8/stm8s-periphs/stm8s_itc.c | 8 ++++++++ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/kernel/atom.h b/kernel/atom.h index 164c968..69bef92 100755 --- a/kernel/atom.h +++ b/kernel/atom.h @@ -42,15 +42,6 @@ extern "C" { /* Forward declaration */ struct atom_tcb; -/* - * Define THREAD_PORT_PRIV to be empty if the used atomport.h does not define - * a port specific entry for the atom_tcb struct. This way we do not have an - * unused element. - */ -#if !defined(THREAD_PORT_PRIV) -#define THREAD_PORT_PRIV -#endif - typedef struct atom_tcb { /* @@ -60,7 +51,9 @@ typedef struct atom_tcb POINTER sp_save_ptr; /* Thread's port specific private data */ +#if defined(THREAD_PORT_PRIV) THREAD_PORT_PRIV; +#endif /* Thread priority (0-255) */ uint8_t priority; diff --git a/ports/stm8/atomport-asm-sdcc.s b/ports/stm8/atomport-asm-sdcc.s index 62bb9fa..68e209f 100644 --- a/ports/stm8/atomport-asm-sdcc.s +++ b/ports/stm8/atomport-asm-sdcc.s @@ -33,7 +33,6 @@ _archFirstThreadRestore:: ; restore context ldw x, (3, sp) - restore: ldw x, (x) ldw sp, x diff --git a/ports/stm8/stm8s-periphs/stm8s_itc.c b/ports/stm8/stm8s-periphs/stm8s_itc.c index ca8cc1b..2c9ad4b 100644 --- a/ports/stm8/stm8s-periphs/stm8s_itc.c +++ b/ports/stm8/stm8s-periphs/stm8s_itc.c @@ -39,6 +39,10 @@ * None * @retval u8 Content of CC register (in A register). */ +#ifdef __SDCC_stm8 +uint8_t get_cc(void); +#endif + u8 ITC_GetCPUCC(void) { #ifdef _COSMIC_ @@ -46,6 +50,10 @@ u8 ITC_GetCPUCC(void) _asm("pop a"); return; /* Ignore compiler warning, the returned value is in A register */ #endif + +#ifdef __SDCC_stm8 + return get_cc(); +#endif #ifdef _RAISONANCE_ return _getCC_();