HAL_AVR: tweak the default serial buffer sizes
this reduces memory fragmentation a lot, saving memory
This commit is contained in:
parent
0cb8192861
commit
6aecdb3d7d
@ -58,7 +58,7 @@ void HAL_AVR_APM2::init(int argc, char * const argv[]) const {
|
||||
|
||||
/* uartA is the serial port used for the console, so lets make sure
|
||||
* it is initialized at boot */
|
||||
uartA->begin(115200);
|
||||
uartA->begin(115200, 128, 128);
|
||||
console->init((void*)uartA);
|
||||
/* The AVR RCInput drivers take an AP_HAL_AVR::ISRRegistry*
|
||||
* as the init argument */
|
||||
|
@ -110,15 +110,12 @@ private:
|
||||
static void _freeBuffer(Buffer *buffer);
|
||||
|
||||
/// default receive buffer size
|
||||
static const uint16_t _default_rx_buffer_size = 128;
|
||||
static const uint16_t _default_rx_buffer_size = 4;
|
||||
|
||||
/// default transmit buffer size
|
||||
static const uint16_t _default_tx_buffer_size = 16;
|
||||
|
||||
/// maxium tx/rx buffer size
|
||||
/// @note if we could bring the max size down to 256, the mask and head/tail
|
||||
/// pointers in the buffer could become uint8_t.
|
||||
///
|
||||
static const uint16_t _max_buffer_size = 256;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user