Skip to content

Commit ee887fe

Browse files
committed
[USB] Template alignment
Signed-off-by: Frederic Pillon <[email protected]>
1 parent 5349e31 commit ee887fe

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

cores/arduino/stm32/usb/usbd_conf.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* This software component is licensed by ST under Ultimate Liberty license
1313
* SLA0044, the "License"; You may not use this file except in compliance with
1414
* the License. You may obtain a copy of the License at:
15-
* http://www.st.com/SLA0044
15+
* www.st.com/SLA0044
1616
*
1717
******************************************************************************
1818
*/

cores/arduino/stm32/usb/usbd_conf.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* This software component is licensed by ST under Ultimate Liberty license
1313
* SLA0044, the "License"; You may not use this file except in compliance with
1414
* the License. You may obtain a copy of the License at:
15-
* http://www.st.com/SLA0044
15+
* www.st.com/SLA0044
1616
*
1717
******************************************************************************
1818
*/

cores/arduino/stm32/usb/usbd_desc.c

+10-10
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* This software component is licensed by ST under Ultimate Liberty license
1313
* SLA0044, the "License"; You may not use this file except in compliance with
1414
* the License. You may obtain a copy of the License at:
15-
* http://www.st.com/SLA0044
15+
* www.st.com/SLA0044
1616
*
1717
******************************************************************************
1818
*/
@@ -272,9 +272,9 @@ static void Get_SerialNum(void)
272272

273273
deviceserial0 += deviceserial2;
274274

275-
if (deviceserial0 != 0) {
276-
IntToUnicode(deviceserial0, &USBD_StringSerial[2], 8);
277-
IntToUnicode(deviceserial1, &USBD_StringSerial[18], 4);
275+
if (deviceserial0 != 0U) {
276+
IntToUnicode(deviceserial0, &USBD_StringSerial[2], 8U);
277+
IntToUnicode(deviceserial1, &USBD_StringSerial[18], 4U);
278278
}
279279
}
280280

@@ -287,18 +287,18 @@ static void Get_SerialNum(void)
287287
*/
288288
static void IntToUnicode(uint32_t value, uint8_t *pbuf, uint8_t len)
289289
{
290-
uint8_t idx = 0;
290+
uint8_t idx = 0U;
291291

292-
for (idx = 0 ; idx < len ; idx ++) {
293-
if (((value >> 28)) < 0xA) {
294-
pbuf[ 2 * idx] = (value >> 28) + '0';
292+
for (idx = 0U ; idx < len ; idx ++) {
293+
if (((value >> 28)) < 0xAU) {
294+
pbuf[ 2U * idx] = (value >> 28) + '0';
295295
} else {
296-
pbuf[2 * idx] = (value >> 28) + 'A' - 10;
296+
pbuf[2U * idx] = (value >> 28) + 'A' - 10U;
297297
}
298298

299299
value = value << 4;
300300

301-
pbuf[ 2 * idx + 1] = 0;
301+
pbuf[2U * idx + 1] = 0U;
302302
}
303303
}
304304
#endif /* USBCON */

cores/arduino/stm32/usb/usbd_desc.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* This software component is licensed by ST under Ultimate Liberty license
1313
* SLA0044, the "License"; You may not use this file except in compliance with
1414
* the License. You may obtain a copy of the License at:
15-
* http://www.st.com/SLA0044
15+
* www.st.com/SLA0044
1616
*
1717
******************************************************************************
1818
*/

0 commit comments

Comments
 (0)