Files
BLV_C1F_Module/BasicCode/Drive/BLE/multiCentral_main.c

54 lines
1.4 KiB
C
Raw Normal View History

/********************************** (C) COPYRIGHT *******************************
* File Name : main.c
* Author : WCH
* Version : V1.1
* Date : 2019/11/05
* Description :
*******************************************************************************/
/******************************************************************************/
/* ͷ<>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD> */
#include "CONFIG.h"
#include "CH57x_common.h"
#include "HAL.h"
#include "peripheral.h"
#include "multiCentral.h"
/*********************************************************************
* GLOBAL TYPEDEFS
*/
__align(4) u32 MEM_BUF[BLE_MEMHEAP_SIZE/4];
#if (defined (BLE_MAC)) && (BLE_MAC == TRUE)
u8C MacAddr[6] = {0x84,0xC2,0xE4,0x03,0x02,0x02};
#endif
/*******************************************************************************
* Function Name : main
* Description : <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* Input : None
* Output : None
* Return : None
*******************************************************************************/
int main( void )
{
#ifdef DEBUG
GPIOA_SetBits(bTXD1);
GPIOA_ModeCfg(bTXD1, GPIO_ModeOut_PP_5mA);
UART1_DefInit( );
#endif
PRINT("%s\n",VER_LIB);
CH57X_BLEInit( );
HAL_Init( );
GAPRole_PeripheralInit( );
GAPRole_CentralInit( );
Peripheral_Init( );
Central_Init( );
while(1){
TMOS_SystemProcess( );
}
}
/******************************** endfile @ main ******************************/