]> Chaos Git - corbenik/corbenik.git/commitdiff
s|tab|4space|g
authorchaoskagami <chaos.kagami@gmail.com>
Thu, 30 Jun 2016 01:29:56 +0000 (21:29 -0400)
committerchaoskagami <chaos.kagami@gmail.com>
Thu, 30 Jun 2016 01:30:48 +0000 (21:30 -0400)
source/config.c
source/fatfs/delay.s
source/fatfs/ffconf.h
source/fatfs/sdmmc.c
source/patch/svc.c
source/std/draw.c
source/std/memory.c

index 15db4ffbc104636816a2c891e379466fcb53022f..d6bbc3a32da3f7a58a06e87be702e14ca412b309 100644 (file)
@@ -94,10 +94,10 @@ save_config()
     if (!(conf_handle = fopen(PATH_CONFIG, "w")))
         abort("Failed to open config for write?\n");
 
-       config.options[OPTION_RECONFIGURED] = 0; // This should not persist to disk.
+    config.options[OPTION_RECONFIGURED] = 0; // This should not persist to disk.
 
     fwrite(&config, 1, sizeof(config), conf_handle);
     fclose(conf_handle);
 
-       config.options[OPTION_RECONFIGURED] = 1; // Save caches on boot.
+    config.options[OPTION_RECONFIGURED] = 1; // Save caches on boot.
 }
index 3a2cfdf5ff4dd322ebfc8a2b3712bba83ff2768f..77e42fac602048006ebaa8105d27c66eb8d848cd 100644 (file)
@@ -4,12 +4,12 @@
 
 @waitcycles ( u32 us )
 waitcycles:
