【已解决】zigbee8285修改package.json問題
不管怎麽添加IO口配置,编译后config.h 内容还是一直不变,不知道这问题出现在哪里?
1.json
{
"fimwareInfo": {
"name": "switch1",
"description": "this is a project demo",
"version": "1.0.0",
"bv_version": "1.0",
"ic": "TLSR8258F1KET",
"ota_image_type":"0x1602",
"manufacture_id":"0x1002",
"model_id":"TS0001",
"pid": "dse8ogfy",
"manufacture_name": "TZ3000",
"module_name":"ZS3L_A"
},
"uartConfig": {
"uart_enable": "true",
"uart_num": 1,
"uart": [
{
"uart0_rx_port": "PORT_A",
"uart0_rx_pin": "PIN_0",
"uart0_rx_loc": "LOC_0",
"uart0_tx_port": "PORT_D",
"uart0_tx_pin": "PIN_7",
"uart0_tx_loc": "LOC_0",
"uart0_bandrate": 115200
}
]
},
"ioConfig": {
"led_enable": "true",
"led_num": 1,
"key_enable": "true",
"key_num": 2,
"power_enable": "true",
"power_num": 1,
"led": [
{
"led0_port": "PORT_B",
"led0_pin": "PIN_6",
"led0_mode": "GPIO_MODE_OUTPUT_PP",
"led0_out": "GPIO_DOUT_HIGH",
"led0_driver": "GPIO_DOUT_LOW"
}
],
"key": [
{
"key0_port": "PORT_C",
"key0_pin": "PIN_0",
"key0_mode": "GPIO_MODE_INPUT_PULL",
"key0_out": "GPIO_DOUT_HIGH",
"key0_driver": "GPIO_LEVEL_LOW"
},
{
"key1_port": "PORT_B",
"key1_pin": "PIN_7",
"key1_mode": "GPIO_MODE_INPUT_PULL",
"key1_out": "GPIO_DOUT_HIGH",
"key1_driver": "GPIO_LEVEL_LOW"
}
],
"power": [
{
"power0_port": "PORT_B",
"power0_pin": "PIN_5",
"power0_mode": "GPIO_MODE_OUTPUT_PP",
"power0_out": "GPIO_DOUT_LOW",
"power0_driver": "GPIO_DOUT_HIGH"
}
],
}
}
2.config.h
/**********************************************************************************/
/ Automatically-generated file. Do not edit! /
/**********************************************************************************/
#ifndef CONFIG_H
#define CONFIG_H
#include "tuya_zigbee_sdk.h"
/* firmware information! */
#define FIRMWARE_INFO "switch1_1.0.0"
#define FIRMWARE_NAME "switch1"
#define FIRMWARE_VER 0x40
#define PRODUCTOR_ID_PFEFIX "TZ3000"
#define IC "TLSR8258F1KET"
#define OTA_IMAGE_TYPE 0x1602
#define MODULE_NAME ZS3L_A
#define MODEL_ID "TS0001"
#define PRODUCTOR_ID "dse8ogfy"
/* uart config! */
#define UART_ENABLE true
#define UART_NUM 0x1
#define UART0_RX_PORT PORT_A
#define UART0_RX_PIN PIN_0
#define UART0_RX_LOC LOC_0
#define UART0_TX_PORT PORT_D
#define UART0_TX_PIN PIN_7
#define UART0_TX_LOC LOC_0
#define UART0_BANDRATE 115200
/* io config! /
/ led config! */
#define LED0_PORT PORT_B
#define LED0_PIN PIN_6
#define LED0_MODE GPIO_MODE_OUTPUT_PP
#define LED0_OUT GPIO_DOUT_HIGH
#define LED0_DRIVER GPIO_DOUT_LOW
/* io config! /
/ key config! */
#define KEY0_PORT PORT_C
#define KEY0_PIN PIN_0
#define KEY0_MODE GPIO_MODE_INPUT_PULL
#define KEY0_OUT GPIO_DOUT_HIGH
#define KEY0_DRIVER GPIO_LEVEL_LOW
#define KEY1_PORT PORT_B
#define KEY1_PIN PIN_7
#define KEY1_MODE GPIO_MODE_INPUT_PULL
#define KEY1_OUT GPIO_DOUT_HIGH
#define KEY1_DRIVER GPIO_LEVEL_LOW
#endif