git grep -l 'u\(8\|16\|32\|64\)_t' | \ xargs sed -i "s/u\(8\|16\|32\|64\)_t/uint\1_t/g" git grep -l 's\(8\|16\|32\|64\)_t' | \ xargs sed -i "s/s\(8\|16\|32\|64\)_t/int\1_t/g" Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
29 lines
736 B
C
29 lines
736 B
C
/*
|
|
* Copyright (c) 2018 Nordic Semiconductor ASA
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
#include "sample_instance.h"
|
|
#include <string.h>
|
|
|
|
/* Note: no name is defined because only instance logging is used.
|
|
* Instances are registered as logging sources not module.
|
|
*/
|
|
#include <logging/log.h>
|
|
|
|
LOG_LEVEL_SET(LOG_LEVEL_INF);
|
|
|
|
void sample_instance_call(struct sample_instance *inst)
|
|
{
|
|
uint8_t data[] = { 1, 2, 3, 4, 5, 6, 7, 8,
|
|
9, 10, 11, 12, 13, 14, 15, 16,
|
|
17, 18, 19, 20, 21, 22, 23, 24,
|
|
25, 26, 27, 28, 29, 30, 31, 32,
|
|
33, 34, };
|
|
|
|
LOG_INST_INF(inst->log, "counter_value: %d", inst->cnt++);
|
|
LOG_INST_HEXDUMP_WRN(inst->log, data, sizeof(data),
|
|
"Example of hexdump:");
|
|
(void)memset(data, 0, sizeof(data));
|
|
}
|