config: let each device decide DEF_UARTE_ENABLED

This commit is contained in:
Roy_01
2025-06-12 10:08:27 +08:00
parent 057cd37031
commit 13a3bc2bac
2 changed files with 14 additions and 4 deletions
+10 -1
View File
@@ -149,6 +149,8 @@ extern "C"
#define DEF_USBD_ENABLED 1
#define DEF_UART_ENABLED 0
#elif (DEF_ELITE_MODEL == DEF_ELITE_EDC_V2_0)
#define ELITE_DEVICE_NAME "Elite-EDC"
#define ELITE_HW_NAME "Elite-EDCv2.0"
@@ -184,6 +186,8 @@ extern "C"
#define DEF_USBD_ENABLED 1
#define DEF_UART_ENABLED 0
#elif (DEF_ELITE_MODEL == DEF_ELITE_PEL_V2_0)
#define BOARD_IOPH 1
#define BOARD_IOPL 0
@@ -223,6 +227,8 @@ extern "C"
#define DEF_USBD_ENABLED 1
#define DEF_UART_ENABLED 0
#elif (DEF_ELITE_MODEL == DEF_ELITE_CPG_V1_1)
#define ELITE_DEVICE_NAME "Elite-CPG"
#define ELITE_HW_NAME "Elite-CPGv1.1"
@@ -258,6 +264,8 @@ extern "C"
#define DEF_USBD_ENABLED 1
#define DEF_UARTE_ENABLED 0
#elif (DEF_ELITE_MODEL == DEF_ELITE_MMM_V1_0)
#define ELITE_DEVICE_NAME "Elite-MMM"
#define ELITE_HW_NAME "Elite-MMM"
@@ -293,6 +301,8 @@ extern "C"
#define DEF_USBD_ENABLED 1
#define DEF_UARTE_ENABLED 1
#endif
#define BLE_ELITE_SRV_ENABLED 1
@@ -330,7 +340,6 @@ extern "C"
#define BLE_UART_SRV_ENABLED 1
#define BLE_UART_OBSERVER_PRIO 3
#define NRF_UARTE_ENABLED 1
#define DEF_UARTE_ENABLED 1
// DFU
#define NRF_DFU_TRANSPORT_BLE 1
+4 -3
View File
@@ -16,9 +16,10 @@ extern "C"
int uart_recv(void *p_data, uint32_t max_size);
ret_code_t uart_set_baud(uint32_t baudrate);
#else
#define uart_init()
#define uart_send(...) ;
#define uart_recv(...) ;
#define uart_init()
#define uart_send(...) ;
#define uart_recv(...) ;
#define uart_set_baud(...)
#endif /* ! DEF_UARTE_ENABLED */
#ifdef __cplusplus