-       PUSH    {R0-R2,LR}
-       STR     R0, [SP,#4]
-       waitcycles_loop:
-               LDR     R3, [SP,#4]
-               SUBS    R2, R3, #1
-               STR     R2, [SP,#4]
-               CMP     R3, #0
-               BNE     waitcycles_loop
-       POP     {R0-R2,PC}
+    PUSH    {R0-R2,LR}
+    STR     R0, [SP,#4]
+    waitcycles_loop:
+        LDR     R3, [SP,#4]
+        SUBS    R2, R3, #1
+        STR     R2, [SP,#4]
+        CMP     R3, #0
+        BNE     waitcycles_loop
+    POP     {R0-R2,PC}
index 10ac0deb1d2ddd6598d6747890ec078d0d496c83..158cbd43406cf9fd51a9ceb99229e91a1420f1d1 100644 (file)
 /  an RTC function or valid timestamp is not needed, set _FS_NORTC to 1 to disable
 /  the timestamp feature. All objects modified by FatFs will have a fixed timestamp
 /  defined by _NORTC_MON, _NORTC_MDAY and _NORTC_YEAR.
-/  When timestamp feature is enabled (_FS_NORTC        == 0), get_fattime() function need
+/  When timestamp feature is enabled (_FS_NORTC    == 0), get_fattime() function need
 /  to be added to the project to read current time form RTC. _NORTC_MON,
 /  _NORTC_MDAY and _NORTC_YEAR have no effect.
 /  These options have no effect at read-only configuration (_FS_READONLY == 1). */
index 34c4a6049a22517fbde2a287c07539736b31b484..8415180086ee44526596e6645021ba049bfe8310 100644 (file)
@@ -121,9 +121,9 @@ sdmmc_send_command(struct mmcdevice *ctx, uint32_t cmd, uint32_t args)
     sdmmc_write16(REG_SDSTATUS0, 0);
     sdmmc_write16(REG_SDSTATUS1, 0);
 #ifdef DATA32_SUPPORT
-//     if(readdata)sdmmc_mask16(REG_DATACTL32, 0x1000, 0x800);
-//     if(writedata)sdmmc_mask16(REG_DATACTL32, 0x800, 0x1000);
-//     sdmmc_mask16(REG_DATACTL32,0x1800,2);
+//    if(readdata)sdmmc_mask16(REG_DATACTL32, 0x1000, 0x800);
+//    if(writedata)sdmmc_mask16(REG_DATACTL32, 0x800, 0x1000);
+//    sdmmc_mask16(REG_DATACTL32,0x1800,2);
 #else
     sdmmc_mask16(REG_DATACTL32, 0x1800, 0);
 #endif
@@ -535,12 +535,12 @@ SD_Init()
     } while ((handelSD.ret[0] & 0x80000000) == 0);
     // do
     //{
-    // sdmmc_send_command(&handelSD,0x10437,handelSD.initarg << 0x10);
-    // sdmmc_send_command(&handelSD,0x10769,0x00FF8000 | temp);
+    //    sdmmc_send_command(&handelSD,0x10437,handelSD.initarg << 0x10);
+    //    sdmmc_send_command(&handelSD,0x10769,0x00FF8000 | temp);
     //
-    // DEBUGPRINT(topScreen, "sd error ", handelSD.error, 10, 20 + 17*8, RGB(40, 40, 40), RGB(208, 208, 208));
-    // DEBUGPRINT(topScreen, "sd ret: ", handelSD.ret[0], 10, 20 + 18*8, RGB(40, 40, 40), RGB(208, 208, 208));
-    // DEBUGPRINT(topScreen, "count: ", count++, 10, 20 + 19*8, RGB(40, 40, 40), RGB(208, 208, 208));
+    //    DEBUGPRINT(topScreen, "sd error ", handelSD.error, 10, 20 + 17*8, RGB(40, 40, 40), RGB(208, 208, 208));
+    //    DEBUGPRINT(topScreen, "sd ret: ", handelSD.ret[0], 10, 20 + 18*8, RGB(40, 40, 40), RGB(208, 208, 208));
+    //    DEBUGPRINT(topScreen, "count: ", count++, 10, 20 + 19*8, RGB(40, 40, 40), RGB(208, 208, 208));
     //}
     // while(!(handelSD.ret[0] & 0x80000000));
 
index 752448b359fd5067ac85b76278aaa2079d035401..9c4b90070b77cbcd7f980feb8c876c47c5d634b0 100644 (file)
@@ -40,7 +40,7 @@ PATCH(services)
 
         fclose(data);
 
-        //             memcpy(svc_tab_open, svcbackdoor, sizeof(svcbackdoor));
+        //        memcpy(svc_tab_open, svcbackdoor, sizeof(svcbackdoor));
         svcTable[0x7B] = 0xFFFF0000 + ((uint8_t *)svc_tab_open - (uint8_t *)exceptionsPage);
 
         svc_tab_open += size;
index 422698a2ead690fd1029e1550d351b82e60b8a68..3c95f8220dbccf29294bb79179df1e7966799c15 100644 (file)
@@ -286,10 +286,10 @@ draw_character(uint8_t *screen, const uint32_t character, int ch_x, int ch_y, co
 
     unsigned int c_font_w = (font_w / 8) + (font_w % 8 ? 1 : 0);
 
-       for (unsigned int yy = 0; yy < font_h; yy++) {
-               int xDisplacement = (x * SCREEN_DEPTH * height);
-               int yDisplacement = ((height - (y + yy) - 1) * SCREEN_DEPTH);
-               unsigned int pos = xDisplacement + yDisplacement;
+    for (unsigned int yy = 0; yy < font_h; yy++) {
+        int xDisplacement = (x * SCREEN_DEPTH * height);
+        int yDisplacement = ((height - (y + yy) - 1) * SCREEN_DEPTH);
+        unsigned int pos = xDisplacement + yDisplacement;
         unsigned char char_dat = ((char*)FCRAM_FONT_LOC)[(character - ' ') * (c_font_w * font_h) + yy];
         for(unsigned int i=0; i < font_w + font_kern; i++) {
             if (color_bg == 0) {
@@ -302,7 +302,7 @@ draw_character(uint8_t *screen, const uint32_t character, int ch_x, int ch_y, co
                 screen[pos + 2] = color_bg;
             }
 
-                       if (char_dat & 0x80) {
+            if (char_dat & 0x80) {
                 if (color_fg == 0) {
                     screen[pos]     = buffer_bg[pos];
                     screen[pos + 1] = buffer_bg[pos + 1];
@@ -312,12 +312,12 @@ draw_character(uint8_t *screen, const uint32_t character, int ch_x, int ch_y, co
                     screen[pos + 1] = color_fg >> 8;
                     screen[pos + 2] = color_fg;
                 }
-                       }
+            }
 
             char_dat <<= 1;
-                       pos += SCREEN_DEPTH * height;
+            pos += SCREEN_DEPTH * height;
         }
-       }
+    }
 }
 
 unsigned char color_top = 0xf0;
@@ -370,7 +370,7 @@ putc(void *buf, const int c)
             cursor_x[0] = 0;
             cursor_y[0] = 0;
 
-/*                     uint32_t col = SCREEN_TOP_HEIGHT * SCREEN_DEPTH;
+/*            uint32_t col = SCREEN_TOP_HEIGHT * SCREEN_DEPTH;
             uint32_t one_c = 8 * SCREEN_DEPTH;
             for (unsigned int x = 0; x < width * 8; x++) {
                 memmove(&screen[x * col + one_c], &screen[x * col + one_c], col - one_c);
index 56c4900dd5744c67c95931880ca92bc64a64f8e9..aab59c2519ed22ecbc22c0728dcb7b315a0e901e 100644 (file)
@@ -37,7 +37,7 @@ memcpy(void *dest, const void *src, size_t size)
     uint8_t *destc = (uint8_t *)dest;
     const uint8_t *srcc = (const uint8_t *)src;
 
-       for(size_t i=0; i < size; i++) {
+    for(size_t i=0; i < size; i++) {
         destc[i] = srcc[i];
     }
 }
@@ -55,7 +55,7 @@ memmove(void *dest, const void *src, size_t size)
     const uint8_t *srcc = (const uint8_t *)src;
 
     // Finish by copying the leftovers
-       for(size_t i=size; i > 0; i--) {
+    for(size_t i=size; i > 0; i--) {
         destc[i-1] = srcc[i-1];
     }
 }
@@ -66,7 +66,7 @@ memset(void *dest, const int filler, size_t size)
     char *destc = (char *)dest;
 
     // Finish
-       for(size_t i = 0; i < size; i++) {
+    for(size_t i = 0; i < size; i++) {
         destc[i] = filler;
     }
 }