работает слейв и мастер

This commit is contained in:
2026-05-28 03:20:13 +03:00
commit cbb571f124
191 changed files with 55316 additions and 0 deletions

34
App/zigbee_port.c Normal file
View File

@@ -0,0 +1,34 @@
#include "zigbee_port.h"
#include "app_zigbee.h"
/*
* Markdown note:
* - Keep STM32_WPAN / Zigbee Cluster Library calls in this adapter.
* - Master should create/open the network and receive reports.
* - Slave should join the network and send AppSlaveInputs_t payload.
*/
void ZigbeePort_Init(const AppZigbeeConfig_t *config, AppRole_t role)
{
(void)config;
(void)role;
}
void ZigbeePort_Process(void)
{
APP_ZIGBEE_Process();
}
ZigbeePortStatus_t ZigbeePort_SendSlaveInputs(const AppSlaveInputs_t *inputs)
{
const AppSlaveReport_t report = App_MakeSlaveReport(inputs);
App_DebugOnSlaveReportTx(&report);
return APP_ZIGBEE_SendSlaveReport(&report) ? ZIGBEE_PORT_OK : ZIGBEE_PORT_BUSY;
}
void ZigbeePort_OnSlaveReportReceived(const AppSlaveReport_t *report, uint32_t now_ms)
{
App_MasterAcceptReport(report, now_ms);
}