X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;ds=sidebyside;f=carlfw%2Fsrc%2Fmain.c;h=f62e5ee7b6ce612a1c786ebf4a049fe990e76c53;hb=bc1a720197add99d877e4099a4ad272aec88b74f;hp=a9a1306b4693b2fed2ced3c9e95e066b8ac5d484;hpb=1dbab55a460484fd655c44c99fc192b9e3702485;p=carl9170fw.git diff --git a/carlfw/src/main.c b/carlfw/src/main.c index a9a1306..f62e5ee 100644 --- a/carlfw/src/main.c +++ b/carlfw/src/main.c @@ -86,8 +86,6 @@ static void handle_fw(void) static void __attribute__((noreturn)) main_loop(void) { - clock_set(true, AHB_40MHZ_OSC); - /* main loop */ while (1) { handle_fw(); @@ -120,6 +118,8 @@ static void __attribute__((noreturn)) main_loop(void) void __attribute__((noreturn)) start(void) { + clock_set(true, AHB_40MHZ_OSC); + /* initialize firmware context and DMA memory */ memset(&fw, 0, sizeof(fw)); @@ -149,5 +149,10 @@ void __attribute__((noreturn)) start(void) " ~`!1@2#3$4%%5^6&7*8(9)0_-+={[}]|\\:;\"'<,>.?/"); #endif /* CONFIG_CARL9170FW_DEBUG */ + /* + * Tell the host, that the firmware has booted and is + * now ready to process requests. + */ + send_cmd_to_host(0, CARL9170_RSP_BOOT, 0x00, NULL); main_loop(); }