Skip to content

Commit 03c40a2

Browse files
author
Andrew Boie
committed
Revert "misc: Remove generic PRINT macros from pci samples"
This reverts commit a000701. Change-Id: I72f4b8adfc33c833116fef9fc1cd8c542f3979b0 Signed-off-by: Andrew Boie <[email protected]>
1 parent 83298d8 commit 03c40a2

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

samples/drivers/pci_enum/prj.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
CONFIG_STDOUT_CONSOLE=y
22
CONFIG_PCI_ENUMERATION=y
33
CONFIG_PCI_DEBUG=y
4-
CONFIG_SYS_LOG=y

samples/drivers/pci_enum/src/pci_enum.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,13 @@
2020
#include <stdint.h>
2121
#include <pci/pci.h>
2222

23-
#define SYS_LOG_LEVEL SYS_LOG_LEVEL_INFO
24-
#include <misc/sys_log.h>
23+
#if defined(CONFIG_STDOUT_CONSOLE)
24+
#include <stdio.h>
25+
#define PRINT printf
26+
#else
27+
#include <misc/printk.h>
28+
#define PRINT printk
29+
#endif
2530

2631
void pci_enumerate(void)
2732
{
@@ -54,7 +59,7 @@ void task_enum_pci(void)
5459
}
5560

5661
pci_enumerate();
57-
SYS_LOG_INF("Enumeration complete on %s", CONFIG_ARCH);
62+
PRINT("Enumeration complete on %s", CONFIG_ARCH);
5863
done = 1;
5964
}
6065

@@ -63,7 +68,7 @@ void task_enum_pci(void)
6368
void main(void)
6469
{
6570
pci_enumerate();
66-
SYS_LOG_INF("Enumeration complete on %s", CONFIG_ARCH);
71+
PRINT("Enumeration complete on %s", CONFIG_ARCH);
6772
}
6873

6974
#endif /* CONFIG_MICROKERNEL */

0 commit comments

Comments
 (0)