diff --git a/Ubiquitous/Nuttx/app_match_nuttx/apps/examples/sx127x_demo/sx127x_demo.c b/Ubiquitous/Nuttx/app_match_nuttx/apps/examples/sx127x_demo/sx127x_demo.c index 3e2b59cf5..66b972417 100644 --- a/Ubiquitous/Nuttx/app_match_nuttx/apps/examples/sx127x_demo/sx127x_demo.c +++ b/Ubiquitous/Nuttx/app_match_nuttx/apps/examples/sx127x_demo/sx127x_demo.c @@ -47,7 +47,12 @@ * Pre-processor Definitions ****************************************************************************/ -#define DEV_NAME "/dev/sx127x" +#ifdef CONFIG_ADAPTER_SX1278_DRIVER +# define DEV_NAME CONFIG_ADAPTER_SX1278_DRIVER +#else +# define DEV_NAME "/dev/sx127x" +#endif + #define TX_BUFFER_MAX 255 /**************************************************************************** diff --git a/Ubiquitous/Nuttx/app_match_nuttx/nuttx/drivers/wireless/lpwan/sx127x/sx127x.c b/Ubiquitous/Nuttx/app_match_nuttx/nuttx/drivers/wireless/lpwan/sx127x/sx127x.c index f20eafc77..d36d29aa5 100644 --- a/Ubiquitous/Nuttx/app_match_nuttx/nuttx/drivers/wireless/lpwan/sx127x/sx127x.c +++ b/Ubiquitous/Nuttx/app_match_nuttx/nuttx/drivers/wireless/lpwan/sx127x/sx127x.c @@ -63,8 +63,11 @@ /* Configuration ************************************************************/ /* Device name */ - -#define SX127X_DEV_NAME "/dev/sx127x" +#ifdef CONFIG_ADAPTER_SX1278_DRIVER +# define SX127X_DEV_NAME CONFIG_ADAPTER_SX1278_DRIVER +#else +# define SX127X_DEV_NAME "/dev/sx127x" +#endif /* Payload fixlen default */