1 /*
2 * Copyright (c) 2018 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6 #include "sample_instance.h"
7 #include <string.h>
8
9 /* Note: no name is defined because only instance logging is used.
10 * Instances are registered as logging sources not module.
11 */
12 #include <logging/log.h>
13
14 LOG_LEVEL_SET(LOG_LEVEL_INF);
15
sample_instance_call(struct sample_instance * inst)16 void sample_instance_call(struct sample_instance *inst)
17 {
18 uint8_t data[] = { 1, 2, 3, 4, 5, 6, 7, 8,
19 9, 10, 11, 12, 13, 14, 15, 16,
20 17, 18, 19, 20, 21, 22, 23, 24,
21 25, 26, 27, 28, 29, 30, 31, 32,
22 33, 34, };
23
24 LOG_INST_INF(inst->log, "counter_value: %d", inst->cnt++);
25 LOG_INST_HEXDUMP_WRN(inst->log, data, sizeof(data),
26 "Example of hexdump:");
27 (void)memset(data, 0, sizeof(data));
28 }
29