中级
20 分钟

使用WIRL-PRO2和STM32F302VC将Wirepas Mesh无线连接堆栈集成到您的应用中

Wirepas Click 立刻行动!

Wirepas Click with CLICKER 4 for STM32F302VCT6

已发布 7月 22, 2025

点击板

Wirepas Click

开发板

CLICKER 4 for STM32F302VCT6

编译器

NECTO Studio

微控制器单元

STM32F302VC

您的网关可以创建坚固的、自愈的和节能的网状网络,适用于智能照明、资产追踪等应用!

A

A

硬件概览

它是如何工作的?

Wirepas Click 基于 Würth Elektronik 的 WIRL-PRO2 Thetis-I,这是一款带有 Wirepas Mesh 协议的无线电模块。该模块旨在集成到基于 Wirepas 的路由网络中,用于设备或节点之间的无线通信。该模块在全球可用的免许可 2.4 GHz 频段内安全可靠地传输数据,具有认证和加密机制。WIRL-PRO2 Thetis-I 模块具有与 nano-SIM 卡相当的小尺寸(8 mm x 12 mm),包括板载 PCB 天线,使其非常适合小型设计。该模块工作在 2402 到 2480MHz 的频率范围内,数据速率高达 1Mbps。它基于 Nordic 

Semiconductor 的 32 位 ARM Cortex-M4 微控制器 nRF52840,配有 1MB 闪存和 256KB RAM。它具有印刷天线和智能天线配置(2 合 1 模块),允许高达 +6dBm 的发射功率和 -92dBm 的灵敏度。通过连接到板载 N.FL 连接器的外部天线,连接性能可以更好。由于其非常低的功耗,Wirepas Click 可以作为信标使用。为此,它配备了一个备用电池。此外,还有两个用户可配置的指示 LED,LED1 和 LED2(蓝色和绿色)。此外,Wirepas Click 还配备了一个未焊接的调试头,用于与 Wirepas 微控制器进行直接

通信。Wirepas Click 使用标准的 2 线 UART 接口与主 MCU 通信,支持 115200bps 的比特率。您可以通过 RST 引脚重置设备。DIN 引脚用于观察数据流,当处于低电平逻辑状态时,它是指向主 MCU 的数据指示。此 Click board™ 只能在 3.3V 逻辑电压水平下运行。使用具有不同逻辑电平的 MCU 之前,板必须进行适当的逻辑电压水平转换。此外,这款 Click board™ 配备了包含易于使用的功能和示例代码的库,可用于进一步开发。

Wirepas Click hardware overview image

功能概述

开发板

Clicker 4 for STM32F3 是一款紧凑型开发板,作为完整的解决方案而设计,可帮助用户快速构建具备独特功能的定制设备。该板搭载 STMicroelectronics 的 STM32F302VCT6 微控制器,配备四个 mikroBUS™ 插槽用于连接 Click boards™、完善的电源管理功能以及其他实用资源,是快速开发各类应用的理想平台。其核心 MCU STM32F302VCT6 基于高性能 

Arm® Cortex®-M4 32 位处理器,运行频率高达 168MHz,处理能力强大,能够满足各种高复杂度任务的需求,使 Clicker 4 能灵活适应多种应用场景。除了两个 1x20 引脚排针外,板载最显著的连接特性是四个增强型 mikroBUS™ 插槽,支持接入数量庞大的 Click boards™ 生态系统,该生态每日持续扩展。Clicker 4 各功能区域标识清晰,界面直观简洁,极大

