Merge pull request #3089 from NXPmicro/Remove_Clock_Init

Kinetis HAL: Remove clock initialization code from serial and ticker …
pull/3127/head
Martin Kojtal 2016-10-25 11:02:31 +02:00 committed by GitHub
commit 26bf6eb599
14 changed files with 2 additions and 53 deletions

View File

@ -47,10 +47,6 @@ void serial_init(serial_t *obj, PinName tx, PinName rx) {
obj->index = pinmap_merge(uart_tx, uart_rx);
MBED_ASSERT((int)obj->index != NC);
// Need to initialize the clocks here as ticker init gets called before mbed_sdk_init
if (SystemCoreClock == DEFAULT_SYSTEM_CLOCK)
BOARD_BootClockRUN();
uart_config_t config;
UART_GetDefaultConfig(&config);

View File

@ -26,9 +26,6 @@ void us_ticker_init(void) {
return;
}
us_ticker_inited = 1;
// Need to initialize the clocks here as ticker init gets called before mbed_sdk_init
if (SystemCoreClock == DEFAULT_SYSTEM_CLOCK)
BOARD_BootClockRUN();
//Common for ticker/timer
uint32_t busClock;
// Structure to initialize PIT

View File

@ -47,10 +47,6 @@ void serial_init(serial_t *obj, PinName tx, PinName rx) {
obj->index = pinmap_merge(uart_tx, uart_rx);
MBED_ASSERT((int)obj->index != NC);
// Need to initialize the clocks here as ticker init gets called before mbed_sdk_init
if (SystemCoreClock == DEFAULT_SYSTEM_CLOCK)
BOARD_BootClockRUN();
uart_config_t config;
UART_GetDefaultConfig(&config);

View File

@ -26,9 +26,6 @@ void us_ticker_init(void) {
return;
}
us_ticker_inited = 1;
// Need to initialize the clocks here as ticker init gets called before mbed_sdk_init
if (SystemCoreClock == DEFAULT_SYSTEM_CLOCK)
BOARD_BootClockRUN();
//Common for ticker/timer
uint32_t busClock;
// Structure to initialize PIT

View File

@ -46,10 +46,6 @@ void serial_init(serial_t *obj, PinName tx, PinName rx) {
obj->index = pinmap_merge(uart_tx, uart_rx);
MBED_ASSERT((int)obj->index != NC);
// Need to initialize the clocks here as ticker init gets called before mbed_sdk_init
if (SystemCoreClock == DEFAULT_SYSTEM_CLOCK)
BOARD_BootClockRUN();
/* Set the LPUART clock source */
if (obj->index == LPUART_0) {
CLOCK_SetLpuart0Clock(1U);

View File

@ -28,10 +28,6 @@ void us_ticker_init(void) {
}
us_ticker_inited = 1;
// Need to initialize the clocks here as ticker init gets called before mbed_sdk_init
if (SystemCoreClock == DEFAULT_SYSTEM_CLOCK)
BOARD_BootClockRUN();
//Timer uses PIT
//Common for ticker/timer
uint32_t busClock;

View File

@ -46,10 +46,6 @@ void serial_init(serial_t *obj, PinName tx, PinName rx) {
obj->index = pinmap_merge(uart_tx, uart_rx);
MBED_ASSERT((int)obj->index != NC);
// Need to initialize the clocks here as ticker init gets called before mbed_sdk_init
if (SystemCoreClock == DEFAULT_SYSTEM_CLOCK)
BOARD_BootClockRUN();
/* Set the LPUART clock source */
if (obj->index == LPUART_0) {
CLOCK_SetLpuart0Clock(1U);

View File

@ -28,10 +28,6 @@ void us_ticker_init(void) {
}
us_ticker_inited = 1;
// Need to initialize the clocks here as ticker init gets called before mbed_sdk_init
if (SystemCoreClock == DEFAULT_SYSTEM_CLOCK)
BOARD_BootClockRUN();
//Timer uses PIT
//Common for ticker/timer
uint32_t busClock;

View File

@ -46,10 +46,6 @@ void serial_init(serial_t *obj, PinName tx, PinName rx) {
obj->index = pinmap_merge(uart_tx, uart_rx);
MBED_ASSERT((int)obj->index != NC);
// Need to initialize the clocks here as ticker init gets called before mbed_sdk_init
if (SystemCoreClock == DEFAULT_SYSTEM_CLOCK)
BOARD_BootClockRUN();
/* Set the LPUART clock source */
CLOCK_SetLpuartClock(2U);

View File

@ -26,9 +26,6 @@ void us_ticker_init(void) {
return;
}
us_ticker_inited = 1;
// Need to initialize the clocks here as ticker init gets called before mbed_sdk_init
if (SystemCoreClock == DEFAULT_SYSTEM_CLOCK)
BOARD_BootClockRUN();
//Common for ticker/timer
uint32_t busClock;
// Structure to initialize PIT

View File

@ -47,10 +47,6 @@ void serial_init(serial_t *obj, PinName tx, PinName rx) {
obj->index = pinmap_merge(uart_tx, uart_rx);
MBED_ASSERT((int)obj->index != NC);
// Need to initialize the clocks here as ticker init gets called before mbed_sdk_init
if (SystemCoreClock == DEFAULT_SYSTEM_CLOCK)
BOARD_BootClockRUN();
uart_config_t config;
UART_GetDefaultConfig(&config);
@ -99,7 +95,7 @@ void serial_format(serial_t *obj, int data_bits, SerialParity parity, int stop_b
if (parity == ParityOdd) {
temp |= UART_C1_PT_MASK;
} else if (parity == ParityEven) {
// PT=0 so nothing more to do
// PT=0 so nothing more to do
} else {
// Hardware does not support forced parity
MBED_ASSERT(0);

View File

@ -26,9 +26,6 @@ void us_ticker_init(void) {
return;
}
us_ticker_inited = 1;
// Need to initialize the clocks here as ticker init gets called before mbed_sdk_init
if (SystemCoreClock == DEFAULT_SYSTEM_CLOCK)
BOARD_BootClockRUN();
//Common for ticker/timer
uint32_t busClock;
// Structure to initialize PIT

View File

@ -47,10 +47,6 @@ void serial_init(serial_t *obj, PinName tx, PinName rx) {
obj->index = pinmap_merge(uart_tx, uart_rx);
MBED_ASSERT((int)obj->index != NC);
// Need to initialize the clocks here as ticker init gets called before mbed_sdk_init
if (SystemCoreClock == DEFAULT_SYSTEM_CLOCK)
BOARD_BootClockRUN();
uart_config_t config;
UART_GetDefaultConfig(&config);
@ -99,7 +95,7 @@ void serial_format(serial_t *obj, int data_bits, SerialParity parity, int stop_b
if (parity == ParityOdd) {
temp |= UART_C1_PT_MASK;
} else if (parity == ParityEven) {
// PT=0 so nothing more to do
// PT=0 so nothing more to do
} else {
// Hardware does not support forced parity
MBED_ASSERT(0);

View File

@ -26,9 +26,6 @@ void us_ticker_init(void) {
return;
}
us_ticker_inited = 1;
// Need to initialize the clocks here as ticker init gets called before mbed_sdk_init
if (SystemCoreClock == DEFAULT_SYSTEM_CLOCK)
BOARD_BootClockRUN();
//Common for ticker/timer
uint32_t busClock;
// Structure to initialize PIT