Skip to content

Commit 24d5225

Browse files
authored
fixed libc whitespace (#698)
1 parent 7318533 commit 24d5225

32 files changed

Lines changed: 226 additions & 226 deletions

File tree

examples/library_examples/fontlibc/example/src/fonts/fonts.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/* This contains the raw data for the font. */
44
static const unsigned char test_font_data[] =
55
{
6-
#include "testfont.inc"
6+
#include "testfont.inc"
77
};
88

99
/* However, C89 does not allow us to typecast a byte array into a

examples/library_examples/graphx/text_custom/src/main.c

Lines changed: 128 additions & 128 deletions
Large diffs are not rendered by default.

examples/library_examples/srldrvce/srl_echo/src/main.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,31 @@ static usb_error_t handle_usb_event(usb_event_t event, void *event_data,
2828
if ((err = srl_UsbEventCallback(event, event_data, callback_data)) != USB_SUCCESS)
2929
return err;
3030
/* Enable newly connected devices */
31-
if(event == USB_DEVICE_CONNECTED_EVENT && !(usb_GetRole() & USB_ROLE_DEVICE)) {
31+
if (event == USB_DEVICE_CONNECTED_EVENT && !(usb_GetRole() & USB_ROLE_DEVICE)) {
3232
usb_device_t device = event_data;
3333
printf("device connected\n");
3434
usb_ResetDevice(device);
3535
}
3636

3737
/* Call srl_Open on newly enabled device, if there is not currently a serial device in use */
38-
if(event == USB_HOST_CONFIGURE_EVENT || (event == USB_DEVICE_ENABLED_EVENT && !(usb_GetRole() & USB_ROLE_DEVICE))) {
38+
if (event == USB_HOST_CONFIGURE_EVENT || (event == USB_DEVICE_ENABLED_EVENT && !(usb_GetRole() & USB_ROLE_DEVICE))) {
3939

4040
/* If we already have a serial device, ignore the new one */
41-
if(has_srl_device) return USB_SUCCESS;
41+
if (has_srl_device) return USB_SUCCESS;
4242

4343
usb_device_t device;
44-
if(event == USB_HOST_CONFIGURE_EVENT) {
44+
if (event == USB_HOST_CONFIGURE_EVENT) {
4545
/* Use the device representing the USB host. */
4646
device = usb_FindDevice(NULL, NULL, USB_SKIP_HUBS);
47-
if(device == NULL) return USB_SUCCESS;
47+
if (device == NULL) return USB_SUCCESS;
4848
} else {
4949
/* Use the newly enabled device */
5050
device = event_data;
5151
}
5252

5353
/* Initialize the serial library with the newly attached device */
5454
srl_error_t error = srl_Open(&srl, device, srl_buf, sizeof srl_buf, SRL_INTERFACE_ANY, 9600);
55-
if(error) {
55+
if (error) {
5656
/* Print the error code to the homescreen */
5757
printf("Error %d initting serial\n", error);
5858
return USB_SUCCESS;
@@ -63,9 +63,9 @@ static usb_error_t handle_usb_event(usb_event_t event, void *event_data,
6363
has_srl_device = true;
6464
}
6565

66-
if(event == USB_DEVICE_DISCONNECTED_EVENT) {
66+
if (event == USB_DEVICE_DISCONNECTED_EVENT) {
6767
usb_device_t device = event_data;
68-
if(device == srl.dev) {
68+
if (device == srl.dev) {
6969
printf("device disconnected\n");
7070
srl_Close(&srl);
7171
has_srl_device = false;
@@ -80,7 +80,7 @@ int main(void) {
8080
const usb_standard_descriptors_t *desc = srl_GetCDCStandardDescriptors();
8181
/* Initialize the USB driver with our event handler and the serial device descriptors */
8282
usb_error_t usb_error = usb_Init(handle_usb_event, NULL, desc, USB_DEFAULT_INIT_FLAGS);
83-
if(usb_error) {
83+
if (usb_error) {
8484
usb_Cleanup();
8585
printf("usb init error %u\n", usb_error);
8686
do kb_Scan(); while(!kb_IsDown(kb_KeyClear));
@@ -92,17 +92,17 @@ int main(void) {
9292

9393
usb_HandleEvents();
9494

95-
if(has_srl_device) {
95+
if (has_srl_device) {
9696
char in_buf[64];
9797

9898
/* Read up to 64 bytes from the serial buffer */
9999
size_t bytes_read = srl_Read(&srl, in_buf, sizeof in_buf);
100100

101101
/* Check for an error (e.g. device disconneced) */
102-
if(bytes_read < 0) {
102+
if (bytes_read < 0) {
103103
printf("error %d on srl_Read\n", bytes_read);
104104
has_srl_device = false;
105-
} else if(bytes_read > 0) {
105+
} else if (bytes_read > 0) {
106106
/* Write the data back to serial */
107107
srl_Write(&srl, in_buf, bytes_read);
108108
}

src/ce/include/ti/flags.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ bool os_TestFlagBitsFast(uint16_t offset_pattern);
242242
#define OS_FLAGS_ASM1 0x21 /**< GROUP: Intentionally unused by TI, available for programs! */
243243
#define OS_FLAGS_ASM2 0x22 /**< GROUP: Intentionally unused by TI, available for programs! */
244244
#define OS_FLAGS_ARCHIVE 0x24 /**< GROUP: Archive stuff */
245-
#define OS_FLAGS_ARCHIVE_CHECKBATTERY 0 /**< 1 = check battery levels in Arc_Unarc first and throw error if low */
245+
#define OS_FLAGS_ARCHIVE_CHECKBATTERY 0 /**< 1 = check battery levels in Arc_Unarc first and throw error if low */
246246
#define OS_FLAGS_GETSEND 0x24 /**< FLAGS */
247247
#define OS_FLAGS_GETSEND_COMFAILED 1 /**< 1 = Get/Send Communication Failed */
248248
#define OS_FLAGS_SELFTEST 0x24 /**< GROUP: Self-test screen */

src/ce/include/ti/getcsc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ bool boot_CheckOnPressed(void);
4343
* uint8_t key, i = 0;
4444
* char buffer[50];
4545
*
46-
* while((key = os_GetCSC()) != sk_Enter) {
47-
* if(chars[key]) {
46+
* while ((key = os_GetCSC()) != sk_Enter) {
47+
* if (chars[key]) {
4848
* buffer[i++] = chars[key];
4949
* }
5050
* }

src/ce/include/ti/screen.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ uint24_t os_GetDrawBGColor(void);
304304
#define os_PenCol (*(uint24_t*)0xD008D2)
305305
/** `uint8_t`: Small font row position */
306306
#define os_PenRow (*(uint8_t*)0xD008D5)
307-
/** `uint16_t`: Small font background 565 BGR color */
307+
/** `uint16_t`: Small font background 565 BGR color */
308308
#define os_DrawBGColor (*(uint16_t*)0xD026AA)
309309
/** `uint16_t`: Small font foreground 565 BGR color */
310310
#define os_DrawFGColor (*(uint16_t*)0xD026AC)

src/fileioc/fileioc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ void ti_SetGCBehavior(void (*before)(void), void (*after)(void));
630630
#define ti_K _Pragma("GCC warning \"'ti_K' is deprecated, use 'OS_VAR_K' instead\"") OS_VAR_K
631631
#define ti_L _Pragma("GCC warning \"'ti_L' is deprecated, use 'OS_VAR_L' instead\"") OS_VAR_L
632632
#define ti_M _Pragma("GCC warning \"'ti_M' is deprecated, use 'OS_VAR_M' instead\"") OS_VAR_M
633-
#define ti_N _Pragma("GCC warning \"'ti_N' is deprecated, use 'OS_VAR_N' instead\"") OS_VAR_N
633+
#define ti_N _Pragma("GCC warning \"'ti_N' is deprecated, use 'OS_VAR_N' instead\"") OS_VAR_N
634634
#define ti_O _Pragma("GCC warning \"'ti_O' is deprecated, use 'OS_VAR_O' instead\"") OS_VAR_O
635635
#define ti_P _Pragma("GCC warning \"'ti_P' is deprecated, use 'OS_VAR_P' instead\"") OS_VAR_P
636636
#define ti_Q _Pragma("GCC warning \"'ti_Q' is deprecated, use 'OS_VAR_Q' instead\"") OS_VAR_Q

src/fontlibc/fontlibc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ fontlib_font_t *fontlib_GetFontByIndex(const char *font_pack_name, uint8_t index
800800
* FONTLIB_MONOSPACE to REJECT monospaced fonts.
801801
* @return Direct pointer to font, or NULL if no matching font is found
802802
*/
803-
fontlib_font_t *fontlib_GetFontByStyleRaw(const fontlib_font_pack_t *font_pack, uint8_t size_min, uint8_t size_max, uint8_t weight_min, uint8_t weight_max, uint8_t style_bits_set, uint8_t style_bits_reset);
803+
fontlib_font_t *fontlib_GetFontByStyleRaw(const fontlib_font_pack_t *font_pack, uint8_t size_min, uint8_t size_max, uint8_t weight_min, uint8_t weight_max, uint8_t style_bits_set, uint8_t style_bits_reset);
804804

805805
/**
806806
* Gets a pointer to a font, suitable for passing to SetFont(), given a font

src/graphx/graphx.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ gfx_RotatedScaledTransparentSprite_NoClip(sprite, x, y, angle, 64)
481481
* @param[in] angle 256 position angular integer.
482482
* @see gfx_RotatedScaledTransparentSprite.
483483
*/
484-
#define gfx_RotatedTransparentSprite(sprite, x, y, angle) \
484+
#define gfx_RotatedTransparentSprite(sprite, x, y, angle) \
485485
gfx_RotatedScaledTransparentSprite(sprite, x, y, angle, 64)
486486

487487
/**

src/keypadc/keypadc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ typedef enum {
134134
*
135135
* Likewise, you can test keys with the following general format:
136136
* @code{.cpp}
137-
* if (kb_Data[group] & kb_Name){
137+
* if (kb_Data[group] & kb_Name) {
138138
* ...
139139
* }
140140
* @endcode

0 commit comments

Comments
 (0)