From: chaoskagami Date: Thu, 30 Jun 2016 01:29:56 +0000 (-0400) Subject: s|tab|4space|g X-Git-Tag: v0.2.0~52 X-Git-Url: https://chaos.moe/g/?a=commitdiff_plain;h=e017c337e44c32ac5454afd02eb97c66f451fe24;p=corbenik%2Fcorbenik.git s|tab|4space|g --- diff --git a/source/config.c b/source/config.c index 15db4ff..d6bbc3a 100644 --- a/source/config.c +++ b/source/config.c @@ -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. } diff --git a/source/fatfs/delay.s b/source/fatfs/delay.s index 3a2cfdf..77e42fa 100644 --- a/source/fatfs/delay.s +++ b/source/fatfs/delay.s @@ -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} diff --git a/source/fatfs/ffconf.h b/source/fatfs/ffconf.h index 10ac0de..158cbd4 100644 --- a/source/fatfs/ffconf.h +++ b/source/fatfs/ffconf.h @@ -182,7 +182,7 @@ / 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). */ diff --git a/source/fatfs/sdmmc.c b/source/fatfs/sdmmc.c index 34c4a60..8415180 100644 --- a/source/fatfs/sdmmc.c +++ b/source/fatfs/sdmmc.c @@ -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)); diff --git a/source/patch/svc.c b/source/patch/svc.c index 752448b..9c4b900 100644 --- a/source/patch/svc.c +++ b/source/patch/svc.c @@ -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; diff --git a/source/std/draw.c b/source/std/draw.c index 422698a..3c95f82 100644 --- a/source/std/draw.c +++ b/source/std/draw.c @@ -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); diff --git a/source/std/memory.c b/source/std/memory.c index 56c4900..aab59c2 100644 --- a/source/std/memory.c +++ b/source/std/memory.c @@ -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; } }