1
0
mirror of https://github.com/Utyff/Zintercom.git synced 2026-01-12 09:17:41 +03:00
fixed the work of inputs and outputs on the target board (button and call)
implemented sleep mode in battery mode (end device)
power attributes are always advertised, (used only in battery mode)
implemented bind to another device (notify about a call to the intercom)
minor changes in the code (syntactic)
This commit is contained in:
lost
2021-01-15 17:13:14 +02:00
parent 0d076dfa6e
commit 8ac322e25f
6 changed files with 73 additions and 86 deletions

View File

@@ -4,7 +4,7 @@
#define TP2_LEGACY_ZC
// patch sdk
// #define ZDSECMGR_TC_ATTEMPT_DEFAULT_KEY TRUE
//#define ZDSECMGR_TC_ATTEMPT_DEFAULT_KEY TRUE
#define NWK_AUTO_POLL
#define MULTICAST_ENABLED FALSE
@@ -14,9 +14,10 @@
#define ZCL_BASIC
#define ZCL_IDENTIFY
#define ZCL_REPORTING_DEVICE
#define ZCL_ON_OFF
#define DISABLE_GREENPOWER_BASIC_PROXY
//#define BDB_FINDING_BINDING_CAPABILITY_ENABLED 1
#define BDB_FINDING_BINDING_CAPABILITY_ENABLED 1
#define BDB_REPORTING TRUE
@@ -25,73 +26,42 @@
#define ISR_KEYINTERRUPT
#define HAL_LED TRUE
#define HAL_LCD FALSE
#define BLINK_LEDS TRUE
// one of this boards
// #define HAL_BOARD_TARGET
// #define HAL_BOARD_CHDTECH_DEV
#if !defined(HAL_BOARD_TARGET) && !defined(HAL_BOARD_CHDTECH_DEV)
#error "Board type must be defined"
#endif
#ifdef ZIC_BATTERY_MODE
#define POWER_SAVING
#if defined( ZIC_BATTERY_MODE )
#define POWER_SAVING
#endif
#if defined(HAL_BOARD_TARGET)
#define HAL_KEY_P0_INPUT_PINS BV(1)
#define HAL_KEY_P0_INPUT_PINS_EDGE HAL_KEY_FALLING_EDGE
#if defined( HAL_BOARD_TARGET )
#define HAL_KEY_P0_INPUT_PINS BV(0)
#define HAL_KEY_P0_INPUT_PINS_EDGE HAL_KEY_RISING_EDGE
#define HAL_KEY_P2_INPUT_PINS BV(0)
#define HAL_KEY_P2_INPUT_PINS_EDGE HAL_KEY_FALLING_EDGE
//#define HAL_UART_DMA 1
//#define HAL_UART_ISR 0
#define INT_HEAP_LEN 2256
#elif defined(HAL_BOARD_CHDTECH_DEV)
#define HAL_UART_DMA 1
#define HAL_UART_ISR 2
#elif defined( HAL_BOARD_CHDTECH_DEV )
#define HAL_KEY_P0_INPUT_PINS BV(1)
#define HAL_KEY_P0_INPUT_PINS_EDGE HAL_KEY_FALLING_EDGE
#define HAL_KEY_P2_INPUT_PINS BV(0)
#define HAL_KEY_P2_INPUT_PINS_EDGE HAL_KEY_FALLING_EDGE
#define DO_DEBUG_UART
#define INT_HEAP_LEN 2060
#endif
#define FACTORY_RESET_HOLD_TIME_LONG 5000
#ifdef DO_DEBUG_UART
#if defined( DO_DEBUG_UART )
#define HAL_UART_ISR 2
#define HAL_UART TRUE
#define HAL_UART_DMA 1
#define INT_HEAP_LEN 2060
#endif
// #define INT_HEAP_LEN (2685 - 0x4B - 0xBB-0x50-0xae)
// #define HAL_UART TRUE
// #define HAL_UART_DMA 2
#define HAL_UART TRUE
//#define BME280_32BIT_ENABLE
//i2c bme280
//#define OCM_CLK_PORT 1
//#define OCM_CLK_PIN 6
//#define OCM_DATA_PORT 1
//#define OCM_DATA_PIN 7
//#define DS18B20_PORT 0
//#define TSENS_SBIT P0_0
//#define TSENS_BV BV(0)
//#define TSENS_DIR P0DIR
#include "hal_board_cfg.h"