Better correction for issue 95

This commit is contained in:
bsongis
2012-08-21 11:45:04 +00:00
parent 0e7c08ba15
commit 76ea24e62c
5 changed files with 48 additions and 34 deletions
+12 -12
View File
@@ -544,9 +544,20 @@ enum PerOutMode {
extern uint8_t s_perout_mode;
#ifndef FORCEINLINE
#define FORCEINLINE inline __attribute__ ((always_inline))
#endif
#ifndef NOINLINE
#define NOINLINE __attribute__ ((noinline))
#endif
// Fiddle to force compiler to use a pointer
#define FORCE_INDIRECT(ptr) __asm__ __volatile__ ("" : "=e" (ptr) : "0" (ptr))
void perOut(uint8_t tick10ms);
void perMain();
void per10ms();
NOINLINE void per10ms();
int16_t getValue(uint8_t i);
bool getSwitch(int8_t swtch, bool nc);
@@ -705,17 +716,6 @@ void read_9_adc(void ) ;
/// liefert Dimension eines Arrays
#define DIM(arr) (sizeof((arr))/sizeof((arr)[0]))
#ifndef FORCEINLINE
#define FORCEINLINE inline __attribute__ ((always_inline))
#endif
#ifndef NOINLINE
#define NOINLINE __attribute__ ((noinline))
#endif
// Fiddle to force compiler to use a pointer
#define FORCE_INDIRECT(ptr) __asm__ __volatile__ ("" : "=e" (ptr) : "0" (ptr))
/// liefert Betrag des Arguments
template<class t> FORCEINLINE t abs(t a) { return a>0?a:-a; }
/// liefert das Minimum der Argumente