Skip to content

Commit

Permalink
Remove g_sbuf altogether
Browse files Browse the repository at this point in the history
  • Loading branch information
Baldanos committed Jan 22, 2021
1 parent f724875 commit 09e4f5c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 3 additions & 4 deletions src/common/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@
/* Generic large buffer.*/
uint8_t fbuff[2048];

uint32_t g_sbuf_idx;
uint8_t g_sbuf[NB_SBUFFER+128] __attribute__ ((aligned (4)));

extern uint32_t debug_flags;
extern char log_dest[];

Expand Down Expand Up @@ -434,17 +431,19 @@ int cmd_debug_test_rx(t_hydra_console *con, t_tokenline_parsed *p)
{
(void)p;
BaseSequentialStream* chp = con->bss;
uint8_t * inbuf = pool_alloc_bytes(0x1000); // 4096 bytes

cprintf(con, "Test debug-rx started, stop it with UBTN + Key\r\n");
while(1) {
chnRead(chp, (uint8_t *)g_sbuf, sizeof(g_sbuf) - 1);
chnRead(chp, inbuf, 0x0FFF);

/* Exit if User Button is pressed */
if (hydrabus_ubtn()) {
break;
}
//get_char(con);
}
pool_free(inbuf);
return TRUE;
}

Expand Down
2 changes: 0 additions & 2 deletions src/common/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ extern uint8_t fbuff[2048] __attribute__ ((section(".cmm")));

#define NB_SBUFFER (65536)
#define G_SBUF_SDC_BURST_SIZE (NB_SBUFFER/MMCSD_BLOCK_SIZE) /* how many sectors reads at once */
extern uint32_t g_sbuf_idx;
extern uint8_t g_sbuf[NB_SBUFFER+128] __attribute__ ((aligned (4)));

/* USB1: Virtual serial port over USB.*/
extern SerialUSBDriver SDU1;
Expand Down

0 comments on commit 09e4f5c

Please sign in to comment.