comparison src/compass_calib.c @ 650:bc214815deb2

3.19/10.75 release
author heinrichsweikamp
date Sun, 28 Aug 2022 13:13:38 +0200
parents 4050675965ea
children 75e90cd0c2c3
comparison
equal deleted inserted replaced
649:ef2ed7e3a895 650:bc214815deb2
17 #ifdef _compass 17 #ifdef _compass
18 18
19 19
20 ////////////////////////////////////////////////////////////////////////////// 20 //////////////////////////////////////////////////////////////////////////////
21 // 21 //
22 // mH: Put compass data into bank 8 (stack) and bank 9 (variables) 22 // Put compass data into bank 13 (stack) and bank 9 (variables)
23 // rl: could also be overlaid with p2_deco.c stack...
24 // 23 //
25 #ifndef UNIX 24 #ifndef UNIX
26 # pragma udata overlay bank8=0x800 25 # pragma udata overlay bank13=0xd00
27 static char C_STACK[256]; // overlay C-code data stack here 26 static char C_STACK[256]; // overlay C-code data stack here
28 # define RESET_C_STACK \ 27 # define C_STACK_ADDR C_STACK
29 _asm \ 28 # define RESET_C_STACK \
30 LFSR 1, 0x800 \ 29 _asm \
31 LFSR 2, 0x800 \ 30 LFSR 1,C_STACK_ADDR \
31 LFSR 2,C_STACK_ADDR \
32 _endasm 32 _endasm
33 # pragma udata overlay bank9_compass 33 # pragma udata bank9b = 0x980
34 # pragma code compass_cal 34 # pragma code compass_cal
35 # define PARAMETER static
36 # define OVERLAY overlay
35 #else 37 #else
36 # define RESET_C_STACK 38 # define RESET_C_STACK
39 # define PARAMETER
40 # define OVERLAY
37 #endif 41 #endif
42
38 43
39 ////////////////////////////////////////////////////////////////////////////// 44 //////////////////////////////////////////////////////////////////////////////
40 45
41 static unsigned short int compass_N; 46 static unsigned short int compass_N;
42 47