This commit is contained in:
andrea
2026-04-15 23:12:13 +02:00
parent e2accf6ffa
commit 60536ed738
96 changed files with 357096 additions and 305622 deletions

View File

@@ -10,6 +10,25 @@
* [2..] Records...
*/
extern uint16_t m1pwmap;
extern uint16_t m1pwmch;
extern uint16_t m2pwmap;
extern uint16_t m2pwmch;
extern uint16_t m3pwmap;
extern uint16_t m3pwmch;
extern uint16_t m4pwmap;
extern uint16_t m4pwmch;
extern uint16_t t1ap;
extern uint16_t t2ap;
extern uint16_t t3ap;
extern uint16_t t4ap;
extern uint16_t twap;
extern uint16_t tramp;
extern uint16_t t1ch;
extern uint16_t t2ch;
extern uint16_t t3ch;
extern uint16_t twch;
const uint8_t deftab[32]={
40, //m1pwmap
60, //m1pwmch
@@ -28,6 +47,10 @@ const uint8_t deftab[32]={
8, //t3ap
40, //t4ap
1, //twap
30, //t1ch
30, //t2ch
40, //t3ch
1, //twch
0,
0,
0,
@@ -38,11 +61,7 @@ const uint8_t deftab[32]={
0,
0,
0,
0,
0,
0,
0,
0,
10, //tramp
};
typedef struct
@@ -334,3 +353,24 @@ uint16_t EE_WriteVariable(uint16_t VirtAddress, uint16_t Data)
st = EE_PageTransfer(VirtAddress, Data);
return (uint16_t)st;
}
void loadEE(void){
EEW_Read(M1PWMAP, &m1pwmap);
EEW_Read(M1PWMCH, &m1pwmch);
EEW_Read(M2PWMAP, &m2pwmap);
EEW_Read(M2PWMCH, &m2pwmch);
EEW_Read(M3PWMAP, &m3pwmap);
EEW_Read(M3PWMCH, &m3pwmch);
EEW_Read(M4PWMAP, &m4pwmap);
EEW_Read(M4PWMCH, &m4pwmch);
EEW_Read(T1AP, &t1ap);
EEW_Read(T2AP, &t2ap);
EEW_Read(T3AP, &t3ap);
EEW_Read(T4AP, &t4ap);
EEW_Read(TWAP, &twap);
EEW_Read(T1CH, &t1ch);
EEW_Read(T2CH, &t2ch);
EEW_Read(T3CH, &t3ch);
EEW_Read(TWCH, &twch);
EEW_Read(TRAMP, &tramp);
}