gateway/User/start.c

65 lines
939 B
C

#include <start.h>
#include "inc/Android.h"
#include "inc/Flash.h"
#include "inc/UART.h"
#include <inc/communication_protocol.h>
#include <inc/thread.h>
#include "inc/uart_dev.h"
#include "inc/thread_communication.h"
/*
* @brief 硬件初始化函数
* @param
* @retval
*
*/
void hareware_init()
{
android_PowerCtrl_Init();
android_PowerKey_Init();
// android_PowerKey_Rest();
// rt_kprintf("\nandroid_PowerKey_Rest OK\n");
J4_PWR_Open();
// SPI_Flash_TEST();
}
/*
* @brief 线程初始化函数
* @param
* @retval
*
*/
void software_init()
{
uart_all_dev_init();
Send_mq_Init();
Recv_thread_Init();
Send_thread_Init();
// while (1) {
//// uart_dev_write(g_J4RS485_UART8_handle, "hello world\n", sizeof("hello world\n"));
// rt_thread_delay(1000);
// }
}
/*
* @brief 启动函数
* @param
* @retval
*
*/
void app_star()
{
hareware_init();
software_init();
}