1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys/shell/commands/sc_suit.c
Koen Zandberg 14bdf8f46b
sys/suit: Add SUIT draft ietf-v3 firmware upgrade module
Co-authored-by: Kaspar Schleiser <kaspar@schleiser.de>
2020-03-18 14:13:12 +01:00

39 lines
759 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/transport/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;
}