提升使用便捷性和开发效率。Clicker 4 的价值不仅在于加速原型开发与应用构建阶段,更在于其作为独立完整方案可直接集成至实际项目中,无需额外硬件修改。四角各设有直径 4.2mm(0.165")的安装孔,便于通过螺丝轻松固定。对于多数应用,只需配套一个外壳,即可将 Clicker 4 开发板转化为完整、实用且外观精美的定制系统。

CLICKER 4 for STM32F302VCT6 double image

微控制器概述 

MCU卡片 / MCU

STM32F302VC Image

建筑

ARM Cortex-M4

MCU 内存 (KB)

256

硅供应商

STMicroelectronics

引脚数

100

RAM (字节)

40960

使用的MCU引脚

mikroBUS™映射器

NC
NC
AN
Reset
PC15
RST
ID COMM
PA4
CS
NC
NC
SCK
NC
NC
MISO
NC
NC
MOSI
Power Supply
3.3V
3.3V
Ground
GND
GND
NC
NC
PWM
Data Indication
PD0
INT
UART TX
PA2
TX
UART RX
PA3
RX
NC
NC
SCL
NC
NC
SDA
NC
NC
5V
Ground
GND
GND
1

“仔细看看!”

Click board™ 原理图

Wirepas Click Schematic schematic

一步一步来

项目组装

PIC32MZ MXS Data Capture Board front image hardware assembly

从选择您的开发板和Click板™开始。以CLICKER 4 for STM32F302VCT6作为您的开发板开始。

PIC32MZ MXS Data Capture Board front image hardware assembly
Thermo 21 Click front image hardware assembly
Board mapper by product6 hardware assembly
Necto image step 2 hardware assembly
Necto image step 3 hardware assembly
Necto image step 4 hardware assembly
Necto image step 5 hardware assembly
Necto image step 6 hardware assembly
PIC32MZ MXS Data Capture Board NECTO MCU Selection Step hardware assembly
Necto No Display image step 8 hardware assembly
Necto image step 9 hardware assembly
Necto image step 10 hardware assembly
Necto image step 11 hardware assembly

软件支持

库描述

该库包含 Wirepas Click 驱动程序的 API。

关键功能:

  • wirepas_send_command - Wirepas 发送命令功能。

  • wirepas_write_csap_attribute - Wirepas 写入 CSAP 属性功能。

  • wirepas_send_data - Wirepas 发送数据功能。

开源

代码示例

完整的应用程序代码和一个现成的项目可以通过NECTO Studio包管理器直接安装到NECTO Studio 应用程序代码也可以在MIKROE的GitHub账户中找到。

/*!
 * @file main.c
 * @brief Wirepas Click Example.
 *
 * # Description
 * This example demonstrates the use of Wirepas Click board by processing
 * the incoming data and displaying them on the USB UART in sink mode, and sending data to 
 * the sinks in router mode.
 *
 * The demo application is composed of two sections :
 *
 * ## Application Init
 * Initializes the driver and performs the Click default configuration, setting device mode, node,
 * net and channel addresses, and starting stack.
 *
 * ## Application Task
 * Router mode - Sending data to the sinks at the same network.
 * Sink mode - Reads and processes all incoming data and displays them on the USB UART.
 *
 * ## Additional Function
 * - err_t wirepas_wait_response ( wirepas_t *ctx, uint8_t primitive_id )
 * - err_t wirepas_parse_frame ( wirepas_t *ctx, uint8_t primitive_id )
 * - err_t wirepas_poll_indication ( wirepas_t *ctx )
 *
 * @note
 * For the best experience use two Clicks in sink mode and one in router.
 *
 * @author Stefan Ilic
 *
 */

#include "board.h"
#include "log.h"
#include "wirepas.h"

#define PROCESS_BUFFER_SIZE 300
#define TX_DATA             "Wirepas Click"

#define MULTI_SINK_MODE     // Comment out this macro to place device into single sink mode.

/**
* @brief Wirepas node addresses.
 * @details Specified setting for node addresses of Wirepas Click driver.
 */
#define ROUTER_NODE_ADDRESS         0x01
#define SINK_1_NODE_ADDRESS         0x02
#define SINK_2_NODE_ADDRESS         0x03
#define NET_ADDRESS                 0x01
#define CHANNEL_ADDRESS             0x01

#define NODE_ADDRESS                ROUTER_NODE_ADDRESS    /* Change the value of this macro to change 
                                                              node address, each node should have a unique address */

static wirepas_t wirepas;
static log_t logger;
uint8_t frame_id = 0;
uint8_t stack_auto_start = 1;
uint8_t pdu_capacity = 0x10;
wirepas_sink_data sink_1;
wirepas_sink_data sink_2;

/**
 * @brief Wirepas wait response function.
 * @details This function is used to get response from the device. 
 * @param[in] ctx : Click context object.
 * See #wirepas_t object definition for detailed explanation.
 * @param[in] primitive_id : Expected Primitive ID.
 * @return @li @c >=0 - Success,
 *         @li @c  <0 - Error.
 * See #err_t definition for detailed explanation.
 * @note None.
 */
err_t wirepas_wait_response ( wirepas_t *ctx, uint8_t primitive_id );

/**
 * @brief Wirepas parse frame function.
 * @details This function is used to parse frame response from the device. 
 * @param[in] ctx : Click context object.
 * See #wirepas_t object definition for detailed explanation.
 * @param[in] primitive_id : Expected Primitive ID.
 * @return @li @c >=0 - Success,
 *         @li @c  <0 - Error.
 * See #err_t definition for detailed explanation.
 * @note None.
 */
err_t wirepas_parse_frame ( wirepas_t *ctx, uint8_t primitive_id );

/**
 * @brief Wirepas send poll indication function function.
 * @details This function is used to send poll indication, 
 * and get response from the device. 
 * @param[in] ctx : Click context object.
 * See #wirepas_t object definition for detailed explanation.
 * @param[in] primitive_id : Expected Primitive ID.
 * @return @li @c >=0 - Success,
 *         @li @c  <0 - Error.
 * See #err_t definition for detailed explanation.
 * @note None.
 */
err_t wirepas_poll_indication ( wirepas_t *ctx );

void application_init ( void ) 
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    wirepas_cfg_t wirepas_cfg;  /**< Click config object. */

    /** 
     * Logger initialization.
     * Default baud rate: 115200
     * Default log level: LOG_LEVEL_DEBUG
     * @note If USB_UART_RX and USB_UART_TX 
     * are defined as HAL_PIN_NC, you will 
     * need to define them manually for log to work. 
     * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
     */
    LOG_MAP_USB_UART( log_cfg );
    log_init( &logger, &log_cfg );
    log_info( &logger, " Application Init " );

    // Click initialization.
    wirepas_cfg_setup( &wirepas_cfg );
    WIREPAS_MAP_MIKROBUS( wirepas_cfg, MIKROBUS_1 );
    if ( UART_ERROR == wirepas_init( &wirepas, &wirepas_cfg ) ) 
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }
    
    wirepas_default_cfg ( &wirepas );
   
    wirepas.tx_frame_id = 0;
    do
    {
        log_printf( &logger, " Wirepas stack stop request:" );
        wirepas_send_command( &wirepas, WIREPAS_MSAP_STACK_STOP_REQUEST, 0, NULL );
    }
    while ( WIREPAS_OK != wirepas_wait_response ( &wirepas, WIREPAS_MSAP_STACK_STOP_CONFIRM ) );
    Delay_ms ( 1000 );
    
    do
    {
        log_printf( &logger, " Wirepas factory reset request:" );
        wirepas_send_command( &wirepas, WIREPAS_CSAP_FACTORY_RESET_REQUEST,
                              strlen( WIREPAS_FACTORY_RESET_CODE ), WIREPAS_FACTORY_RESET_CODE );
    }
    while ( WIREPAS_OK != wirepas_wait_response ( &wirepas, WIREPAS_CSAP_FACTORY_RESET_CONFIRM ) );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );

    do
    {
        log_printf( &logger, " Set node address:" );
        wirepas_set_node_address( &wirepas, NODE_ADDRESS );
    }
    while ( WIREPAS_OK != wirepas_wait_response ( &wirepas, WIREPAS_CSAP_ATTRIBUTE_WRITE_CONFIRM ) );
    Delay_ms ( 1000 );
    
    do
    {
        log_printf( &logger, " Set net address:" );
        wirepas_set_net_address( &wirepas, NET_ADDRESS );
    }
    while ( WIREPAS_OK != wirepas_wait_response ( &wirepas, WIREPAS_CSAP_ATTRIBUTE_WRITE_CONFIRM ) );
    Delay_ms ( 1000 );
    
    uint8_t channel_net = CHANNEL_ADDRESS;
    do
    {
        log_printf( &logger, " Set channel address:" );
        wirepas_write_csap_attribute( &wirepas, WIREPAS_CSAP_ATTRIBUTE_NETWORK_CHANNEL, 1, &channel_net );
    }
    while ( WIREPAS_OK != wirepas_wait_response ( &wirepas, WIREPAS_CSAP_ATTRIBUTE_WRITE_CONFIRM ) );
    Delay_ms ( 1000 );


    uint8_t role;
