Hello, I have never used inline assemblly before so i don't know the calls or the structure. i have read other posts but am still pretty confused how to do it. I have come up with the following code to do a toggleled
#define LED_RED 0x01 /* Red Ethernet LED on the Freakin Board */ #define ETHLED 0xFA400000 /*BCSR0*/ void main (void) { int count; while (1) { count = 0; toggleled(LED_RED); while(count < 50*5000) /* (MHZ)*(Number of nanosecs) */ { ++count; } } }
void toggleled(unsigned char ledMask) { // insert inline assembly }
I am trying to write a small inline assembly program that just writes a "01" value into a register of address FA400000. Can anyone help me figure out the syntax/commands for this operation? I have no idea what so ever.
Thank you much.
Fahd