I'm working with MircoBlaze_mcs core and implement simple GIO file from the tutorial but it gives error ( "xiomodule.h" No such file or directory )when I synthesize the project .
I find it in the API documentation in the SDK Project Explorer, under /BSP Documentation/iomodule_v1_00_a .
this is the tested code :
#include <stdio.h>
#include "platform.h"
#include "xparameters.h" // add
#include "xiomodule.h" // add
void print(char *str);
int main()
{
init_platform();
u32 data;
XIOModule gpi;
XIOModule gpo;
print("Reading switches and writing to LED port\n\r");
data = XIOModule_Initialize(&gpi, XPAR_IOMODULE_0_DEVICE_ID);
data = XIOModule_Start(&gpi);
data = XIOModule_Initialize(&gpo, XPAR_IOMODULE_0_DEVICE_ID);
data = XIOModule_Start(&gpo);
while (1)
{
data = XIOModule_DiscreteRead(&gpi, 1); // read switches (channel 1)
XIOModule_DiscreteWrite(&gpo, 1, data); // turn on LEDs (channel 1)
}
cleanup_platform();
return 0;
}