#if ( ROUTER_NODE_ADDRESS == NODE_ADDRESS )
    role = WIREPAS_ROUTER_NODE_MODE;
#else
    role = WIREPAS_SINK_NODE_MODE;
#endif
    do
    {
        log_printf( &logger, " Set role:" );
        wirepas_write_csap_attribute( &wirepas, WIREPAS_CSAP_ATTRIBUTE_NODE_ROLE, 1, &role );
    }
    while ( WIREPAS_OK != wirepas_wait_response ( &wirepas, WIREPAS_CSAP_ATTRIBUTE_WRITE_CONFIRM ) );
    Delay_1sec( );
    
    do
    {
        log_printf( &logger, " Wirepas Stack start request:" ); 
        wirepas_send_command( &wirepas, WIREPAS_MSAP_STACK_START_REQUEST, 1, &stack_auto_start );
    }
    while ( WIREPAS_OK != wirepas_wait_response ( &wirepas, WIREPAS_MSAP_STACK_START_CONFIRM ) );
    Delay_1sec( );
        
#if ( ROUTER_NODE_ADDRESS == NODE_ADDRESS )

    sink_1.pduid = 0x00;
    sink_1.source_endpoint = 0x01;
    sink_1.destination_addr = SINK_1_NODE_ADDRESS;
    sink_1.destination_endpoint = 0x01;
    #if defined MULTI_SINK_MODE
        sink_2.pduid = 0x00;
        sink_2.source_endpoint = 0x01;
        sink_2.destination_addr = SINK_2_NODE_ADDRESS;
        sink_2.destination_endpoint = 0x01;
    #endif
