práce se strukturou
Napsal: 20 pro 2009, 16:42
Zravím, neporadil by mi někdo jak se s tímto pracuje ?
je to vytažené z codevision
Děkuji
je to vytažené z codevision
Kód: Vybrat vše
// Timer/Counter 0
typedef struct TC0_struct
{
unsigned char CTRLA; // Control Reg. A
unsigned char CTRLB; // Control Reg. B
unsigned char CTRLC; // Control Reg. C
unsigned char CTRLD; // Control Reg. D
unsigned char CTRLE; // Control Reg. E
unsigned char reserved_0x05;
unsigned char INTCTRLA; // Interrupt Control Reg. A
unsigned char INTCTRLB; // Interrupt Control Reg. B
unsigned char CTRLFCLR; // Control Reg. F Clear
unsigned char CTRLFSET; // Control Reg. F Set
unsigned char CTRLGCLR; // Control Reg. G Clear
unsigned char CTRLGSET; // Control Reg. G Set
unsigned char INTFLAGS; // Interrupt Flag Reg.
unsigned char reserved_0x0D;
unsigned char reserved_0x0E;
unsigned char TEMP; // Temporary Reg. For 16bit Access
unsigned char reserved_0x10;
unsigned char reserved_0x11;
unsigned char reserved_0x12;
unsigned char reserved_0x13;
unsigned char reserved_0x14;
unsigned char reserved_0x15;
unsigned char reserved_0x16;
unsigned char reserved_0x17;
unsigned char reserved_0x18;
unsigned char reserved_0x19;
unsigned char reserved_0x1A;
unsigned char reserved_0x1B;
unsigned char reserved_0x1C;
unsigned char reserved_0x1D;
unsigned char reserved_0x1E;
unsigned char reserved_0x1F;
WORDREG(CNT); // Count
unsigned char reserved_0x22;
unsigned char reserved_0x23;
unsigned char reserved_0x24;
unsigned char reserved_0x25;
WORDREG(PER); // Period
WORDREG(CCA); // Compare or Capture A
WORDREG(CCB); // Compare or Capture B
WORDREG(CCC); // Compare or Capture C
WORDREG(CCD); // Compare or Capture D
unsigned char reserved_0x30;
unsigned char reserved_0x31;
unsigned char reserved_0x32;
unsigned char reserved_0x33;
unsigned char reserved_0x34;
unsigned char reserved_0x35;
WORDREG(PERBUF); // Period Buffer
WORDREG(CCABUF); // Compare Or Capture A Buffer
WORDREG(CCBBUF); // Compare Or Capture B Buffer
WORDREG(CCCBUF); // Compare Or Capture C Buffer
WORDREG(CCDBUF); // Compare Or Capture D Buffer
} TC0_t;