76 #include "xparameters.h"
83 #define MAJOR_REVISION 01
84 #define MINOR_REVISION 00
112 u8 uchReadWriteOption=0;
128 XUartLite_ResetFifos(&Uart);
132 XGpio_Initialize(&
g_xGpioLed, XPAR_LEDS_4BITS_DEVICE_ID);
133 XGpio_SetDataDirection(&
g_xGpioLed, 1, 0x00000000);
148 printf(
"Maxim Sonoma (MAXREFDES14#) for the LX9 MicroBoard\r\n");
175 xil_printf(
"%c\r\n\n",uchReadWriteOption);
176 uchReadWriteOption-=48;
177 if(uchReadWriteOption<=1)
181 }
while(uchReadWriteOption>1);
185 xil_printf(
"Enter the register address in HEX (e.g. 2B)\r\nor press ESC key to go back to the main menu: ");
188 for(uchCount=0; ; uchCount++)
191 xil_printf(
"%c",sRegInfo[uchCount]);
192 if(!(sRegInfo[uchCount]!=0x1B && sRegInfo[uchCount]!=0x0D))
195 if(sRegInfo[uchCount]==0x1B)
201 sRegInfo[uchCount]=
'\0';
202 if(uchReadWriteOption==0)
209 uchRegAddr =
htoi(sRegInfo);
211 xil_printf(
"\n%X\r\n\r\n",
read_reg(uchRegAddr));
219 uchRegAddr =
htoi(sRegInfo);
220 xil_printf(
"\r\nEnter the register value in HEX (e.g. ABCD12)\r\nor press ESC key to go back to the main menu: ");
221 for(uchCount=0; ; uchCount++)
224 xil_printf(
"%c",sRegInfo[uchCount]);
225 if(!(sRegInfo[uchCount]!=0x1B && sRegInfo[uchCount]!=0x0D))
228 if(sRegInfo[uchCount]==0x1B)
234 sRegInfo[uchCount]=
'\0';
235 uchRegValue =
htoi(sRegInfo);
237 xil_printf(
"\r\nRegister write complete\r\n");
243 xil_printf(
"Invalid Keypress, please try again\r\n");