mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
39 lines
749 B
C
39 lines
749 B
C
/*
|
|
* Copyright (C) 2019 Alexandre Abadie <alexandre.abadie@inria.fr>
|
|
*
|
|
* This file is subject to the terms and conditions of the GNU Lesser
|
|
* General Public License v2.1. See the file LICENSE in the top level
|
|
* directory for more details.
|
|
*/
|
|
|
|
/**
|
|
* @ingroup sys_shell_commands
|
|
* @{
|
|
*
|
|
* @file
|
|
* @brief Trigger a firmware update from the shell
|
|
*
|
|
* @author Alexandre Abadie <alexandre.abadie@inria.fr>
|
|
*
|
|
* @}
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <inttypes.h>
|
|
|
|
#include "suit/coap.h"
|
|
|
|
|
|
int _suit_handler(int argc, char **argv)
|
|
{
|
|
if (argc != 2) {
|
|
printf("Usage: %s <manifest url>\n", argv[0]);
|
|
return 1;
|
|
}
|
|
|
|
suit_coap_trigger((uint8_t *)argv[1], strlen(argv[1]));
|
|
|
|
return 0;
|
|
}
|