rc
Dependents: WizFi250_AP_HelloWorld
Fork of mbed-src by
Revision 547:88c982c8f758, committed 2015-05-22
- Comitter:
- mbed_official
- Date:
- Fri May 22 09:45:08 2015 +0100
- Parent:
- 546:a843b1cd80b8
- Child:
- 548:1abac31e188e
- Commit message:
- Synchronized with git revision 61deb3e97c669a7c9bc99d3941d8f4c28c463f24
Full URL: https://github.com/mbedmicro/mbed/commit/61deb3e97c669a7c9bc99d3941d8f4c28c463f24/
Timer/Ticker - fix constness of the data argument/member
Changed in this revision
--- a/api/Ticker.h Fri May 22 08:45:08 2015 +0100 +++ b/api/Ticker.h Fri May 22 09:45:08 2015 +0100 @@ -60,7 +60,7 @@ Ticker() : TimerEvent() { } - Ticker(const ticker_data_t *const data) : TimerEvent(data) { + Ticker(const ticker_data_t *data) : TimerEvent(data) { } /** Attach a function to be called by the Ticker, specifiying the interval in seconds
--- a/api/Timer.h Fri May 22 08:45:08 2015 +0100 +++ b/api/Timer.h Fri May 22 09:45:08 2015 +0100 @@ -46,7 +46,7 @@ public: Timer(); - Timer(const ticker_data_t *const data); + Timer(const ticker_data_t *data); /** Start the timer */ @@ -83,7 +83,7 @@ int _running; // whether the timer is running unsigned int _start; // the start time of the latest slice int _time; // any accumulated time from previous slices - const ticker_data_t *const _ticker_data; + const ticker_data_t *_ticker_data; }; } // namespace mbed
--- a/api/TimerEvent.h Fri May 22 08:45:08 2015 +0100 +++ b/api/TimerEvent.h Fri May 22 09:45:08 2015 +0100 @@ -47,7 +47,7 @@ ticker_event_t event; - const ticker_data_t *const _ticker_data; + const ticker_data_t *_ticker_data; }; } // namespace mbed
--- a/common/Timer.cpp Fri May 22 08:45:08 2015 +0100 +++ b/common/Timer.cpp Fri May 22 09:45:08 2015 +0100 @@ -23,7 +23,7 @@ reset(); } -Timer::Timer(const ticker_data_t *const data) : _running(), _start(), _time(), _ticker_data(data) { +Timer::Timer(const ticker_data_t *data) : _running(), _start(), _time(), _ticker_data(data) { reset(); }
--- a/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/serial_api.c Fri May 22 08:45:08 2015 +0100 +++ b/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/serial_api.c Fri May 22 09:45:08 2015 +0100 @@ -66,6 +66,8 @@ static void uart_irq(UARTName, int, SerialIrq); uint8_t serial_get_index(serial_t *obj); +void serial_enable(serial_t *obj, uint8_t enable); +void serial_enable_pins(serial_t *obj, uint8_t enable); IRQn_Type serial_get_rx_irq_index(serial_t *obj); IRQn_Type serial_get_tx_irq_index(serial_t *obj); CMU_Clock_TypeDef serial_get_clock(serial_t *obj); @@ -435,17 +437,10 @@ if (obj->serial.periph.uart == (USART_TypeDef*)STDIO_UART ) { stdio_uart_inited = 1; memcpy(&stdio_uart, obj, sizeof(serial_t)); - - /* enable TX and RX by default for STDIO */ - if(LEUART_REF_VALID(obj->serial.periph.leuart)) { - obj->serial.periph.leuart->CMD = LEUART_CMD_TXEN | LEUART_CMD_RXEN; - } else { - obj->serial.periph.uart->CMD = USART_CMD_TXEN | USART_CMD_RXEN; - } } serial_enable_pins(obj, true); - + serial_enable(obj, true); obj->serial.dmaOptionsTX.dmaChannel = -1;