// based on linux-header by Russel Nelson\r
\r
#define PP_ChipID 0x0000 // offset 0h -> Corp-ID\r
- \r
+\r
// offset 2h -> Model/Product Number\r
#define LED_RED (1<<8)\r
#define LED_GREEN (1<<10)\r
\r
GPIO_IOCLR = 0xf << 4; // Put address on bus\r
GPIO_IOSET = addr << 4;\r
- \r
+\r
GPIO_IOCLR = 0xff << 16; // Write low order byte to data bus\r
GPIO_IOSET = data << 16;\r
\r
- asm volatile ( "NOP" );\r
+ __asm volatile ( "NOP" );\r
GPIO_IOCLR = IOW; // Toggle IOW-signal\r
- asm volatile ( "NOP" );\r
+ __asm volatile ( "NOP" );\r
GPIO_IOSET = IOW;\r
- asm volatile ( "NOP" );\r
+ __asm volatile ( "NOP" );\r
\r
GPIO_IOCLR = 0xf << 4;\r
GPIO_IOSET = ((addr | 1) << 4); // And put next address on bus\r
GPIO_IOCLR = 0xff << 16; // Write high order byte to data bus\r
GPIO_IOSET = data >> 8 << 16;\r
\r
- asm volatile ( "NOP" );\r
+ __asm volatile ( "NOP" );\r
GPIO_IOCLR = IOW; // Toggle IOW-signal\r
- asm volatile ( "NOP" );\r
+ __asm volatile ( "NOP" );\r
GPIO_IOSET = IOW;\r
- asm volatile ( "NOP" );\r
+ __asm volatile ( "NOP" );\r
}\r
\r
// Reads a word in little-endian byte order from a specified port-address\r
GPIO_IOCLR = 0xf << 4; // Put address on bus\r
GPIO_IOSET = addr << 4;\r
\r
- asm volatile ( "NOP" );\r
+ __asm volatile ( "NOP" );\r
GPIO_IOCLR = IOR; // IOR-signal low\r
- asm volatile ( "NOP" );\r
+ __asm volatile ( "NOP" );\r
value = (GPIO_IOPIN >> 16) & 0xff; // get low order byte from data bus\r
GPIO_IOSET = IOR;\r
\r
GPIO_IOSET = 1 << 4; // IOR high and put next address on bus\r
\r
- asm volatile ( "NOP" );\r
+ __asm volatile ( "NOP" );\r
GPIO_IOCLR = IOR; // IOR-signal low\r
- asm volatile ( "NOP" );\r
+ __asm volatile ( "NOP" );\r
value |= ((GPIO_IOPIN >> 8) & 0xff00); // get high order byte from data bus\r
GPIO_IOSET = IOR; // IOR-signal low\r
- \r
+\r
return value;\r
}\r
\r
GPIO_IOCLR = 0xf << 4; // Put address on bus\r
GPIO_IOSET = (addr+1) << 4;\r
\r
- asm volatile ( "NOP" );\r
+ __asm volatile ( "NOP" );\r
GPIO_IOCLR = IOR; // IOR-signal low\r
- asm volatile ( "NOP" );\r
+ __asm volatile ( "NOP" );\r
value = ((GPIO_IOPIN >> 8) & 0xff00); // get high order byte from data bus\r
GPIO_IOSET = IOR; // IOR-signal high\r
\r
GPIO_IOCLR = 1 << 4; // Put low address on bus\r
\r
- asm volatile ( "NOP" );\r
+ __asm volatile ( "NOP" );\r
GPIO_IOCLR = IOR; // IOR-signal low\r
- asm volatile ( "NOP" );\r
+ __asm volatile ( "NOP" );\r
value |= (GPIO_IOPIN >> 16) & 0xff; // get low order byte from data bus\r
GPIO_IOSET = IOR;\r
\r
GPIO_IOCLR = 0xff << 16; // Write low order byte to data bus\r
GPIO_IOSET = uip_buf[u] << 16; // write low order byte to data bus\r
\r
- asm volatile ( "NOP" );\r
+ __asm volatile ( "NOP" );\r
GPIO_IOCLR = IOW; // Toggle IOW-signal\r
- asm volatile ( "NOP" );\r
+ __asm volatile ( "NOP" );\r
GPIO_IOSET = IOW;\r
\r
GPIO_IOCLR = 0xf << 4; // Put address on bus\r
GPIO_IOCLR = 0xff << 16; // Write low order byte to data bus\r
GPIO_IOSET = uip_buf[u+1] << 16; // write low order byte to data bus\r
\r
- asm volatile ( "NOP" );\r
+ __asm volatile ( "NOP" );\r
GPIO_IOCLR = IOW; // Toggle IOW-signal\r
- asm volatile ( "NOP" );\r
+ __asm volatile ( "NOP" );\r
GPIO_IOSET = IOW;\r
}\r
\r
GPIO_IOCLR = 0xff << 16; // Write low order byte to data bus\r
GPIO_IOSET = uip_appdata[u] << 16; // write low order byte to data bus\r
\r
- asm volatile ( "NOP" );\r
+ __asm volatile ( "NOP" );\r
GPIO_IOCLR = IOW; // Toggle IOW-signal\r
- asm volatile ( "NOP" );\r
+ __asm volatile ( "NOP" );\r
GPIO_IOSET = IOW;\r
\r
GPIO_IOCLR = 0xf << 4; // Put address on bus\r
GPIO_IOCLR = 0xff << 16; // Write low order byte to data bus\r
GPIO_IOSET = uip_appdata[u+1] << 16; // write low order byte to data bus\r
\r
- asm volatile ( "NOP" );\r
+ __asm volatile ( "NOP" );\r
GPIO_IOCLR = IOW; // Toggle IOW-signal\r
- asm volatile ( "NOP" );\r
+ __asm volatile ( "NOP" );\r
GPIO_IOSET = IOW;\r
}\r
\r
GPIO_IODIR &= ~(0xff << 16);\r
\r
GPIO_IOCLR = 0xf << 4; // put address on bus\r
- GPIO_IOSET = RX_FRAME_PORT << 4; \r
+ GPIO_IOSET = RX_FRAME_PORT << 4;\r
\r
// Read bytes into uip_buf\r
u = 0;\r
\r
GPIO_IOCLR = IOR; // IOR-signal low\r
uip_buf[u] = GPIO_IOPIN >> 16; // get high order byte from data bus\r
- asm volatile ( "NOP" );\r
+ __asm volatile ( "NOP" );\r
GPIO_IOSET = IOR; // IOR-signal high\r
\r
GPIO_IOSET = 1 << 4; // put address on bus\r
\r
GPIO_IOCLR = IOR; // IOR-signal low\r
- asm volatile ( "NOP" );\r
+ __asm volatile ( "NOP" );\r
uip_buf[u+1] = GPIO_IOPIN >> 16; // get high order byte from data bus\r
GPIO_IOSET = IOR; // IOR-signal high\r
u += 2;\r