TI中文支持网
TI专业的中文技术问题搜集分享网站

CC3235SF: 关于MQTT-client例程LED灯使用的问题?

Part Number:CC3235SF

请问我在使用MQTT-client例程的时候,代码里没有找到在哪里使用了LED灯,也就是为什么代码一烧进去灯就亮了呢?如果我想让LED灯用在其他地方,应该在哪里修改关闭LED灯呢,或者例程中哪里调用了点亮LED灯的函数呢?

Kevin Qiu1:

/** In case a persistent session is being used, subscribe is called before connect so that the module* is aware of the topic callbacks the user is using. This is important because if the broker is holding* messages for the client, after CONNACK the client may receive the messages before the module is aware* of the topic callbacks. The user may still call subscribe after connect but have to be aware of this.*/ret = MQTT_IF_Subscribe(mqttClientHandle, "Broker/To/cc32xx", MQTT_QOS_2, BrokerCB);ret |= MQTT_IF_Subscribe(mqttClientHandle, "cc32xx/ToggleLED1", MQTT_QOS_2, ToggleLED1CB);ret |= MQTT_IF_Subscribe(mqttClientHandle, "cc32xx/ToggleLED2", MQTT_QOS_2, ToggleLED2CB);ret |= MQTT_IF_Subscribe(mqttClientHandle, "cc32xx/ToggleLED3", MQTT_QOS_2, ToggleLED3CB);

在以上回调中使用了LED,LED用于指示状态,可在readme文件中找到详细说明

使用GPIO API参考:GPIO_write(CONFIG_GPIO_LED_0, CONFIG_GPIO_LED_OFF);

赞(0)
未经允许不得转载:TI中文支持网 » CC3235SF: 关于MQTT-client例程LED灯使用的问题?
分享到: 更多 (0)