apache-mynewt-bot commented on PR #2860: URL: https://github.com/apache/mynewt-core/pull/2860#issuecomment-1204221174
<!-- style-bot --> ## Style check summary ### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md) #### hw/mcu/sifive/fe310/src/hal_flash.c <details> ```diff @@ -64,15 +64,15 @@ static int fe310_flash_read(const struct hal_flash *dev, uint32_t address, void *dst, - uint32_t num_bytes) + uint32_t num_bytes) { memcpy(dst, (void *)address, num_bytes); return 0; } -static int __attribute((section(".ram_text.fe310_flash_transmit"))) -fe310_flash_transmit(uint8_t out_byte) -{ +static int +__attribute((section(".ram_text.fe310_flash_transmit"))) +fe310_flash_transmit(uint8_t out_byte) { int in_byte; /* Empty RX FIFO */ @@ -80,15 +80,15 @@ } SPI0_REG(SPI_REG_TXFIFO) = out_byte; do { - in_byte = SPI0_REG(SPI_REG_RXFIFO); + in_byte = SPI0_REG(SPI_REG_RXFIFO); } while (in_byte < 0); return in_byte; } -static int __attribute((section(".ram_text.fe310_flash_fifo_put"))) -fe310_flash_fifo_put(uint8_t out_byte) -{ +static int +__attribute((section(".ram_text.fe310_flash_fifo_put"))) +fe310_flash_fifo_put(uint8_t out_byte) { int went_out = 0; /* Empty RX FIFO */ @@ -105,9 +105,9 @@ return went_out; } -static int __attribute((section(".ram_text.fe310_flash_fifo_write"))) -fe310_flash_fifo_write(const uint8_t *ptr, int count) -{ +static int +__attribute((section(".ram_text.fe310_flash_fifo_write"))) +fe310_flash_fifo_write(const uint8_t *ptr, int count) { int went_out = 0; while (count > 0) { @@ -123,9 +123,9 @@ return went_out; } -static int __attribute((section(".ram_text.fe310_flash_wait_till_ready"))) -fe310_flash_wait_till_ready(void) -{ +static int +__attribute((section(".ram_text.fe310_flash_wait_till_ready"))) +fe310_flash_wait_till_ready(void) { int status; do { SPI0_REG(SPI_REG_CSMODE) = SPI_CSMODE_HOLD; @@ -138,19 +138,19 @@ return 0; } -static int __attribute((section(".ram_text.fe310_flash_write_enable"))) -fe310_flash_write_enable(void) -{ +static int +__attribute((section(".ram_text.fe310_flash_write_enable"))) +fe310_flash_write_enable(void) { SPI0_REG(SPI_REG_CSMODE) = SPI_CSMODE_HOLD; fe310_flash_transmit(FLASH_CMD_WRITE_ENABLE); SPI0_REG(SPI_REG_CSMODE) = SPI_CSMODE_AUTO; return 0; } -static int __attribute((section(".ram_text.fe310_flash_write_page"))) __attribute((noinline)) +static int +__attribute((section(".ram_text.fe310_flash_write_page"))) __attribute((noinline)) fe310_flash_write_page(const struct hal_flash *dev, uint32_t address, - const void *src, uint32_t num_bytes) -{ + const void *src, uint32_t num_bytes) { int sr; /* Number of bytes that left controller FIFO */ int went_out = 0; @@ -232,9 +232,9 @@ return 0; } -static int __attribute((section(".ram_text.fe310_flash_erase_sector"))) __attribute((noinline)) -fe310_flash_erase_sector(const struct hal_flash *dev, uint32_t sector_address) -{ +static int +__attribute((section(".ram_text.fe310_flash_erase_sector"))) __attribute((noinline)) +fe310_flash_erase_sector(const struct hal_flash *dev, uint32_t sector_address) { int sr; __HAL_DISABLE_INTERRUPTS(sr); ``` </details> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org