Sonoma (MAXREFDES14#) Code Documentation V01.00 Isolated EMP (Energy Measurement Processor)

- Main Page
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Macros Pages
Macros | Functions
menu.h File Reference
`#include "xbasic_types.h"`
`#include "stdio.h"`
`#include "MAXREFDES14.h"`

Go to the source code of this file.

## Macros
#define | MAIN_MENU 0
| // Menu state machine state
#define | MENU_REG_ADDR 1
| // Menu state machine state
#define | MENU_READ_REG 2
| // Menu state machine state
#define | MENU_WRITE_REG 3
| // Menu state machine state
#define | WAIT_KEYPRESS 6
| // Menu state machine state
#define | BASE_FUNCTION_STATE 10
| // Menu state machine state
#define | KEYPRESS_ARROW_UP 240
| Assign up-arrow an extended ascii code which won't be used elsewhere.
#define | KEYPRESS_ARROW_DOWN 241
| Assign up-arrow an extended ascii code which won't be used elsewhere.
#define | KEYPRESS_ARROW_LEFT 242
| Assign up-arrow an extended ascii code which won't be used elsewhere.
#define | KEYPRESS_ARROW_RIGHT 243
| Assign up-arrow an extended ascii code which won't be used elsewhere.
#define | KEYPRESS_END 244
| Assign up-arrow an extended ascii code which won't be used elsewhere.

## Functions
void | menu_cls ()
| Function to clear the screen via Hyperterminal.
void | menu_print_maxim_banner ()
| Print standard Maxim banner at top of Hyperterminal screen.
void | menu_print_maxim_banner_big ()
| Print large Maxim banner at top of Hyperterminal screen.
void | menu_print_prompt ()
| Print a standard prompt for keyboard input " > ".
u8 | menu_retrieve_keypress (u32 nUartAddress)
| Get a single keypress via Hyperterminal.
void | menu_print_main_menu ()
| Print the main menu listing choice of module to test.

## Detailed Description

          Project: Sonoma (MAXREFDES14#)
         Filename: menu.h
      Description: This module contains all the functions used to
                   generate the menus and menu options used to run the
                   MAXREFDES14# example firmware.

Revision History:
05-31-13 Rev 01.00 GL Initial Release

This code follows the following naming conventions:

char chPmodValue
char (array) sPmodString[16]
float fPmodValue
int nPmodValue
int (array) anPmodValue[16]
u16 uPmodValue
u16 (array) auPmodValue[16]
u8 uchPmodValue
u8 (array) auchPmodBuffer[16]
unsigned int unPmodValue
int * punPmodValue

Definition in file menu.h.

## Macro Definition Documentation

#define BASE_FUNCTION_STATE 10

// Menu state machine state

Definition at line 73 of file menu.h.

#define KEYPRESS_ARROW_DOWN 241

Assign up-arrow an extended ascii code which won't be used elsewhere.

Definition at line 76 of file menu.h.

#define KEYPRESS_ARROW_LEFT 242

Assign up-arrow an extended ascii code which won't be used elsewhere.

Definition at line 77 of file menu.h.

#define KEYPRESS_ARROW_RIGHT 243

Assign up-arrow an extended ascii code which won't be used elsewhere.

Definition at line 78 of file menu.h.

#define KEYPRESS_ARROW_UP 240

Assign up-arrow an extended ascii code which won't be used elsewhere.

Definition at line 75 of file menu.h.

#define KEYPRESS_END 244

Assign up-arrow an extended ascii code which won't be used elsewhere.

Definition at line 79 of file menu.h.

#define MAIN_MENU 0

// Menu state machine state

Definition at line 68 of file menu.h.

#define MENU_READ_REG 2

// Menu state machine state

Definition at line 70 of file menu.h.

#define MENU_REG_ADDR 1

// Menu state machine state

Definition at line 69 of file menu.h.

#define MENU_WRITE_REG 3

// Menu state machine state

Definition at line 71 of file menu.h.

#define WAIT_KEYPRESS 6

// Menu state machine state

Definition at line 72 of file menu.h.

## Function Documentation

void menu_cls | ( |  | ) |

Function to clear the screen via Hyperterminal.

Parameters

  None |

Return values

  None |

Definition at line 70 of file menu.c.

void menu_print_main_menu | ( |  | ) |

Print the main menu listing choice of module to test.

Details.

Return values

  None |

Definition at line 189 of file menu.c.

void menu_print_maxim_banner | ( |  | ) |

Print standard Maxim banner at top of Hyperterminal screen.

Parameters

  None |

Return values

  None |

Definition at line 84 of file menu.c.

void menu_print_maxim_banner_big | ( |  | ) |

Print large Maxim banner at top of Hyperterminal screen.

Parameters

  None |

Return values

  None |

Definition at line 108 of file menu.c.

void menu_print_prompt | ( |  | ) |

Print a standard prompt for keyboard input " > ".

Parameters

  None |

Return values

  None |

Definition at line 141 of file menu.c.

u8 menu_retrieve_keypress | ( | u32 | nUartAddress | ) |

Get a single keypress via Hyperterminal.

Details
  Returns ascii character corresponding to keypress with some preprocessing.
  Lower case "a"-"z" converted to uppercase "A"-"Z"

Parameters

  [in] | nUartAddress | - address of the UART peripheral in MicroBlaze memory map

Return values

  Character,partially | decoded.

Definition at line 167 of file menu.c.