#endif
    Delay_ms ( 100 );
    
    log_info( &logger, " Application Task " );
}

void application_task ( void ) 
{
    wirepas_poll_indication ( &wirepas );
#if ( ROUTER_NODE_ADDRESS == NODE_ADDRESS )
    if ( wirepas_get_din_state ( &wirepas ) && ( pdu_capacity > 0 ) )
    {
        log_printf( &logger, " Sending data to the first Sink node: \n" );
        wirepas_send_data ( &wirepas,  sink_1, 0x01, strlen( TX_DATA ), TX_DATA );
        wirepas_wait_response ( &wirepas, WIREPAS_DSAP_DATA_TX_CONFIRM );
        Delay_ms ( 1000 );
        
        #if defined MULTI_SINK_MODE
            log_printf( &logger, " Sending data to the second Sink node: \n" );
            wirepas_send_data ( &wirepas,  sink_2, 0x01, strlen( TX_DATA ), TX_DATA );
            wirepas_wait_response ( &wirepas, WIREPAS_DSAP_DATA_TX_CONFIRM );
            Delay_ms ( 1000 );
        #endif
    }
#endif
}

int main ( void ) 
{
    /* Do not remove this line or clock might not be set correctly. */
    #ifdef PREINIT_SUPPORTED
    preinit();
    #endif
    
    application_init( );
    
    for ( ; ; ) 
    {
        application_task( );
    }

    return 0;
}

err_t wirepas_wait_response ( wirepas_t *ctx, uint8_t primitive_id )
{
    for ( uint8_t cnt = 0; cnt < 5; cnt++ )
    {
        if ( WIREPAS_OK == wirepas_parse_frame ( ctx, primitive_id ) )
        {
            return WIREPAS_OK;
        }
    }
    return WIREPAS_ERROR;
}

