/*
 * Copyright (c) 2022 Nordic Semiconductor ASA
 *
 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
 */

#include <zephyr/kernel.h>
#include <zephyr/shell/shell.h>
#include <zephyr/shell/shell_rtt.h>

int main(void)
{
	printk("RTT shell environment setup test\n");

    const struct shell *shell = shell_backend_rtt_get_ptr();

    if (!shell_ready(shell)) {
        printk("Shell is not ready!\n");
        return;
    }

    // shell_execute_cmd(shell, "wifi_radio_test tx_pkt_preamble 1");
    // shell_execute_cmd(shell, "wifi_radio_test tx_pkt_rate 6");
    // shell_execute_cmd(shell, "wifi_radio_test phy_calib_rxdc 1");
    // shell_execute_cmd(shell, "wifi_radio_test phy_calib_txdc 1");
    // shell_execute_cmd(shell, "wifi_radio_test phy_calib_rxiq 1");
    // shell_execute_cmd(shell, "wifi_radio_test phy_calib_txiq 1");
    // shell_execute_cmd(shell, "wifi_radio_test tx_pkt_num -1");
    // shell_execute_cmd(shell, "wifi_radio_test tx_pkt_len 1400");
    // shell_execute_cmd(shell, "wifi_radio_test tx_power 30");
    // shell_execute_cmd(shell, "wifi_radio_test he_ltf 2");
    // shell_execute_cmd(shell, "wifi_radio_test he_gi 2");
    // shell_execute_cmd(shell, "wifi_radio_test xo_val 40");
    // shell_execute_cmd(shell, "wifi_radio_test init 1");
    // shell_execute_cmd(shell, "wifi_radio_test tx_pkt_cw 15");

    // shell_execute_cmd(shell, "wifi_radio_ficr_prog otp_write_params 0x120 0x0036CEF4 0x5A23");
    // shell_execute_cmd(shell, "wifi_radio_ficr_prog otp_write_params 0x128 0x0036CEF4 0x5A23");
    // shell_execute_cmd(shell, "wifi_radio_ficr_prog otp_write_params 0x130 0x28");
    // shell_execute_cmd(shell, "wifi_radio_ficr_prog otp_get_status");
    shell_execute_cmd(shell, "wifi_radio_test show_config");
    // shell_execute_cmd(shell, "wifi_radio_ficr_prog otp_read_params");
    printk("Commands executed successfully.\n");

    while (1) {
        k_sleep(K_SECONDS(1));
    }
}
