mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
suit: make use of worker functions
This commit is contained in:
parent
0b6e344d4f
commit
f95d577245
@ -83,7 +83,7 @@ static void cb(void *arg)
|
|||||||
{
|
{
|
||||||
(void) arg;
|
(void) arg;
|
||||||
printf("Button pressed! Triggering suit update! \n");
|
printf("Button pressed! Triggering suit update! \n");
|
||||||
suit_coap_trigger((uint8_t *) SUIT_MANIFEST_RESOURCE, sizeof(SUIT_MANIFEST_RESOURCE));
|
suit_worker_trigger(SUIT_MANIFEST_RESOURCE, sizeof(SUIT_MANIFEST_RESOURCE));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -211,8 +211,8 @@ int main(void)
|
|||||||
#endif
|
#endif
|
||||||
/* initialize suit storage */
|
/* initialize suit storage */
|
||||||
suit_storage_init_all();
|
suit_storage_init_all();
|
||||||
/* start suit coap updater thread */
|
/* start suit updater thread */
|
||||||
suit_coap_run();
|
suit_worker_run();
|
||||||
|
|
||||||
/* start nanocoap server thread */
|
/* start nanocoap server thread */
|
||||||
thread_create(_nanocoap_server_stack, sizeof(_nanocoap_server_stack),
|
thread_create(_nanocoap_server_stack, sizeof(_nanocoap_server_stack),
|
||||||
|
@ -40,7 +40,7 @@ static int _suit_handler(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp(argv[1], "fetch") == 0) {
|
if (strcmp(argv[1], "fetch") == 0) {
|
||||||
suit_coap_trigger((uint8_t *)argv[2], strlen(argv[2]));
|
suit_worker_trigger(argv[2], strlen(argv[2]));
|
||||||
}
|
}
|
||||||
else if (strcmp(argv[1], "seq_no") == 0) {
|
else if (strcmp(argv[1], "seq_no") == 0) {
|
||||||
uint32_t seq_no = 0;
|
uint32_t seq_no = 0;
|
||||||
|
@ -53,7 +53,7 @@ static ssize_t _trigger_handler(coap_pkt_t *pkt, uint8_t *buf, size_t len,
|
|||||||
else {
|
else {
|
||||||
code = COAP_CODE_CREATED;
|
code = COAP_CODE_CREATED;
|
||||||
LOG_INFO("suit: received URL: \"%s\"\n", (char *)pkt->payload);
|
LOG_INFO("suit: received URL: \"%s\"\n", (char *)pkt->payload);
|
||||||
suit_coap_trigger(pkt->payload, payload_len);
|
suit_worker_trigger((char *)pkt->payload, payload_len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user