err_t wirepas_parse_frame ( wirepas_t *ctx, uint8_t primitive_id )
{
    err_t error_flag = wirepas_read_frame ( ctx, &ctx->frame );
    if ( WIREPAS_OK == error_flag )
    {
        if ( ( primitive_id != ctx->frame.primitive_id ) && ( 0 != primitive_id ) )
        {
            error_flag |= WIREPAS_ERROR;
        }
        switch ( ctx->frame.primitive_id )
        {
            case WIREPAS_MSAP_STACK_STOP_CONFIRM:
            case WIREPAS_MSAP_STACK_START_CONFIRM:
            case WIREPAS_CSAP_FACTORY_RESET_CONFIRM:
            case WIREPAS_CSAP_ATTRIBUTE_WRITE_CONFIRM:
            {
                if ( 0 == ctx->frame.payload[ 0 ] )
                {
                    log_printf( &logger, " OK\r\n" );
                }
                else 
                {
                    log_printf( &logger, " ERROR[%u]\r\n", ( uint16_t ) ctx->frame.payload[ 0 ] );
                    error_flag |= WIREPAS_ERROR;
                }
                break;
            }
            case WIREPAS_DSAP_DATA_TX_CONFIRM:
            {
                pdu_capacity = ctx->frame.payload[ 3 ];
                if ( 0 == ctx->frame.payload[ 2 ] )
                {
                    log_printf( &logger, " TX request with PDU_ID[%u] is placed\r\n", 
                                ( ( ( uint16_t ) ctx->frame.payload[ 1 ] << 8 ) | ctx->frame.payload[ 0 ] ) );
                    sink_1.pduid += 1;
                    if ( sink_1.pduid >= 16 )
                    {
                        sink_1.pduid = 0;
                    }
                #if defined MULTI_SINK_MODE
                    sink_2.pduid += 1;
                    if ( sink_2.pduid >= 16 )
                    {
                        sink_2.pduid = 0;
                    }
                #endif
                }
                else 
                {
                    log_printf( &logger, " ERROR[%u] on TX request with PDU_ID[%u]\r\n", ( uint16_t ) ctx->frame.payload[ 2 ],
                                ( ( ( uint16_t ) ctx->frame.payload[ 1 ] << 8 ) | ctx->frame.payload[ 0 ] ) );
                    error_flag |= WIREPAS_ERROR;
                }
                break;
            }
            case WIREPAS_MSAP_INDICATION_POLL_CONFIRM:
            {
                if ( 1 == ctx->frame.payload[ 0 ] )
                {
                    log_printf( &logger, " There are pending indications\r\n" );
                }
                else
                {
                    log_printf( &logger, " No pending indications on poll request\r\n" );
                }
                break;
            }
            case WIREPAS_DSAP_DATA_TX_INDICATION:
            {
                wirepas_send_ack ( ctx, WIREPAS_DSAP_DATA_TX_RESPONSE, ctx->frame.frame_id, ctx->frame.payload[ 0 ] );
                log_printf( &logger, " TX data with PDU_ID[%u] is sent to dest address: %lu\r\n", 
                            ( ( ( uint16_t ) ctx->frame.payload[ 2 ] << 8 ) | ctx->frame.payload[ 1 ] ),
                            ( ( ( uint32_t ) ctx->frame.payload[ 7 ] << 24 ) | ( ( uint32_t ) ctx->frame.payload[ 6 ] << 16 ) |
                              ( ( uint16_t ) ctx->frame.payload[ 5 ] << 8 ) | ctx->frame.payload[ 4 ] ) );
                pdu_capacity++;
                break;
            }
            case WIREPAS_DSAP_DATA_RX_INDICATION:
            {
                wirepas_send_ack ( ctx, WIREPAS_DSAP_DATA_RX_RESPONSE, ctx->frame.frame_id, ctx->frame.payload[ 0 ] );
                log_printf( &logger, " RX data is received from src address: %lu\r\n", 
                            ( ( ( uint32_t ) ctx->frame.payload[ 4 ] << 24 ) | ( ( uint32_t ) ctx->frame.payload[ 3 ] << 16 ) |
                              ( ( uint16_t ) ctx->frame.payload[ 2 ] << 8 ) | ctx->frame.payload[ 1 ] ) );
                log_printf( &logger, " RX data: " );
                for ( uint8_t cnt = 0; cnt < ctx->frame.payload[ 16 ]; cnt++ )
                {
                    log_printf( &logger, "%c", ctx->frame.payload[ 17 + cnt ] );
                }
                log_printf( &logger, "\r\n---------------------------\r\n" );
                break;
            }
            case WIREPAS_MSAP_STACK_STATE_INDICATION:
            {
                wirepas_send_ack ( ctx, WIREPAS_MSAP_STACK_STATE_RESPONSE, ctx->frame.frame_id, ctx->frame.payload[ 0 ] );
                log_printf( &logger, " Stack state indication: 0x%.2X\r\n", ctx->frame.payload[ 1 ] );
                break;
            }
            case WIREPAS_MSAP_APP_CONFIG_DATA_RX_IND:
            {
                wirepas_send_ack ( ctx, WIREPAS_MSAP_APP_CONFIG_DATA_RX_RESP, ctx->frame.frame_id, ctx->frame.payload[ 0 ] );
                log_printf( &logger, " MSAP app config data rx indication\r\n" );
                break;
            }
            case WIREPAS_MSAP_SCAN_NBORS_INDICATION:
            {
                wirepas_send_ack ( ctx, WIREPAS_MSAP_SCAN_NBORS_RESPONSE, ctx->frame.frame_id, ctx->frame.payload[ 0 ] );
                if ( ctx->frame.payload[ 1 ] )
                {
                    log_printf( &logger, " Neighbors scan is done and ready\r\n" );
                }
                else
                {
                    log_printf( &logger, " Neighbors scan is NOT done and ready\r\n" );
                }
                break;
            }
            default:
            {
                log_printf( &logger, " Frame with unknown primitive ID [0x%.2X] is received\r\n", 
                            ( uint16_t ) ctx->frame.primitive_id );
                log_printf( &logger, " Frame ID: %u\r\n", ( uint16_t ) ctx->frame.primitive_id );
                log_printf( &logger, " Payload len: %u\r\n", ( uint16_t ) ctx->frame.payload_len );
                log_printf( &logger, " Payload: ", ( uint16_t ) ctx->frame.payload_len );
                for ( uint8_t cnt = 0; cnt < ctx->frame.payload_len; cnt++ )
                {
                    log_printf( &logger, "%.2X ", ctx->frame.payload[ cnt ] );
                }
                log_printf( &logger, "\r\n" );
                error_flag |= WIREPAS_ERROR;
                break;
            }
        }
    }
    return error_flag;
}

