2022-03-26 20:51:40 +08:00

136 lines
4.8 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/********************************** (C) COPYRIGHT *******************************
* File Name : CONFIG.h
* Author : WCH
* Version : V1.2
* Date : 2022/01/18
* Description : <20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>Ĭ<EFBFBD><C4AC>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԥ<EFBFBD><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ĵ<DEB8>ǰֵ
* Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd.
* SPDX-License-Identifier: Apache-2.0
*******************************************************************************/
/******************************************************************************/
#ifndef __CONFIG_H
#define __CONFIG_H
#define ID_CH583 0x83
#define CHIP_ID ID_CH583
#ifdef CH58xBLE_ROM
#include "CH58xBLE_ROM.H"
#else
#include "CH58xBLE_LIB.H"
#endif
#include "CH58x_common.h"
/*********************************************************************
<20><>MAC<41><43>
BLE_MAC - <20>Ƿ<EFBFBD><C7B7>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Mac<61><63>ַ ( Ĭ<><C4AC>:FALSE - ʹ<><CAB9>оƬMac<61><63>ַ )<29><><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA>main.c<>޸<EFBFBD>Mac<61><63>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD>
<20><>DCDC<44><43>
DCDC_ENABLE - <20>Ƿ<EFBFBD>ʹ<EFBFBD><CAB9>DCDC ( Ĭ<><C4AC>:FALSE )
<20><>SLEEP<45><50>
HAL_SLEEP - <20>Ƿ<EFBFBD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D><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ( Ĭ<><C4AC>:TRUE )
BLE_SNV_ADDR - SNV<4E><56>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7>ʹ<EFBFBD><CAB9>data flash<73><68><EFBFBD><EFBFBD>( Ĭ<><C4AC>:0x77E00 )
- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>SNVNum<75><6D><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA>Ӧ<EFBFBD>޸<EFBFBD>Lib_Write_Flash<73><68><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD><EFBFBD><EFBFBD>flash<73><68>С<EFBFBD><D0A1><EFBFBD><EFBFBD>СΪSNVBlock*SNVNum
<20><>RTC<54><43>
CLK_OSC32K - RTCʱ<43><CAB1>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD>ʹ<EFBFBD><CAB9><EFBFBD>ⲿ32K( Ĭ<><C4AC>:0 <20>ⲿ(32768Hz)<29><>1<EFBFBD><31><EFBFBD>ڲ<EFBFBD>(32000Hz)<29><>2<EFBFBD><32><EFBFBD>ڲ<EFBFBD>(32768Hz) )
<20><>MEMORY<52><59>
BLE_MEMHEAP_SIZE - <20><><EFBFBD><EFBFBD>Э<EFBFBD><D0AD>ջʹ<D5BB>õ<EFBFBD>RAM<41><4D>С<EFBFBD><D0A1><EFBFBD><EFBFBD>С<EFBFBD><D0A1>6K ( Ĭ<><C4AC>:(1024*6) )
<20><>DATA<54><41>
BLE_BUFF_MAX_LEN - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>( Ĭ<><C4AC>:27 (ATT_MTU=23)<29><>ȡֵ<C8A1><D6B5>Χ[27~251] )
BLE_BUFF_NUM - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>İ<EFBFBD><C4B0><EFBFBD><EFBFBD><EFBFBD>( Ĭ<><C4AC>:5 )
BLE_TX_NUM_EVENT - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Է<EFBFBD><D4B7><EFBFBD><EFBFBD>ٸ<EFBFBD><D9B8><EFBFBD><EFBFBD>ݰ<EFBFBD>( Ĭ<><C4AC>:1 )
BLE_TX_POWER - <20><><EFBFBD><EFBFBD><E4B9A6>( Ĭ<><C4AC>:LL_TX_POWEER_0_DBM (0dBm) )
<20><>MULTICONN<4E><4E>
PERIPHERAL_MAX_CONNECTION - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬʱ<CDAC><CAB1><EFBFBD><EFBFBD><EFBFBD>ٴӻ<D9B4><D3BB><EFBFBD>ɫ( Ĭ<><C4AC>:1 )
CENTRAL_MAX_CONNECTION - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬʱ<CDAC><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ( Ĭ<><C4AC>:3 )
**********************************************************************/
/*********************************************************************
* Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
*/
#ifndef BLE_MAC
#define BLE_MAC FALSE
#endif
#ifndef DCDC_ENABLE
#define DCDC_ENABLE FALSE
#endif
#ifndef HAL_SLEEP
#define HAL_SLEEP FALSE
#endif
#ifndef WAKE_UP_RTC_MAX_TIME
#define WAKE_UP_RTC_MAX_TIME 45
#endif
#ifndef HAL_KEY
#define HAL_KEY FALSE
#endif
#ifndef HAL_LED
#define HAL_LED FALSE
#endif
#ifndef TEM_SAMPLE
#define TEM_SAMPLE TRUE
#endif
#ifndef BLE_CALIBRATION_ENABLE
#define BLE_CALIBRATION_ENABLE TRUE
#endif
#ifndef BLE_CALIBRATION_PERIOD
#define BLE_CALIBRATION_PERIOD 120000
#endif
#ifndef BLE_SNV
#define BLE_SNV TRUE
#endif
#ifndef BLE_SNV_ADDR
#define BLE_SNV_ADDR 0x77E00-FLASH_ROM_MAX_SIZE
#endif
#ifndef CLK_OSC32K
#define CLK_OSC32K 0 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD><DAB4>޸ģ<DEB8><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԥ<EFBFBD><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ģ<DEB8><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD>ʹ<EFBFBD><CAB9><EFBFBD>ⲿ32K
#endif
#ifndef BLE_MEMHEAP_SIZE
#define BLE_MEMHEAP_SIZE (1024*6)
#endif
#ifndef BLE_BUFF_MAX_LEN
#define BLE_BUFF_MAX_LEN 27
#endif
#ifndef BLE_BUFF_NUM
#define BLE_BUFF_NUM 5
#endif
#ifndef BLE_TX_NUM_EVENT
#define BLE_TX_NUM_EVENT 1
#endif
#ifndef BLE_TX_POWER
#define BLE_TX_POWER LL_TX_POWEER_0_DBM
#endif
#ifndef PERIPHERAL_MAX_CONNECTION
#define PERIPHERAL_MAX_CONNECTION 1
#endif
#ifndef CENTRAL_MAX_CONNECTION
#define CENTRAL_MAX_CONNECTION 3
#endif
extern uint32_t MEM_BUF[BLE_MEMHEAP_SIZE / 4];
extern const uint8_t MacAddr[6];
#endif