Skip to content

Commit 1a34e63

Browse files
committed
fixup! finish inlining of onewire_print_rom
1 parent fdd1c25 commit 1a34e63

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

drivers/include/onewire.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353

5454
#include <stdint.h>
5555

56+
#include "fmt.h"
5657
#include "periph/gpio.h"
5758

5859
#ifdef __cplusplus
@@ -236,7 +237,12 @@ void onewire_rom_to_str(char *str, const onewire_rom_t *rom);
236237
*
237238
* @param[in] rom 1-Wire ROM code
238239
*/
239-
void onewire_rom_print(const onewire_rom_t *rom);
240+
static inline void onewire_rom_print(const onewire_rom_t *rom)
241+
{
242+
char str[ONEWIRE_ROM_STR_LEN];
243+
onewire_rom_to_str(str, rom);
244+
print(str, (ONEWIRE_ROM_STR_LEN - 1));
245+
}
240246

241247
#ifdef __cplusplus
242248
}

drivers/onewire/onewire_str.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,3 @@ void onewire_rom_to_str(char *str, const onewire_rom_t *rom)
4545
size_t pos = fmt_bytes_hex(str, rom->u8, sizeof(onewire_rom_t));
4646
str[pos] = '\0';
4747
}
48-
49-
static inline void onewire_rom_print(const onewire_rom_t *rom)
50-
{
51-
char str[ONEWIRE_ROM_STR_LEN];
52-
onewire_rom_to_str(str, rom);
53-
print(str, (ONEWIRE_ROM_STR_LEN - 1));
54-
}

0 commit comments

Comments
 (0)