/*!
 * @file        main.c
 *
 * @brief       Main program body
 *
 * @version     V2.5
 *
 * @date        2024-08-08
 *
 * @attention
 *
 *  Copyright (C) 2020-2022 Geehy Semiconductor
 *
 *  You may not use this file except in compliance with the
 *  GEEHY COPYRIGHT NOTICE (GEEHY SOFTWARE PACKAGE LICENSE).
 *
 *  The program is only for reference, which is distributed in the hope
 *  that it will be useful and instructional for customers to develop
 *  their software. Unless required by applicable law or agreed to in
 *  writing, the program is distributed on an "AS IS" BASIS, WITHOUT
 *  ANY WARRANTY OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the GEEHY SOFTWARE PACKAGE LICENSE for the governing permissions
 *  and limitations under the License.
 */
#include "include.h"
#include "ble_client.h"
#include "hsuart_transfer.h"        /*Serial port*/

/*!
 * @brief       Main program,BlueTooth
 *  ble_rev:    gatt_callback_app()
 *  ble_send:   ble_send_packet()
 *
 *  spp_rev:    spp_rx_callback()
 *  spp_send:   bt_spp_tx()

 *  fot_data:    fot_data[]
 *  fot_flag:    fot_var.fot_recv_ok = 1;fot_var.data_pos = 0;
 *
 * @param       None
 *
 * @retval      None
 *
 */
int main(void)
{
    printf("Hello GW3323 BLE Host Test!\n");
    bsp_sys_init();                     /*System initialization*/
    bt_init();                          /*Open Bluetooth module*/
    bsp_bt_init();                      /*Bluetooth system configuration*/
    ble_enter_transmit();               //设置主频为160M,提升蓝牙速度

    my_hsuart_init(1500000);

    while (1)
    {
#if LE_ROLE_MASTER
        hsuart_transfer_example();
#endif // LE_ROLE_MASTER
    }
    return 0;
}
