mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #3089 from NXPmicro/Remove_Clock_Init
Kinetis HAL: Remove clock initialization code from serial and ticker …pull/3127/head
commit
26bf6eb599
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue