60 lines
711 B
C
60 lines
711 B
C
#include <start.h>
|
|
|
|
|
|
#include "inc/Android.h"
|
|
#include "inc/Flash.h"
|
|
#include "inc/UART.h"
|
|
|
|
#include <inc/communication_protocol.h>
|
|
#include "inc/Rs485.h"
|
|
#include "inc/uart_dev.h"
|
|
|
|
|
|
/*
|
|
* 硬件初始化函数
|
|
*
|
|
*
|
|
*/
|
|
void hareware_init()
|
|
{
|
|
android_PowerCtrl_Init();
|
|
android_PowerCtrl_Open();
|
|
|
|
// SPI_Flash_TEST();
|
|
|
|
// USARTx_SendStr(J5_0_USART, "This is a test data.\n");
|
|
|
|
|
|
|
|
}
|
|
|
|
/*
|
|
* 线程初始化函数
|
|
*
|
|
*
|
|
*/
|
|
void software_init()
|
|
{
|
|
uart_dev_init();
|
|
|
|
// uart_sendstr(g_J50RS485_USART3_handle, "This is a test data.\n");
|
|
USARTx_SendStr(USART3, "This is a test data.\n");
|
|
Rs485_thread_Init();
|
|
|
|
|
|
}
|
|
|
|
/*
|
|
* 启动函数
|
|
*
|
|
*
|
|
*/
|
|
void app_star()
|
|
{
|
|
hareware_init();
|
|
software_init();
|
|
}
|
|
|
|
|
|
|