update 1.8
This commit is contained in:
@@ -0,0 +1,239 @@
|
||||
/********************************** (C) COPYRIGHT *******************************
|
||||
* File Name : peripheral.C
|
||||
* Author : WCH
|
||||
* Version : v1.0
|
||||
* Date : 2020/11/26
|
||||
* Description :
|
||||
*********************************************************************************
|
||||
* Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd.
|
||||
* Attention: This software (modified or not) and binary are used for
|
||||
* microcontroller manufactured by Nanjing Qinheng Microelectronics.
|
||||
*******************************************************************************/
|
||||
|
||||
/*********************************************************************
|
||||
* INCLUDES
|
||||
*/
|
||||
#include "CONFIG.h"
|
||||
#include "devinfoservice.h"
|
||||
#include "gattprofile.h"
|
||||
#include "peripheral.h"
|
||||
#include "app_uart.h"
|
||||
|
||||
/*********************************************************************
|
||||
* MACROS
|
||||
*/
|
||||
//The buffer length should be a power of 2
|
||||
#define APP_UART_TX_BUFFER_LENGTH 512U
|
||||
#define APP_UART_RX_BUFFER_LENGTH 2048U
|
||||
|
||||
/*********************************************************************
|
||||
* CONSTANTS
|
||||
*/
|
||||
|
||||
/*********************************************************************
|
||||
* TYPEDEFS
|
||||
*/
|
||||
|
||||
/*********************************************************************
|
||||
* GLOBAL VARIABLES
|
||||
*/
|
||||
uint8_t to_test_buffer[BLE_BUFF_MAX_LEN - 4 - 3];
|
||||
|
||||
app_drv_fifo_t app_uart_tx_fifo;
|
||||
app_drv_fifo_t app_uart_rx_fifo;
|
||||
|
||||
//interupt uart rx flag ,clear at main loop
|
||||
bool uart_rx_flag = false;
|
||||
|
||||
//for interrupt rx blcak hole ,when uart rx fifo full
|
||||
uint8_t for_uart_rx_black_hole = 0;
|
||||
|
||||
//fifo length less that MTU-3, retry times
|
||||
uint32_t uart_to_ble_send_evt_cnt = 0;
|
||||
|
||||
/*********************************************************************
|
||||
* EXTERNAL VARIABLES
|
||||
*/
|
||||
|
||||
/*********************************************************************
|
||||
* EXTERNAL FUNCTIONS
|
||||
*/
|
||||
|
||||
/*********************************************************************
|
||||
* LOCAL VARIABLES
|
||||
*/
|
||||
//
|
||||
|
||||
//The tx buffer and rx buffer for app_drv_fifo
|
||||
//length should be a power of 2
|
||||
static uint8_t app_uart_tx_buffer[APP_UART_TX_BUFFER_LENGTH] = {0};
|
||||
static uint8_t app_uart_rx_buffer[APP_UART_RX_BUFFER_LENGTH] = {0};
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
* LOCAL FUNCTIONS
|
||||
*/
|
||||
|
||||
/*********************************************************************
|
||||
* PROFILE CALLBACKS
|
||||
*/
|
||||
|
||||
/*********************************************************************
|
||||
* PUBLIC FUNCTIONS
|
||||
*/
|
||||
|
||||
/*********************************************************************
|
||||
* @fn app_uart_process
|
||||
*
|
||||
* @brief process uart data
|
||||
*
|
||||
* @return NULL
|
||||
*/
|
||||
void app_uart_process(void)
|
||||
{
|
||||
uint8_t data;
|
||||
__disable_irq();
|
||||
if(uart_rx_flag)
|
||||
{
|
||||
tmos_start_task(Peripheral_TaskID, UART_TO_BLE_SEND_EVT, 2);
|
||||
uart_rx_flag = false;
|
||||
}
|
||||
__enable_irq();
|
||||
|
||||
|
||||
while(app_drv_fifo_length(&app_uart_tx_fifo))
|
||||
{
|
||||
app_drv_fifo_read_to_same_addr(&app_uart_tx_fifo, (uint8_t *)&data, 1);
|
||||
USART_SendData(USART3, data);
|
||||
while(USART_GetFlagStatus(USART3, USART_FLAG_TXE) == RESET) /* waiting for sending finish */
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
/*********************************************************************
|
||||
* @fn app_uart_init
|
||||
*
|
||||
* @brief init uart
|
||||
*
|
||||
* @return NULL
|
||||
*/
|
||||
void app_uart_init()
|
||||
{
|
||||
//tx fifo and tx fifo
|
||||
//The buffer length should be a power of 2
|
||||
app_drv_fifo_init(&app_uart_tx_fifo, app_uart_tx_buffer, APP_UART_TX_BUFFER_LENGTH);
|
||||
app_drv_fifo_init(&app_uart_rx_fifo, app_uart_rx_buffer, APP_UART_RX_BUFFER_LENGTH);
|
||||
|
||||
GPIO_InitTypeDef GPIO_InitStructure = {0};
|
||||
USART_InitTypeDef USART_InitStructure = {0};
|
||||
NVIC_InitTypeDef NVIC_InitStructure = {0};
|
||||
|
||||
//uart3 init
|
||||
RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART3, ENABLE);
|
||||
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE);
|
||||
|
||||
/* USART3 TX-->B.10 RX-->B.11 */
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10;
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
|
||||
GPIO_Init(GPIOB, &GPIO_InitStructure);
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_11;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
|
||||
GPIO_Init(GPIOB, &GPIO_InitStructure);
|
||||
|
||||
USART_InitStructure.USART_BaudRate = 115200;
|
||||
USART_InitStructure.USART_WordLength = USART_WordLength_8b;
|
||||
USART_InitStructure.USART_StopBits = USART_StopBits_1;
|
||||
USART_InitStructure.USART_Parity = USART_Parity_No;
|
||||
USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None;
|
||||
USART_InitStructure.USART_Mode = USART_Mode_Tx | USART_Mode_Rx;
|
||||
|
||||
USART_Init(USART3, &USART_InitStructure);
|
||||
USART_ITConfig(USART3, USART_IT_RXNE, ENABLE);
|
||||
|
||||
NVIC_InitStructure.NVIC_IRQChannel = USART3_IRQn;
|
||||
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 2;
|
||||
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 2;
|
||||
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
|
||||
NVIC_Init(&NVIC_InitStructure);
|
||||
|
||||
USART_Cmd(USART3, ENABLE);
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* @fn app_uart_tx_data
|
||||
*
|
||||
* @brief app_uart_tx_data
|
||||
*
|
||||
* @return NULL
|
||||
*/
|
||||
void app_uart_tx_data(uint8_t *data, uint16_t length)
|
||||
{
|
||||
uint16_t write_length = length;
|
||||
app_drv_fifo_write(&app_uart_tx_fifo, data, &write_length);
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* @fn UART3_IRQHandler
|
||||
*
|
||||
* @brief Not every uart reception will end with a UART_II_RECV_TOUT
|
||||
* UART_II_RECV_TOUT can only be triggered when R8_UARTx_RFC is not 0
|
||||
* Here we cannot rely UART_II_RECV_TOUT as the end of a uart reception
|
||||
*
|
||||
* @return NULL
|
||||
*/
|
||||
__attribute__((interrupt("WCH-Interrupt-fast")))
|
||||
void USART3_IRQHandler(void)
|
||||
{
|
||||
uint16_t error;
|
||||
uint8_t data;
|
||||
if(USART_GetITStatus(USART3, USART_IT_RXNE) != RESET)
|
||||
{
|
||||
data = USART_ReceiveData(USART3);
|
||||
error = app_drv_fifo_write_from_same_addr(&app_uart_rx_fifo, (uint8_t *)&data, 1);
|
||||
if(error != APP_DRV_FIFO_RESULT_SUCCESS)
|
||||
{
|
||||
PRINT("APP_DRV_FIFO_RESULT_NOT_MEM\r\n");
|
||||
}
|
||||
uart_rx_flag = true;
|
||||
}
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* @fn on_bleuartServiceEvt
|
||||
*
|
||||
* @brief ble uart service callback handler
|
||||
*
|
||||
* @return NULL
|
||||
*/
|
||||
void on_bleuartServiceEvt(uint16_t connection_handle, ble_uart_evt_t *p_evt)
|
||||
{
|
||||
switch(p_evt->type)
|
||||
{
|
||||
case BLE_UART_EVT_TX_NOTI_DISABLED:
|
||||
PRINT("%02x:bleuart_EVT_TX_NOTI_DISABLED\r\n", connection_handle);
|
||||
break;
|
||||
case BLE_UART_EVT_TX_NOTI_ENABLED:
|
||||
PRINT("%02x:bleuart_EVT_TX_NOTI_ENABLED\r\n", connection_handle);
|
||||
break;
|
||||
case BLE_UART_EVT_BLE_DATA_RECIEVED:
|
||||
PRINT("BLE RX DATA len:%d\r\n", p_evt->data.length);
|
||||
|
||||
//for notify back test
|
||||
//to ble
|
||||
uint16_t to_write_length = p_evt->data.length;
|
||||
app_drv_fifo_write(&app_uart_rx_fifo, (uint8_t *)p_evt->data.p_data, &to_write_length);
|
||||
tmos_start_task(Peripheral_TaskID, UART_TO_BLE_SEND_EVT, 2);
|
||||
//end of nofify back test
|
||||
|
||||
//ble to uart
|
||||
app_uart_tx_data((uint8_t *)p_evt->data.p_data, p_evt->data.length);
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
*********************************************************************/
|
||||
@@ -22,7 +22,6 @@
|
||||
void NMI_Handler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
|
||||
void HardFault_Handler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
|
||||
void BB_IRQHandler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
|
||||
void LLE_IRQHandler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
|
||||
|
||||
/*********************************************************************
|
||||
* @fn NMI_Handler
|
||||
@@ -60,15 +59,3 @@ void BB_IRQHandler(void)
|
||||
{
|
||||
BB_IRQLibHandler();
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* @fn LLE_IRQHandler
|
||||
*
|
||||
* @brief LLE Interrupt for BLE.
|
||||
*
|
||||
* @return None
|
||||
*/
|
||||
void LLE_IRQHandler(void)
|
||||
{
|
||||
LLE_IRQLibHandler();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
/********************************** (C) COPYRIGHT *******************************
|
||||
* File Name : app_uart.h
|
||||
* Author : WCH
|
||||
* Version : V1.0
|
||||
* Date : 2018/12/11
|
||||
* Description :
|
||||
*********************************************************************************
|
||||
* Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd.
|
||||
* Attention: This software (modified or not) and binary are used for
|
||||
* microcontroller manufactured by Nanjing Qinheng Microelectronics.
|
||||
*******************************************************************************/
|
||||
|
||||
#ifndef app_uart_H
|
||||
#define app_uart_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*********************************************************************
|
||||
* INCLUDES
|
||||
*/
|
||||
|
||||
#include "app_drv_fifo.h"
|
||||
#include "ble_uart_service.h"
|
||||
|
||||
/*********************************************************************
|
||||
* CONSTANTS
|
||||
*/
|
||||
|
||||
extern uint8_t to_test_buffer[BLE_BUFF_MAX_LEN - 4 - 3];
|
||||
|
||||
extern app_drv_fifo_t app_uart_tx_fifo;
|
||||
extern app_drv_fifo_t app_uart_rx_fifo;
|
||||
|
||||
//interupt uart rx flag ,clear at main loop
|
||||
extern bool uart_rx_flag;
|
||||
|
||||
//for interrupt rx blcak hole ,when uart rx fifo full
|
||||
extern uint8_t for_uart_rx_black_hole;
|
||||
|
||||
//fifo length less that MTU-3, retry times
|
||||
extern uint32_t uart_to_ble_send_evt_cnt;
|
||||
|
||||
/*********************************************************************
|
||||
* MACROS
|
||||
*/
|
||||
|
||||
/*********************************************************************
|
||||
* FUNCTIONS
|
||||
*/
|
||||
|
||||
extern void app_uart_process(void);
|
||||
|
||||
extern void app_uart_init(void);
|
||||
|
||||
extern void on_bleuartServiceEvt(uint16_t connection_handle, ble_uart_evt_t *p_evt);
|
||||
|
||||
/*********************************************************************
|
||||
*********************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -43,6 +43,7 @@ typedef struct
|
||||
uint16_t connTimeout;
|
||||
} peripheralConnItem_t;
|
||||
|
||||
extern uint8_t Peripheral_TaskID;
|
||||
/*********************************************************************
|
||||
* FUNCTIONS
|
||||
*/
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/********************************** (C) COPYRIGHT *******************************
|
||||
* File Name : peripheral.C
|
||||
* Author : zhangxiyi @WCH
|
||||
* Version : v0.1
|
||||
* Author : WCH
|
||||
* Version : v1.0
|
||||
* Date : 2020/11/26
|
||||
* Description :
|
||||
*********************************************************************************
|
||||
@@ -17,157 +17,9 @@
|
||||
#include "devinfoservice.h"
|
||||
#include "gattprofile.h"
|
||||
#include "peripheral.h"
|
||||
|
||||
#include "ble_uart_service.h"
|
||||
#include "app_drv_fifo.h"
|
||||
|
||||
uint8_t Peripheral_TaskID = INVALID_TASK_ID; // Task ID for internal task/event processing
|
||||
|
||||
//
|
||||
static uint8_t to_test_buffer[BLE_BUFF_MAX_LEN - 4 - 3];
|
||||
|
||||
//The buffer length should be a power of 2
|
||||
#define APP_UART_TX_BUFFER_LENGTH 512U
|
||||
#define APP_UART_RX_BUFFER_LENGTH 2048U
|
||||
|
||||
//The tx buffer and rx buffer for app_drv_fifo
|
||||
//length should be a power of 2
|
||||
static uint8_t app_uart_tx_buffer[APP_UART_TX_BUFFER_LENGTH] = {0};
|
||||
static uint8_t app_uart_rx_buffer[APP_UART_RX_BUFFER_LENGTH] = {0};
|
||||
|
||||
static app_drv_fifo_t app_uart_tx_fifo;
|
||||
static app_drv_fifo_t app_uart_rx_fifo;
|
||||
|
||||
//interupt uart rx flag ,clear at main loop
|
||||
bool uart_rx_flag = false;
|
||||
|
||||
//for interrupt rx blcak hole ,when uart rx fifo full
|
||||
uint8_t for_uart_rx_black_hole = 0;
|
||||
|
||||
//fifo length less that MTU-3, retry times
|
||||
uint32_t uart_to_ble_send_evt_cnt = 0;
|
||||
|
||||
void app_uart_process(void)
|
||||
{
|
||||
uint8_t data;
|
||||
__disable_irq();
|
||||
if(uart_rx_flag)
|
||||
{
|
||||
tmos_start_task(Peripheral_TaskID, UART_TO_BLE_SEND_EVT, 2);
|
||||
uart_rx_flag = false;
|
||||
}
|
||||
__enable_irq();
|
||||
|
||||
|
||||
while(app_drv_fifo_length(&app_uart_tx_fifo))
|
||||
{
|
||||
app_drv_fifo_read_to_same_addr(&app_uart_tx_fifo, (uint8_t *)&data, 1);
|
||||
USART_SendData(USART3, data);
|
||||
while(USART_GetFlagStatus(USART3, USART_FLAG_TXE) == RESET) /* waiting for sending finish */
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void app_uart_init()
|
||||
{
|
||||
//tx fifo and tx fifo
|
||||
//The buffer length should be a power of 2
|
||||
app_drv_fifo_init(&app_uart_tx_fifo, app_uart_tx_buffer, APP_UART_TX_BUFFER_LENGTH);
|
||||
app_drv_fifo_init(&app_uart_rx_fifo, app_uart_rx_buffer, APP_UART_RX_BUFFER_LENGTH);
|
||||
|
||||
GPIO_InitTypeDef GPIO_InitStructure = {0};
|
||||
USART_InitTypeDef USART_InitStructure = {0};
|
||||
NVIC_InitTypeDef NVIC_InitStructure = {0};
|
||||
|
||||
//uart3 init
|
||||
RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART3, ENABLE);
|
||||
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE);
|
||||
|
||||
/* USART3 TX-->B.10 RX-->B.11 */
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10;
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
|
||||
GPIO_Init(GPIOB, &GPIO_InitStructure);
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_11;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
|
||||
GPIO_Init(GPIOB, &GPIO_InitStructure);
|
||||
|
||||
USART_InitStructure.USART_BaudRate = 115200;
|
||||
USART_InitStructure.USART_WordLength = USART_WordLength_8b;
|
||||
USART_InitStructure.USART_StopBits = USART_StopBits_1;
|
||||
USART_InitStructure.USART_Parity = USART_Parity_No;
|
||||
USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None;
|
||||
USART_InitStructure.USART_Mode = USART_Mode_Tx | USART_Mode_Rx;
|
||||
|
||||
USART_Init(USART3, &USART_InitStructure);
|
||||
USART_ITConfig(USART3, USART_IT_RXNE, ENABLE);
|
||||
|
||||
NVIC_InitStructure.NVIC_IRQChannel = USART3_IRQn;
|
||||
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 2;
|
||||
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 2;
|
||||
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
|
||||
NVIC_Init(&NVIC_InitStructure);
|
||||
|
||||
USART_Cmd(USART3, ENABLE);
|
||||
}
|
||||
|
||||
void app_uart_tx_data(uint8_t *data, uint16_t length)
|
||||
{
|
||||
uint16_t write_length = length;
|
||||
app_drv_fifo_write(&app_uart_tx_fifo, data, &write_length);
|
||||
}
|
||||
//
|
||||
//Not every uart reception will end with a UART_II_RECV_TOUT
|
||||
//UART_II_RECV_TOUT can only be triggered when R8_UARTx_RFC is not 0
|
||||
//Here we cannot rely UART_II_RECV_TOUT as the end of a uart reception
|
||||
|
||||
__attribute__((interrupt("WCH-Interrupt-fast")))
|
||||
void USART3_IRQHandler(void)
|
||||
{
|
||||
uint16_t error;
|
||||
uint8_t data;
|
||||
if(USART_GetITStatus(USART3, USART_IT_RXNE) != RESET)
|
||||
{
|
||||
data = USART_ReceiveData(USART3);
|
||||
error = app_drv_fifo_write_from_same_addr(&app_uart_rx_fifo, (uint8_t *)&data, 1);
|
||||
if(error != APP_DRV_FIFO_RESULT_SUCCESS)
|
||||
{
|
||||
PRINT("APP_DRV_FIFO_RESULT_NOT_MEM\r\n");
|
||||
}
|
||||
uart_rx_flag = true;
|
||||
}
|
||||
}
|
||||
|
||||
//ble uart service callback handler
|
||||
void on_bleuartServiceEvt(uint16_t connection_handle, ble_uart_evt_t *p_evt)
|
||||
{
|
||||
switch(p_evt->type)
|
||||
{
|
||||
case BLE_UART_EVT_TX_NOTI_DISABLED:
|
||||
PRINT("%02x:bleuart_EVT_TX_NOTI_DISABLED\r\n", connection_handle);
|
||||
break;
|
||||
case BLE_UART_EVT_TX_NOTI_ENABLED:
|
||||
PRINT("%02x:bleuart_EVT_TX_NOTI_ENABLED\r\n", connection_handle);
|
||||
break;
|
||||
case BLE_UART_EVT_BLE_DATA_RECIEVED:
|
||||
PRINT("BLE RX DATA len:%d\r\n", p_evt->data.length);
|
||||
|
||||
//for notify back test
|
||||
//to ble
|
||||
uint16_t to_write_length = p_evt->data.length;
|
||||
app_drv_fifo_write(&app_uart_rx_fifo, (uint8_t *)p_evt->data.p_data, &to_write_length);
|
||||
tmos_start_task(Peripheral_TaskID, UART_TO_BLE_SEND_EVT, 2);
|
||||
//end of nofify back test
|
||||
|
||||
//ble to uart
|
||||
app_uart_tx_data((uint8_t *)p_evt->data.p_data, p_evt->data.length);
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
#include "app_uart.h"
|
||||
|
||||
/*********************************************************************
|
||||
* MACROS
|
||||
@@ -216,6 +68,8 @@ void on_bleuartServiceEvt(uint16_t connection_handle, ble_uart_evt_t *p_evt)
|
||||
* GLOBAL VARIABLES
|
||||
*/
|
||||
|
||||
uint8_t Peripheral_TaskID = INVALID_TASK_ID; // Task ID for internal task/event processing
|
||||
|
||||
/*********************************************************************
|
||||
* EXTERNAL VARIABLES
|
||||
*/
|
||||
@@ -354,7 +208,7 @@ void Peripheral_Init()
|
||||
}
|
||||
|
||||
// Set the GAP Characteristics
|
||||
GGS_SetParameter(GGS_DEVICE_NAME_ATT, GAP_DEVICE_NAME_LEN, attDeviceName);
|
||||
GGS_SetParameter(GGS_DEVICE_NAME_ATT, sizeof(attDeviceName), attDeviceName);
|
||||
|
||||
// Set advertising interval
|
||||
{
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "HAL.h"
|
||||
#include "gattprofile.h"
|
||||
#include "peripheral.h"
|
||||
#include "app_uart.h"
|
||||
|
||||
/*********************************************************************
|
||||
* GLOBAL TYPEDEFS
|
||||
@@ -26,8 +27,6 @@ __attribute__((aligned(4))) u32 MEM_BUF[BLE_MEMHEAP_SIZE / 4];
|
||||
uint8_t const MacAddr[6] = {0x84, 0xC2, 0xE4, 0x03, 0x02, 0x02};
|
||||
#endif
|
||||
|
||||
extern void app_uart_process(void);
|
||||
extern void app_uart_init(void);
|
||||
|
||||
/*********************************************************************
|
||||
* @fn Main_Circulation
|
||||
@@ -56,6 +55,7 @@ void Main_Circulation(void)
|
||||
*******************************************************************************/
|
||||
int main(void)
|
||||
{
|
||||
SystemCoreClockUpdate();
|
||||
Delay_Init();
|
||||
#ifdef DEBUG
|
||||
USART_Printf_Init( 115200 );
|
||||
|
||||
Reference in New Issue
Block a user