set SX127X_DEV_NAME=CONFIG_ADAPTER_SX1278_DRIVER ifdef CONFIG_ADAPTER_SX1278_DRIVER

This commit is contained in:
wgz-code 2022-03-17 14:35:28 +08:00
parent 44124db62c
commit 101e6854c0
2 changed files with 11 additions and 3 deletions

View File

@ -47,7 +47,12 @@
* Pre-processor Definitions * 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 #define TX_BUFFER_MAX 255
/**************************************************************************** /****************************************************************************

View File

@ -63,8 +63,11 @@
/* Configuration ************************************************************/ /* Configuration ************************************************************/
/* Device name */ /* Device name */
#ifdef CONFIG_ADAPTER_SX1278_DRIVER
#define SX127X_DEV_NAME "/dev/sx127x" # define SX127X_DEV_NAME CONFIG_ADAPTER_SX1278_DRIVER
#else
# define SX127X_DEV_NAME "/dev/sx127x"
#endif
/* Payload fixlen default */ /* Payload fixlen default */