From 010d25fceb91360ac3d8bd0bd61604649f7994ac Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Mon, 1 Aug 2016 22:25:11 +0200 Subject: Move get_payload to misc Signed-off-by: Szczepan Zalega --- include/misc.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/misc.h b/include/misc.h index 07f221c..a5d9e6d 100644 --- a/include/misc.h +++ b/include/misc.h @@ -6,7 +6,16 @@ namespace nitrokey { namespace misc { -std::string hexdump(const char *p, size_t size); +template +typename T::CommandPayload get_payload(){ + //Create, initialize and return by value command payload + typename T::CommandPayload st; + bzero(&st, sizeof(st)); + return st; +} + + + std::string hexdump(const char *p, size_t size); uint32_t stm_crc32(const uint8_t *data, size_t size); } } -- cgit v1.2.3