err_t wirepas_poll_indication ( wirepas_t *ctx )
{
    err_t error_flag = WIREPAS_OK;
    uint32_t timeout_cnt = 0;
    while ( wirepas_get_din_state ( ctx ) )
    {
        if ( timeout_cnt++ > 2000 )
        {
            log_printf( &logger, " No pending indications on DIN pin\r\n" );
            break;
        }
        Delay_1ms ( );
    }
    timeout_cnt = 0;

    wirepas_send_command( ctx, WIREPAS_MSAP_INDICATION_POLL_REQUEST, 0, NULL );
    error_flag |= wirepas_wait_response ( ctx, WIREPAS_MSAP_INDICATION_POLL_CONFIRM );
    if ( WIREPAS_OK != error_flag )
    {
        return WIREPAS_ERROR;
    }
    while ( ( WIREPAS_OK == error_flag ) && ( ctx->frame.payload[ 0 ] == 0x01 ) )
    {
        error_flag |= wirepas_parse_frame ( ctx, 0 );
        if ( WIREPAS_OK == error_flag )
        {
            switch ( ctx->frame.primitive_id )
            {
                case WIREPAS_DSAP_DATA_TX_INDICATION:
                case WIREPAS_DSAP_DATA_RX_INDICATION:
                case WIREPAS_MSAP_STACK_STATE_INDICATION:
                case WIREPAS_MSAP_APP_CONFIG_DATA_RX_IND:
                case WIREPAS_MSAP_SCAN_NBORS_INDICATION:
                {
                    if ( ( ctx->frame.payload[ 0 ] == 0x00 ) )
                    {
                        while ( !wirepas_get_din_state ( ctx ) )
                        {
                            if ( timeout_cnt++ > 200 )
                            {
                                log_printf( &logger, " ERROR no IRQ clear\r\n" );
                                error_flag |= WIREPAS_ERROR;
                                break;
                            }
                            Delay_1ms ( );
                        }
                    }
                    break;
                }
                default:
                {
                    break;
                }
            }
        }
        else
        {
            log_printf( &logger, " ERROR on indication frame parse\r\n" );
        }
        if ( WIREPAS_OK != error_flag )
        {
            do
            {
                log_printf( &logger, " Wirepas stack stop request:" );
                wirepas_send_command( &wirepas, WIREPAS_MSAP_STACK_STOP_REQUEST, 0, NULL );
            }
            while ( WIREPAS_OK != wirepas_wait_response ( &wirepas, WIREPAS_MSAP_STACK_STOP_CONFIRM ) );
            Delay_1sec( );

            do
            {
                log_printf( &logger, " Wirepas Stack start request:" ); 
                wirepas_send_command( &wirepas, WIREPAS_MSAP_STACK_START_REQUEST, 1, &stack_auto_start );
            }
            while ( WIREPAS_OK != wirepas_wait_response ( &wirepas, WIREPAS_MSAP_STACK_START_CONFIRM ) );
            Delay_1sec( );
        }
    }
    return error_flag;
}

// ------------------------------------------------------------------------ END

额外支持

资源

喜欢这个项目吗?

'购买此套件' 按钮会直接带您进入购物车,您可以在购物车中轻松添加或移除产品。