HAL_AVR: tweak the default serial buffer sizes

this reduces memory fragmentation a lot, saving memory
This commit is contained in:
Andrew Tridgell 2013-01-11 11:16:09 +11:00
parent 0cb8192861
commit 6aecdb3d7d
2 changed files with 2 additions and 5 deletions

View File

@ -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 */

View File

@ -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;
};