samples: ipc: Convert to new DT_INST macros

Convert older DT_INST_ macro use the new include/devicetree.h
DT_INST macro APIs.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2020-03-30 13:33:19 -05:00 committed by Kumar Gala
commit 7e10e6dd3d
3 changed files with 3 additions and 3 deletions

View file

@ -20,7 +20,7 @@ void ping_ipm_callback(void *context, u32_t id, volatile void *data)
void main(void) void main(void)
{ {
ipm = device_get_binding(DT_INST_0_NXP_LPC_MAILBOX_LABEL); ipm = device_get_binding(DT_LABEL(DT_INST(0, nxp_lpc_mailbox)));
if (!ipm) { if (!ipm) {
while (1) { while (1) {
} }

View file

@ -33,7 +33,7 @@ void main(void)
printk("Hello World from MASTER! %s\n", CONFIG_ARCH); printk("Hello World from MASTER! %s\n", CONFIG_ARCH);
/* Get IPM device handle */ /* Get IPM device handle */
ipm = device_get_binding(DT_INST_0_NXP_LPC_MAILBOX_LABEL); ipm = device_get_binding(DT_LABEL(DT_INST(0, nxp_lpc_mailbox)));
if (!ipm) { if (!ipm) {
printk("Could not get IPM device handle!\n"); printk("Could not get IPM device handle!\n");
while (1) { while (1) {

View file

@ -49,7 +49,7 @@ void main(void)
{ {
printk("IPM MHU sample on %s\n", CONFIG_BOARD); printk("IPM MHU sample on %s\n", CONFIG_BOARD);
mhu0 = device_get_binding(DT_INST_0_ARM_MHU_LABEL); mhu0 = device_get_binding(DT_LABEL(DT_INST(0, arm_mhu)));
if (!mhu0) { if (!mhu0) {
printk("CPU %d, get MHU0 fail!\n", printk("CPU %d, get MHU0 fail!\n",
sse_200_platform_get_cpu_id()); sse_200_platform_get_cpu_id());