Propeller Device Specific Functions and Registers  v0.5
Provides low level access to Propeller microcontroller functions and registers.
cog.h
Go to the documentation of this file.
1 
42 #ifndef PROPELLER_COG_H_
43 #define PROPELLER_COG_H_
44 
48 #define _COGMEM __attribute__((cogmem))
49 
53 #define _NATIVE __attribute__((native))
54 
58 #define _NAKED __attribute__((naked))
59 
61 #define _FCACHE __attribute__((fcache))
62 
64 
65 /* useful variables */
66 
67 extern _COGMEM volatile unsigned int _PAR __asm__("PAR");
68 extern _COGMEM volatile unsigned int _CNT __asm__("CNT");
69 extern _COGMEM volatile unsigned int _INA __asm__("INA");
70 extern _COGMEM volatile unsigned int _INB __asm__("INB");
71 extern _COGMEM volatile unsigned int _OUTA __asm__("OUTA");
72 extern _COGMEM volatile unsigned int _OUTB __asm__("OUTB");
73 extern _COGMEM volatile unsigned int _DIRA __asm__("DIRA");
74 extern _COGMEM volatile unsigned int _DIRB __asm__("DIRB");
75 extern _COGMEM volatile unsigned int _CTRA __asm__("CTRA");
76 extern _COGMEM volatile unsigned int _CTRB __asm__("CTRB");
77 extern _COGMEM volatile unsigned int _FRQA __asm__("FRQA");
78 extern _COGMEM volatile unsigned int _FRQB __asm__("FRQB");
79 extern _COGMEM volatile unsigned int _PHSA __asm__("PHSA");
80 extern _COGMEM volatile unsigned int _PHSB __asm__("PHSB");
81 extern _COGMEM volatile unsigned int _VCFG __asm__("VCFG");
82 extern _COGMEM volatile unsigned int _VSCL __asm__("VSCL");
83 
85 
86 /* boot parameters */
87 
89 extern unsigned int _clkfreq; /* in the spin boot code */
90 
92 #define _CLKFREQ _clkfreq
93 
95 extern unsigned char _clkmode; /* in the spin boot code */
96 
100 #define _CLKMODE _clkmode
101 
102 
103 #endif