Skip to content

Commit efbbb2f

Browse files
author
Bogdan Marinescu
committed
Merge branch 'master' of git://github.com/sg-/mbed into sg--master
Conflicts: libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/gpio_irq_api.c libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F103RB/gpio_irq_api.c libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/gpio_irq_api.c
2 parents 6e20ca1 + b64e322 commit efbbb2f

File tree

19 files changed

+31
-25
lines changed

19 files changed

+31
-25
lines changed

libraries/mbed/common/exit.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
*/
1616
#include "semihost_api.h"
1717
#include "mbed_interface.h"
18+
#if DEVICE_STDIO_MESSAGES
19+
#include <stdio.h>
20+
#endif
1821

1922
#ifdef TOOLCHAIN_GCC_CW
2023
// TODO: Ideally, we would like to define directly "_ExitProcess"
@@ -23,6 +26,11 @@ void mbed_exit(int return_code) {
2326
void exit(int return_code) {
2427
#endif
2528

29+
#if DEVICE_STDIO_MESSAGES
30+
fflush(stdout);
31+
fflush(stderr);
32+
#endif
33+
2634
#if DEVICE_SEMIHOST
2735
if (mbed_interface_connected()) {
2836
semihost_exit();

libraries/mbed/targets/hal/TARGET_Freescale/TARGET_K20D5M/gpio_irq_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ int gpio_irq_init(gpio_irq_t *obj, PinName pin, gpio_irq_handler handler, uint32
108108
break;
109109

110110
default:
111-
error("gpio_irq only supported on port A-E.\n");
111+
error("gpio_irq only supported on port A-E.");
112112
break;
113113
}
114114
NVIC_SetVector(irq_n, vector);

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ void serial_format(serial_t *obj, int data_bits, SerialParity parity, int stop_b
126126

127127
// 8 data bits = 0 ... 9 data bits = 1
128128
if ((data_bits < 8) || (data_bits > 9))
129-
error("Invalid number of bits (%d) in serial format, should be 8..9\r\n", data_bits);
129+
error("Invalid number of bits (%d) in serial format, should be 8..9", data_bits);
130130

131131
data_bits -= 8;
132132

@@ -136,13 +136,13 @@ void serial_format(serial_t *obj, int data_bits, SerialParity parity, int stop_b
136136
case ParityOdd : parity_enable = 1; parity_select = 1; data_bits++; break;
137137
case ParityEven: parity_enable = 1; parity_select = 0; data_bits++; break;
138138
default:
139-
error("Invalid serial parity setting\r\n");
139+
error("Invalid serial parity setting");
140140
return;
141141
}
142142

143143
// 1 stop bits = 0, 2 stop bits = 1
144144
if ((stop_bits != 1) && (stop_bits != 2))
145-
error("Invalid stop bits specified\r\n");
145+
error("Invalid stop bits specified");
146146
stop_bits -= 1;
147147

148148
uint32_t m10 = 0;
@@ -151,7 +151,7 @@ void serial_format(serial_t *obj, int data_bits, SerialParity parity, int stop_b
151151
if (data_bits == 2) {
152152
// only uart0 supports 10 bit communication
153153
if (obj->index != 0)
154-
error("Invalid number of bits (9) to be used with parity\r\n");
154+
error("Invalid number of bits (9) to be used with parity");
155155
data_bits = 0;
156156
m10 = 1;
157157
}

libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL05Z/gpio_irq_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ int gpio_irq_init(gpio_irq_t *obj, PinName pin, gpio_irq_handler handler, uint32
9999
break;
100100

101101
default:
102-
error("gpio_irq only supported on Port A and B\n");
102+
error("gpio_irq only supported on Port A and B");
103103
break;
104104
}
105105
NVIC_SetVector(irq_n, vector);

libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL25Z/gpio_irq_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ int gpio_irq_init(gpio_irq_t *obj, PinName pin, gpio_irq_handler handler, uint32
8989
break;
9090

9191
default:
92-
error("gpio_irq only supported on port A and D\n");
92+
error("gpio_irq only supported on port A and D");
9393
break;
9494
}
9595
NVIC_SetVector(irq_n, vector);

libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL46Z/gpio_irq_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ int gpio_irq_init(gpio_irq_t *obj, PinName pin, gpio_irq_handler handler, uint32
109109
break;
110110

111111
default:
112-
error("gpio_irq only supported on port A,C and D\n");
112+
error("gpio_irq only supported on port A,C and D");
113113
break;
114114
}
115115
NVIC_SetVector(irq_n, vector);

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ void serial_format(serial_t *obj, int data_bits, SerialParity parity, int stop_b
159159

160160
// TODO: Support other number of data bits (also in the write method!)
161161
if ((data_bits < 8) || (data_bits > 8)) {
162-
error("Invalid number of bits (%d) in serial format, should be 8\r\n", data_bits);
162+
error("Invalid number of bits (%d) in serial format, should be 8", data_bits);
163163
}
164164

165165
uint8_t parity_enable, parity_select;
@@ -168,13 +168,13 @@ void serial_format(serial_t *obj, int data_bits, SerialParity parity, int stop_b
168168
case ParityOdd : parity_enable = 1; parity_select = 1; data_bits++; break;
169169
case ParityEven: parity_enable = 1; parity_select = 0; data_bits++; break;
170170
default:
171-
error("Invalid serial parity setting\r\n");
171+
error("Invalid serial parity setting");
172172
return;
173173
}
174174

175175
// 1 stop bits = 0, 2 stop bits = 1
176176
if ((stop_bits != 1) && (stop_bits != 2)) {
177-
error("Invalid stop bits specified\r\n");
177+
error("Invalid stop bits specified");
178178
}
179179
stop_bits -= 1;
180180

libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/device.h

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

5050
#define DEVICE_DEBUG_AWARENESS 0
5151

52-
#define DEVICE_STDIO_MESSAGES 0
52+
#define DEVICE_STDIO_MESSAGES 1
5353

5454
#define DEVICE_ERROR_RED 1
5555

libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/gpio_irq_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ int gpio_irq_init(gpio_irq_t *obj, PinName pin, gpio_irq_handler handler, uint32
109109
break;
110110

111111
default:
112-
error("gpio_irq only supported on port A-E.\n");
112+
error("gpio_irq only supported on port A-E.");
113113
break;
114114
}
115115
NVIC_SetVector(irq_n, vector);

libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/spi_api.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ static const PinMap PinMap_SPI_MOSI[] = {
4242
{PTB16, SPI_1, 2},
4343
{PTB22, SPI_2, 2},
4444
{PTC6 , SPI_0, 2},
45-
{PTD2 , SPI_0, 2},
46-
{PTD6 , SPI_0, 7},
45+
{PTD6 , SPI_1, 7},
4746
{NC , NC , 0}
4847
};
4948

@@ -55,7 +54,6 @@ static const PinMap PinMap_SPI_MISO[] = {
5554
{PTB17, SPI_1, 2},
5655
{PTB23, SPI_2, 2},
5756
{PTC7 , SPI_0, 2},
58-
{PTD3 , SPI_0, 2},
5957
{PTD7 , SPI_1, 7},
6058
{NC , NC , 0}
6159
};

libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC176X/gpio_irq_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ int gpio_irq_init(gpio_irq_t *obj, PinName pin, gpio_irq_handler handler, uint32
8989

9090
// Interrupts available only on GPIO0 and GPIO2
9191
if (obj->port != LPC_GPIO0_BASE && obj->port != LPC_GPIO2_BASE) {
92-
error("pins on this port cannot generate interrupts\n");
92+
error("pins on this port cannot generate interrupts");
9393
}
9494

9595
// put us in the interrupt table

libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC23XX/gpio_irq_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ int gpio_irq_init(gpio_irq_t *obj, PinName pin, gpio_irq_handler handler, uint32
8080

8181
// Interrupts available only on GPIO0 and GPIO2
8282
if (obj->port != LPC_GPIO0_BASE && obj->port != LPC_GPIO2_BASE) {
83-
error("pins on this port cannot generate interrupts\n");
83+
error("pins on this port cannot generate interrupts");
8484
}
8585

8686
// put us in the interrupt table

libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC408X/gpio_irq_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ int gpio_irq_init(gpio_irq_t *obj, PinName pin, gpio_irq_handler handler, uint32
102102

103103
// Interrupts available only on GPIO0 and GPIO2
104104
if (obj->port != LPC_GPIO0_BASE && obj->port != LPC_GPIO2_BASE) {
105-
error("pins on this port cannot generate interrupts\n");
105+
error("pins on this port cannot generate interrupts");
106106
}
107107

108108
// put us in the interrupt table

libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F051R8/gpio_irq_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ int gpio_irq_init(gpio_irq_t *obj, PinName pin, gpio_irq_handler handler, uint32
104104
irq_index = 2;
105105
break;
106106
default:
107-
error("This pin is not supported\n");
107+
error("This pin is not supported");
108108
return -1;
109109
}
110110

libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F100RB/gpio_irq_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ int gpio_irq_init(gpio_irq_t *obj, PinName pin, gpio_irq_handler handler, uint32
110110
irq_index = 3;
111111
break;
112112
default:
113-
error("This pin is not supported with InterruptIn.\n");
113+
error("This pin is not supported with InterruptIn.");
114114
return -1;
115115
}
116116

libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F407VG/gpio_irq_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ int gpio_irq_init(gpio_irq_t *obj, PinName pin, gpio_irq_handler handler, uint32
138138
irq_index = 6;
139139
break;
140140
default:
141-
error("InterruptIn error: pin not supported.\n");
141+
error("InterruptIn error: pin not supported.");
142142
return -1;
143143
}
144144

libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F302R8/gpio_irq_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ int gpio_irq_init(gpio_irq_t *obj, PinName pin, gpio_irq_handler handler, uint32
154154
irq_index = 6;
155155
break;
156156
default:
157-
error("This pin is not supported with InterruptIn.\n");
157+
error("This pin is not supported with InterruptIn.");
158158
return -1;
159159
}
160160

libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/gpio_irq_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ int gpio_irq_init(gpio_irq_t *obj, PinName pin, gpio_irq_handler handler, uint32
138138
irq_index = 6;
139139
break;
140140
default:
141-
error("InterruptIn error: pin not supported.\n");
141+
error("InterruptIn error: pin not supported.");
142142
return -1;
143143
}
144144

libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F3XX/gpio_irq_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ int gpio_irq_init(gpio_irq_t *obj, PinName pin, gpio_irq_handler handler, uint32
154154
irq_index = 6;
155155
break;
156156
default:
157-
error("This pin is not supported with InterruptIn.\n");
157+
error("This pin is not supported with InterruptIn.");
158158
return -1;
159159
}
160160

0 commit comments

Comments
 (0)