NuMaker connection with AWS IoT thru MQTT/HTTPS

Dependencies:   MQTT

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers pump_host_command.cpp Source File

pump_host_command.cpp

00001 /* 
00002  * Copyright (c) 2019 Nuvoton Technology Corporation
00003  *
00004  * SPDX-License-Identifier: Apache-2.0
00005  *
00006  * Licensed under the Apache License, Version 2.0 (the "License");
00007  * you may not use this file except in compliance with the License.
00008  * You may obtain a copy of the License at
00009  *
00010  *     http://www.apache.org/licenses/LICENSE-2.0
00011  *
00012  * Unless required by applicable law or agreed to in writing, software
00013  * distributed under the License is distributed on an "AS IS" BASIS,
00014  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00015  * See the License for the specific language governing permissions and
00016  * limitations under the License.
00017  */
00018 
00019 #include "mbed.h"
00020 
00021 /* Support host command communicating via USB VCOM
00022  *
00023  * WARNING: For mass production, remove this file.
00024  */
00025  
00026 /* Check weak reference/definition at the link:
00027  * http://www.keil.com/support/man/docs/ARMLINK/armlink_pge1362065917715.htm */
00028 
00029 extern "C" {
00030     MBED_USED void pump_host_command(void);
00031     MBED_WEAK int fetch_host_command(void);
00032     MBED_WEAK void dispatch_host_command(int);
00033 }
00034 
00035 void pump_host_command(void)
00036 {
00037     if (fetch_host_command && dispatch_host_command) {
00038         dispatch_host_command(fetch_host_command());
00039     }
00040 }