[core] Add hardware peripheral availability defines
This commit is contained in:
@@ -2,13 +2,13 @@
|
||||
|
||||
#include "SerialPrivate.h"
|
||||
|
||||
#if HAS_SERIAL0
|
||||
#if LT_HW_UART0
|
||||
SerialClass Serial0(0, PIN_SERIAL0_RX, PIN_SERIAL0_TX);
|
||||
#endif
|
||||
#if HAS_SERIAL1
|
||||
#if LT_HW_UART1
|
||||
SerialClass Serial1(1, PIN_SERIAL1_RX, PIN_SERIAL1_TX);
|
||||
#endif
|
||||
#if HAS_SERIAL2
|
||||
#if LT_HW_UART2
|
||||
SerialClass Serial2(2, PIN_SERIAL2_RX, PIN_SERIAL2_TX);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -2,6 +2,5 @@
|
||||
|
||||
#error "Don't include this file directly"
|
||||
|
||||
#define LT_ARD_HAS_SERIAL 1
|
||||
|
||||
#define LT_ARD_HAS_SERIAL 1
|
||||
#define LT_ARD_MD5_POLARSSL 1
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
|
||||
#error "Don't include this file directly"
|
||||
|
||||
#define LT_HAS_FREERTOS 1
|
||||
#define LT_HAS_LWIP 1
|
||||
#define LT_HAS_LWIP2 1
|
||||
#define LT_HAS_FREERTOS 1
|
||||
#define LT_HAS_MBEDTLS 1
|
||||
#define LT_HAS_OTA 1
|
||||
#define LT_HAS_PRINTF 1
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include LT_VARIANT_H
|
||||
#include <lt_pins.h>
|
||||
|
||||
// Choose the main UART output port
|
||||
#ifndef LT_UART_DEFAULT_PORT
|
||||
#if HAS_SERIAL2
|
||||
#if LT_HW_UART2
|
||||
#define LT_UART_DEFAULT_PORT 2
|
||||
#elif HAS_SERIAL0
|
||||
#elif LT_HW_UART0
|
||||
#define LT_UART_DEFAULT_PORT 0
|
||||
#elif HAS_SERIAL1
|
||||
#elif LT_HW_UART1
|
||||
#define LT_UART_DEFAULT_PORT 1
|
||||
#else
|
||||
#error "No serial port is available"
|
||||
|
||||
Reference in New Issue
Block a user