khamitkar.ravikant
Member level 4
- Joined
- Jul 15, 2008
- Messages
- 78
- Helped
- 6
- Reputation
- 12
- Reaction score
- 2
- Trophy points
- 1,288
- Location
- India
- Activity points
- 1,798
khamitkar.ravikant said:hi salma
thanks for asking i got the solution to some extent in which i am taking 16 bytes input from hyperterminal and
then using them.
but when i am trying to take input from file that is directly reading file from hyperterminal it is giving me some garbage read so
i am sure i will solve that problem in near future and
will come with great results.
i will update all status of my code and wil let u know about same to u. ok.
MY_LEDS_mWriteSlaveReg0(my_leds, 0, ~input);
/cygdrive/c/NewProj/NewProj.c:32: undefined reference to `MY_LEDS_mWriteSlaveReg0'
error: /cygdrive/c/NewProj/NewProj.c:32: undefined reference to `MY_LEDS_mWriteSlaveReg0'
#include "xparameters.h"
#include "xgpio.h"
#include "xutil.h"
//====================================================
int main (void)
{
int input;
XGpio my_leds;
while(1)
{
//reads from the Hyperterminal
input= XUartLite_RecvByte(XPAR_UARTLITE_0_BASEADDR);
//checks if the input is a value from 0 to 7
if ((input>= 0x30) && (input <= 0x37))
{
//prints the data read from the HyperTerminal
xil_printf("%c ", input);
//write the data to the LEDS
MY_LEDS_mWriteSlaveReg0(my_leds, 0, ~input);
}
else
//if the input is in valid ( not a value between 0 to 7) then prompt the user to enter a valid number
{
xil_printf("\n\rplease enter a VALID number to display on the leds (0 -> 7)\n\r");
}
}
}
http://vcag.ecen.okstate.edu/wiki/index.php/Creating_a_Driver_using_a_LED_peripheral
/cygdrive/c/LEDPeri/ledtest.c:3:19: error: myled.h: No such file or directory
deepamj said:hi
try to add the header file manually from projectdirectory\drivers\src\*.h.
i don't know whether it will be the correct method
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?