Skip to content

Commit 67972d0

Browse files
committed
Replaced tabs by spaces
Now Martin is happy :)
1 parent 2c2bf35 commit 67972d0

File tree

12 files changed

+54
-54
lines changed

12 files changed

+54
-54
lines changed

libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL05Z/PeripheralNames.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ extern "C" {
2323
#endif
2424

2525
typedef enum {
26-
OSC32KCLK = 0,
27-
RTC_CLKIN = 2
26+
OSC32KCLK = 0,
27+
RTC_CLKIN = 2
2828
} RTCName;
2929

3030
typedef enum {
@@ -37,7 +37,7 @@ typedef enum {
3737

3838
typedef enum {
3939
I2C_0 = (int)I2C0_BASE,
40-
I2C_1 = -1
40+
I2C_1 = -1
4141
} I2CName;
4242

4343
typedef enum {

libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL05Z/PeripheralPins.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
/************RTC***************/
2424
static const PinMap PinMap_RTC[] = {
25-
{NC, OSC32KCLK, 0},
25+
{NC, OSC32KCLK, 0},
2626
};
2727

2828
/************ADC***************/

libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL25Z/PeripheralNames.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ extern "C" {
2323
#endif
2424

2525
typedef enum {
26-
OSC32KCLK = 0,
27-
RTC_CLKIN = 2
26+
OSC32KCLK = 0,
27+
RTC_CLKIN = 2
2828
} RTCName;
2929

3030
typedef enum {
@@ -57,7 +57,7 @@ typedef enum {
5757
PWM_10 = (2 << TPM_SHIFT) | (1) // TPM2 CH1
5858
} PWMName;
5959

60-
#define CHANNELS_A_SHIFT 5
60+
#define CHANNELS_A_SHIFT 5
6161
typedef enum {
6262
ADC0_SE0 = 0,
6363
ADC0_SE3 = 3,

libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL25Z/PeripheralPins.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
/************RTC***************/
2525
static const PinMap PinMap_RTC[] = {
26-
{PTC1, RTC_CLKIN, 2},
26+
{PTC1, RTC_CLKIN, 2},
2727
};
2828

2929
/************ADC***************/

libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL46Z/PeripheralNames.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ extern "C" {
2323
#endif
2424

2525
typedef enum {
26-
OSC32KCLK = 0,
27-
RTC_CLKIN = 2
26+
OSC32KCLK = 0,
27+
RTC_CLKIN = 2
2828
} RTCName;
2929

3030
typedef enum {
@@ -57,7 +57,7 @@ typedef enum {
5757
PWM_10 = (2 << TPM_SHIFT) | (1) // TPM2 CH1
5858
} PWMName;
5959

60-
#define CHANNELS_A_SHIFT 5
60+
#define CHANNELS_A_SHIFT 5
6161
typedef enum {
6262
ADC0_SE0 = 0,
6363
ADC0_SE3 = 3,

libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL46Z/PeripheralPins.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
/************RTC***************/
2424
static const PinMap PinMap_RTC[] = {
25-
{PTC1, RTC_CLKIN, 2},
25+
{PTC1, RTC_CLKIN, 2},
2626
};
2727

2828
/************ADC***************/

libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL46Z/PinNames.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,13 +197,13 @@ typedef enum {
197197
// mbed original LED naming
198198
LED1 = LED_GREEN,
199199
LED2 = LED_RED,
200-
LED3 = LED_GREEN,
200+
LED3 = LED_GREEN,
201201
LED4 = LED_RED,
202202

203203
//Push buttons
204204
SW1 = PTC3,
205205
SW3 = PTC12,
206-
206+
207207
// USB Pins
208208
USBTX = PTA2,
209209
USBRX = PTA1,

libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/analogin_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
#include "clk_freqs.h"
2222
#include "PeripheralPins.h"
2323

24-
#define MAX_FADC 6000000
25-
#define CHANNELS_A_SHIFT 5
24+
#define MAX_FADC 6000000
25+
#define CHANNELS_A_SHIFT 5
2626

2727

2828
void analogin_init(analogin_t *obj, PinName pin) {

libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/clk_freqs.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ static uint32_t extosc_frequency(void) {
3434
if ((MCG->C1 & MCG_C1_CLKS_MASK) == MCG_C1_CLKS(2)) //MCG clock = external reference clock
3535
return MCGClock;
3636

37-
uint32_t divider, multiplier;
38-
#ifdef MCG_C5_PLLCLKEN0_MASK //PLL available
37+
uint32_t divider, multiplier;
38+
#ifdef MCG_C5_PLLCLKEN0_MASK //PLL available
3939
if ((MCG->C1 & MCG_C1_CLKS_MASK) == MCG_C1_CLKS(0)) { //PLL/FLL is selected
4040
if ((MCG->C6 & MCG_C6_PLLS_MASK) == 0x0u) { //FLL is selected
41-
#endif
41+
#endif
4242
if ((MCG->S & MCG_S_IREFST_MASK) == 0x0u) { //FLL uses external reference
4343
divider = (uint8_t)(1u << ((MCG->C1 & MCG_C1_FRDIV_MASK) >> MCG_C1_FRDIV_SHIFT));
4444
if ((MCG->C2 & MCG_C2_RANGE0_MASK) != 0x0u)
@@ -74,14 +74,14 @@ static uint32_t extosc_frequency(void) {
7474

7575
return MCGClock * divider / multiplier;
7676
}
77-
#ifdef MCG_C5_PLLCLKEN0_MASK
77+
#ifdef MCG_C5_PLLCLKEN0_MASK
7878
} else { //PLL is selected
7979
divider = (1u + (MCG->C5 & MCG_C5_PRDIV0_MASK));
8080
multiplier = ((MCG->C6 & MCG_C6_VDIV0_MASK) + 24u);
8181
return MCGClock * divider / multiplier;
8282
}
8383
}
84-
#endif
84+
#endif
8585

8686
//In all other cases either there is no crystal or we cannot determine it
8787
//For example when the FLL is running on the internal reference, and there is also an
@@ -95,17 +95,17 @@ static uint32_t mcgpllfll_frequency(void) {
9595
return 0;
9696

9797
uint32_t MCGClock = SystemCoreClock * (1u + ((SIM->CLKDIV1 & SIM_CLKDIV1_OUTDIV1_MASK) >> SIM_CLKDIV1_OUTDIV1_SHIFT));
98-
#ifdef MCG_C5_PLLCLKEN0_MASK
98+
#ifdef MCG_C5_PLLCLKEN0_MASK
9999
if ((MCG->C6 & MCG_C6_PLLS_MASK) == 0x0u) { //FLL is selected
100100
SIM->SOPT2 &= ~SIM_SOPT2_PLLFLLSEL_MASK; //MCG peripheral clock is FLL output
101-
#endif
101+
#endif
102102
return MCGClock;
103-
#ifdef MCG_C5_PLLCLKEN0_MASK
103+
#ifdef MCG_C5_PLLCLKEN0_MASK
104104
} else { //PLL is selected
105105
SIM->SOPT2 |= SIM_SOPT2_PLLFLLSEL_MASK; //MCG peripheral clock is PLL output
106106
return (MCGClock >> 1);
107107
}
108-
#endif
108+
#endif
109109

110110
//It is possible the SystemCoreClock isn't running on the PLL, and the PLL is still active
111111
//for the peripherals, this is however an unlikely setup

libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/rtc_api.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ static void init(void) {
2020
// enable RTC clock
2121
SIM->SCGC6 |= SIM_SCGC6_RTC_MASK;
2222

23-
pinmap_pinout(PinMap_RTC[0].pin, PinMap_RTC); //Map RTC clk input (if not NC)
23+
pinmap_pinout(PinMap_RTC[0].pin, PinMap_RTC); //Map RTC clk input (if not NC)
2424

2525
// select RTC clock source
2626
SIM->SOPT1 &= ~SIM_SOPT1_OSC32KSEL_MASK;
@@ -32,12 +32,12 @@ void rtc_init(void) {
3232

3333
//Configure the TSR. default value: 1
3434
RTC->TSR = 1;
35-
36-
if (PinMap_RTC[0].pin == NC) { //Use OSC32K
37-
RTC->CR |= RTC_CR_OSCE_MASK;
38-
//delay for OSCE stabilization
39-
for(int i=0; i<0x1000; i++) __NOP();
40-
}
35+
36+
if (PinMap_RTC[0].pin == NC) { //Use OSC32K
37+
RTC->CR |= RTC_CR_OSCE_MASK;
38+
//delay for OSCE stabilization
39+
for(int i=0; i<0x1000; i++) __NOP();
40+
}
4141

4242
// enable counter
4343
RTC->SR |= RTC_SR_TCE_MASK;
@@ -58,7 +58,7 @@ int rtc_isenabled(void) {
5858
// call init() if the rtc is enabled
5959

6060
// if RTC not enabled return 0
61-
SIM->SCGC5 |= SIM_SCGC5_PORTA_MASK;
61+
SIM->SCGC5 |= SIM_SCGC5_PORTA_MASK;
6262
SIM->SCGC6 |= SIM_SCGC6_RTC_MASK;
6363
if ((RTC->SR & RTC_SR_TCE_MASK) == 0)
6464
return 0;

libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/serial_api.c

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,22 @@
2828

2929
//Devices either user UART0 or UARTLP
3030
#ifndef UARTLP_BASES
31-
#define UARTLP_C2_RE_MASK UART0_C2_RE_MASK
32-
#define UARTLP_C2_TE_MASK UART0_C2_TE_MASK
33-
#define UARTLP_BDH_SBNS_MASK UART0_BDH_SBNS_MASK
34-
#define UARTLP_BDH_SBNS_SHIFT UART0_BDH_SBNS_SHIFT
35-
#define UARTLP_S1_TDRE_MASK UART0_S1_TDRE_MASK
36-
#define UARTLP_S1_OR_MASK UART0_S1_OR_MASK
37-
#define UARTLP_C2_RIE_MASK UART0_C2_RIE_MASK
38-
#define UARTLP_C2_TIE_MASK UART0_C2_TIE_MASK
39-
#define UARTLP_C2_SBK_MASK UART0_C2_SBK_MASK
40-
#define UARTLP_S1_RDRF_MASK UART0_S1_RDRF_MASK
31+
#define UARTLP_C2_RE_MASK UART0_C2_RE_MASK
32+
#define UARTLP_C2_TE_MASK UART0_C2_TE_MASK
33+
#define UARTLP_BDH_SBNS_MASK UART0_BDH_SBNS_MASK
34+
#define UARTLP_BDH_SBNS_SHIFT UART0_BDH_SBNS_SHIFT
35+
#define UARTLP_S1_TDRE_MASK UART0_S1_TDRE_MASK
36+
#define UARTLP_S1_OR_MASK UART0_S1_OR_MASK
37+
#define UARTLP_C2_RIE_MASK UART0_C2_RIE_MASK
38+
#define UARTLP_C2_TIE_MASK UART0_C2_TIE_MASK
39+
#define UARTLP_C2_SBK_MASK UART0_C2_SBK_MASK
40+
#define UARTLP_S1_RDRF_MASK UART0_S1_RDRF_MASK
4141
#endif
4242

4343
#ifdef UART2
44-
#define UART_NUM 3
44+
#define UART_NUM 3
4545
#else
46-
#define UART_NUM 1
46+
#define UART_NUM 1
4747
#endif
4848

4949
/******************************************************************************
@@ -73,20 +73,20 @@ void serial_init(serial_t *obj, PinName tx, PinName rx) {
7373
else
7474
SIM->SOPT2 |= (2<<SIM_SOPT2_UART0SRC_SHIFT);
7575
SIM->SCGC4 |= SIM_SCGC4_UART0_MASK; break;
76-
#if UART_NUM > 1
76+
#if UART_NUM > 1
7777
case UART_1: SIM->SCGC4 |= SIM_SCGC4_UART1_MASK; break;
7878
case UART_2: SIM->SCGC4 |= SIM_SCGC4_UART2_MASK; break;
79-
#endif
79+
#endif
8080
}
8181
// Disable UART before changing registers
8282
obj->uart->C2 &= ~(UARTLP_C2_RE_MASK | UARTLP_C2_TE_MASK);
8383

8484
switch (uart) {
8585
case UART_0: obj->index = 0; break;
86-
#if UART_NUM > 1
86+
#if UART_NUM > 1
8787
case UART_1: obj->index = 1; break;
8888
case UART_2: obj->index = 2; break;
89-
#endif
89+
#endif
9090
}
9191

9292
// set default baud rate and format
@@ -157,7 +157,7 @@ void serial_format(serial_t *obj, int data_bits, SerialParity parity, int stop_b
157157
// Disable UART before changing registers
158158
obj->uart->C2 &= ~(UARTLP_C2_RE_MASK | UARTLP_C2_TE_MASK);
159159

160-
// TODO: Support other number of data bits (also in the write method!)
160+
// TODO: Support other number of data bits (also in the write method!)
161161
if ((data_bits < 8) || (data_bits > 8)) {
162162
error("Invalid number of bits (%d) in serial format, should be 8\r\n", data_bits);
163163
}
@@ -223,10 +223,10 @@ void serial_irq_set(serial_t *obj, SerialIrq irq, uint32_t enable) {
223223
uint32_t vector = 0;
224224
switch ((int)obj->uart) {
225225
case UART_0: irq_n=UART0_IRQn; vector = (uint32_t)&uart0_irq; break;
226-
#if UART_NUM > 1
226+
#if UART_NUM > 1
227227
case UART_1: irq_n=UART1_IRQn; vector = (uint32_t)&uart1_irq; break;
228228
case UART_2: irq_n=UART2_IRQn; vector = (uint32_t)&uart2_irq; break;
229-
#endif
229+
#endif
230230
}
231231

232232
if (enable) {

libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/sleep.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ void deepsleep(void)
4444
//Switch back to PLL as clock source if needed
4545
//The interrupt that woke up the device will run at reduced speed
4646
if (PLL_FLL_en) {
47-
#ifdef MCG_C5_PLLCLKEN0_MASK //PLL available
47+
#ifdef MCG_C5_PLLCLKEN0_MASK //PLL available
4848
if (MCG->C6 & (1<<MCG_C6_PLLS_SHIFT) != 0) /* If PLL */
4949
while((MCG->S & MCG_S_LOCK0_MASK) == 0x00U); /* Wait until locked */
50-
#endif
50+
#endif
5151
MCG->C1 &= ~MCG_C1_CLKS_MASK;
5252
}
5353

0 commit comments

Comments
 (0)