[2.0.x] Enable hardware serial ports on LPC1768 (#8004)
* Enable hardware serial ports on LPC1768 * Fix compilation errors with other HALs * FIx order of includes in LPC1768 HAL main.cpp * Add support for RX_BUFFER_SIZE and TX_BUFFER_SIZE options in Configuration_adv.h
This commit is contained in:
@@ -235,6 +235,24 @@
|
||||
#error "WEBSITE_URL must be specified."
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Serial
|
||||
*/
|
||||
#ifndef USBCON
|
||||
#if ENABLED(SERIAL_XON_XOFF) && RX_BUFFER_SIZE < 1024
|
||||
#error "XON/XOFF requires RX_BUFFER_SIZE >= 1024 for reliable transfers without drops."
|
||||
#endif
|
||||
|
||||
#if !IS_POWER_OF_2(RX_BUFFER_SIZE) || RX_BUFFER_SIZE < 2
|
||||
#error "RX_BUFFER_SIZE must be a power of 2 greater than 1."
|
||||
#endif
|
||||
|
||||
// 256 is the max limit due to uint8_t head and tail. Use only powers of 2. (...,16,32,64,128,256)
|
||||
#if TX_BUFFER_SIZE && (TX_BUFFER_SIZE < 2 || TX_BUFFER_SIZE > 256 || !IS_POWER_OF_2(TX_BUFFER_SIZE))
|
||||
#error "TX_BUFFER_SIZE must be 0 or a power of 2 greater than 1."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Dual Stepper Drivers
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user