From d70fa1b4a01ec253b800e9a32ee2c8a3c776ea9b Mon Sep 17 00:00:00 2001 From: Eugene Krasnikov Date: Mon, 18 Mar 2013 17:46:38 +0100 Subject: [PATCH] Change save_cmnos_printf type to function pointer save_cmnos_printf is always used as a function pointer and never as integer Signed-off-by: Eugene Krasnikov --- target_firmware/magpie_fw_dev/target/inc/k2/athos_api.h | 2 +- target_firmware/magpie_fw_dev/target/init/app_start.c | 4 ++-- target_firmware/magpie_fw_dev/target/init/init.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/target_firmware/magpie_fw_dev/target/inc/k2/athos_api.h b/target_firmware/magpie_fw_dev/target/inc/k2/athos_api.h index ed3ff66..01f75aa 100755 --- a/target_firmware/magpie_fw_dev/target/inc/k2/athos_api.h +++ b/target_firmware/magpie_fw_dev/target/inc/k2/athos_api.h @@ -56,7 +56,7 @@ /* ROM Patch API */ /* save the ROM printf function point */ -extern uint32_t save_cmnos_printf; +extern int (* save_cmnos_printf)(const char * fmt, ...); extern unsigned int _data_start_in_rom; extern unsigned int _data_start; diff --git a/target_firmware/magpie_fw_dev/target/init/app_start.c b/target_firmware/magpie_fw_dev/target/init/app_start.c index 64552aa..136f966 100644 --- a/target_firmware/magpie_fw_dev/target/init/app_start.c +++ b/target_firmware/magpie_fw_dev/target/init/app_start.c @@ -128,13 +128,13 @@ void app_start() A_PRINTF(" A_WDT_INIT()\n\r"); #if defined(PROJECT_K2) - save_cmnos_printf = (uint32_t) fw_cmnos_printf; + save_cmnos_printf = fw_cmnos_printf; #endif if( hostif == HIF_USB ) { #if defined(PROJECT_K2) #if MOVE_PRINT_TO_RAM - save_cmnos_printf = (uint32_t) _indir_tbl.cmnos.printf._printf; + save_cmnos_printf = _indir_tbl.cmnos.printf._printf; _indir_tbl.cmnos.printf._printf = fw_cmnos_printf; #endif _indir_tbl.cmnos.usb._usb_fw_task = _fw_usb_fw_task; diff --git a/target_firmware/magpie_fw_dev/target/init/init.c b/target_firmware/magpie_fw_dev/target/init/init.c index b32661e..54885b2 100755 --- a/target_firmware/magpie_fw_dev/target/init/init.c +++ b/target_firmware/magpie_fw_dev/target/init/init.c @@ -60,7 +60,7 @@ uint32_t idle_cnt = 0; #if defined(PROJECT_K2) // save the ROM printf function point -uint32_t save_cmnos_printf; +int (* save_cmnos_printf)(const char * fmt, ...); #endif #define ATH_DATE_STRING __DATE__" "__TIME__ -- 2.25.1