#if defined(SYSTEM_MODULE_DBG)
/* Function prototypes */
-int db_help_cmd(char *, char*, char*, char*);
-int db_ldr_cmd(char*, char*, char*, char*);
-int db_str_cmd(char*, char*, char*, char*);
-int db_info_cmd(char*, char*, char*, char*);
-int db_usb_cmd(char*, char*, char*, char*);
-int db_intr_cmd(char*, char*, char*, char*);
+static int db_help_cmd(char *, char *, char *, char *);
+static int db_ldr_cmd(char *, char *, char *, char *);
+static int db_str_cmd(char *, char *, char *, char *);
+static int db_info_cmd(char *, char *, char *, char *);
+static int db_usb_cmd(char *, char *, char *, char *);
+static int db_intr_cmd(char *, char *, char *, char *);
-int db_cmd_starthtc(char* cmd, char* param1, char* param2, char* param3);
+static int db_cmd_starthtc(char *cmd, char *param1, char *param2, char *param3);
-int db_wdt_cmd(char* cmd, char* param1, char* param2, char* param3);
+static int db_wdt_cmd(char *cmd, char *param1, char *param2, char *param3);
#if defined(PROJECT_K2)
#if SYSTEM_MODULE_SFLASH
-int db_cmd_sferase(char* cmd, char* param1, char* param2, char* param3);
-int db_cmd_sfpg(char* cmd, char* param1, char* param2, char* param3);
-int db_cmd_sfru(char* cmd, char* param1, char* param2, char* param3);
-int db_cmd_sfrm(char* cmd, char* param1, char* param2, char* param3);
-int db_cmd_sfrdsr(char* cmd, char* param1, char* param2, char* param3);
+static int db_cmd_sferase(char *cmd, char *param1, char *param2, char *param3);
+static int db_cmd_sfpg(char *cmd, char *param1, char *param2, char *param3);
+static int db_cmd_sfru(char *cmd, char *param1, char *param2, char *param3);
+static int db_cmd_sfrm(char *cmd, char *param1, char *param2, char *param3);
+static int db_cmd_sfrdsr(char *cmd, char *param1, char *param2, char *param3);
#endif
#endif /* #if defined(PROJECT_K2) */
-int db_cmd_memcmp(char* cmd, char* param1, char* param2, char* param3);
-int db_cmd_memdump(char* cmd, char* param1, char* param2, char* param3);
+static int db_cmd_memcmp(char *cmd, char *param1, char *param2, char *param3);
+static int db_cmd_memdump(char *cmd, char *param1, char *param2, char *param3);
-int db_clock_cmd(char* cmd, char* param1, char* param2, char* param3);
+static int db_clock_cmd(char *cmd, char *param1, char *param2, char *param3);
-uint16_t db_get_cmd_line(uint8_t ch, char *cmd_line, uint16_t* i);
-int db_formalize_command(char*, char*);
-int db_ascii_to_hex(char*, unsigned long*);
-int db_hex_to_ascii(unsigned long, char*);
-void zfDebugTask(void);
+static uint16_t db_get_cmd_line(uint8_t ch, char *cmd_line, uint16_t *i);
+static int db_formalize_command(char *, char *);
+static int db_ascii_to_hex(char *, unsigned long *);
+static int db_hex_to_ascii(unsigned long, char *);
+static void zf_debug_task(void);
int db_info_intr(char* cmd, char* param1, char* param2, char* param3);
//////////////////////////////////////////////////
-void zfDebugInit(void)
+static void zf_debug_init(void)
{
uint8_t ch;
pressed_time = 0;
}
-void zfDebugTask(void)
+static void zf_debug_task(void)
{
int i;
uint8_t ch;
return;
}
-uint16_t db_get_cmd_line(uint8_t ch, char *cmd_line, uint16_t* i)
+static uint16_t db_get_cmd_line(uint8_t ch, char *cmd_line, uint16_t *i)
{
int cmd_buf_loc;
}
-int db_formalize_command(char* raw_str, char* cmd_str)
+static int db_formalize_command(char *raw_str, char *cmd_str)
{
int i = 0;
int j;
return (int)A_STRLEN(cmd_str);
}
-int db_ascii_to_hex(char* num_str, unsigned long* hex_num)
+static int db_ascii_to_hex(char *num_str, unsigned long *hex_num)
{
int i = 0;
return 0;
}
-int db_ascii_to_int(char* num_str, unsigned long* int_num)
+int db_ascii_to_int(char *num_str, unsigned long *int_num)
{
int i = 0;
return 0;
}
-int db_hex_to_ascii(unsigned long hex_num, char* num_str)
+static int db_hex_to_ascii(unsigned long hex_num, char *num_str)
{
int i;
unsigned long four_bits;
return 0;
}
-int db_help_cmd(char* cmd, char* param1, char* param2, char* param3)
+int db_help_cmd(char *cmd, char *param1, char *param2, char *param3)
{
int i;
return i;
}
-int db_ldr_cmd(char* cmd, char* param1, char* param2, char* param3)
+static int db_ldr_cmd(char *cmd, char *param1, char *param2, char *param3)
{
unsigned long val;
unsigned long addr;
}
}
-int db_str_cmd(char* cmd, char* param1, char* param2, char* param3)
+static int db_str_cmd(char *cmd, char *param1, char *param2, char *param3)
{
unsigned long val;
unsigned long addr;
uint32_t delay = 0;
-int db_intr_cmd(char* cmd, char* param1, char* param2, char* param3)
+static int db_intr_cmd(char *cmd, char *param1, char *param2, char *param3)
{
#if SYSTEM_MODULE_INTR
uint32_t pending_intrs;
uint32_t usb_swap_flag = 0; //default
uint32_t usb_swap_flag_changed = 0;
-int db_usb_cmd(char* cmd, char* param1, char* param2, char* param3)
+static int db_usb_cmd(char *cmd, char *param1, char *param2, char *param3)
{
A_PRINTF("THIS IS USB COMMAND\n\r");
}
-int db_clock_cmd(char* cmd, char* param1, char* param2, char* param3)
+static int db_clock_cmd(char *cmd, char *param1, char *param2, char *param3)
{
uint32_t ratio = 1;
uint32_t baud = 19200;
}
}
-int db_info_cmd(char* cmd, char* param1, char* param2, char* param3)
+static int db_info_cmd(char *cmd, char *param1, char *param2, char *param3)
{
#if 1
return 1;
}
-int db_cmd_starthtc(char* cmd, char* param1, char* param2, char* param3)
+static int db_cmd_starthtc(char *cmd, char *param1, char *param2, char *param3)
{
extern htc_handle_t htc_handle;
HTC_Ready(htc_handle);
extern uint16_t String20Descriptor[];
extern uint16_t String30Descriptor[];
-int db_wdt_cmd(char* cmd, char* param1, char* param2, char* param3)
+static int db_wdt_cmd(char *cmd, char *param1, char *param2, char *param3)
{
if ( strcmp(param1, "rst") == 0 )
{
#if defined(PROJECT_K2)
#if SYSTEM_MODULE_SFLASH
/* Serial Flash -> Chip Erase, Sector Erase, Block Erase */
-int db_cmd_sferase(char* cmd, char* param1, char* param2, char* param3)
+static int db_cmd_sferase(char *cmd, char *param1, char *param2, char *param3)
{
unsigned long addr;
}
/* Serial Flash -> Program */
-int db_cmd_sfpg(char* cmd, char* param1, char* param2, char* param3)
+static int db_cmd_sfpg(char *cmd, char *param1, char *param2, char *param3)
{
unsigned long addr, len, buf;
}
/* Serial Flash -> Read, Fast Read to UART */
-int db_cmd_sfru(char* cmd, char* param1, char* param2, char* param3)
+static int db_cmd_sfru(char *cmd, char *param1, char *param2, char *param3)
{
A_UINT32 i;
unsigned long addr1, addr2, t_addr;
}
/* Serial Flash -> Read, Fast Read to Memory */
-int db_cmd_sfrm(char* cmd, char* param1, char* param2, char* param3)
+static int db_cmd_sfrm(char *cmd, char *param1, char *param2, char *param3)
{
A_UINT32 i;
unsigned long addr1, addr2, t_addr;
}
/* Serial Flash -> Read Status Register */
-int db_cmd_sfrdsr(char* cmd, char* param1, char* param2, char* param3)
+static int db_cmd_sfrdsr(char *cmd, char *param1, char *param2, char *param3)
{
A_PRINTF("0x%02X\n\r", A_SFLASH_RDSR());
return 0;
#endif /* #if defined(PROJECT_K2) */
/* Memory Comparison */
-int db_cmd_memcmp(char* cmd, char* param1, char* param2, char* param3)
+static int db_cmd_memcmp(char *cmd, char *param1, char *param2, char *param3)
{
unsigned long addr1, addr2, len;
A_UINT8 *buf1, *buf2;
}
/* Memory Dump */
-int db_cmd_memdump(char* cmd, char* param1, char* param2, char* param3)
+static int db_cmd_memdump(char *cmd, char *param1, char *param2, char *param3)
{
A_UINT32 i;
unsigned long addr1, addr2, t_addr;
}
void cmnos_dbg_module_install(struct dbg_api *apis)
{
- apis->_dbg_init = zfDebugInit;
- apis->_dbg_task = zfDebugTask;
+ apis->_dbg_init = zf_debug_init;
+ apis->_dbg_task = zf_debug_task;
}
#endif /* SYSTEM_MODULE_DBG */