X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fstmf0%2Fao_usb_stm.c;h=59aed3aa8ebec1435e21db3f8e65b01b4aacc69e;hb=refs%2Fheads%2Fbdale-ui;hp=a99b4cffd09c6ad4ca89be7317d894127802c834;hpb=a06c283c358455008cd1e5376ccc0b6f72c7ac87;p=fw%2Faltos diff --git a/src/stmf0/ao_usb_stm.c b/src/stmf0/ao_usb_stm.c index a99b4cff..b736d389 100644 --- a/src/stmf0/ao_usb_stm.c +++ b/src/stmf0/ao_usb_stm.c @@ -245,7 +245,7 @@ static inline uint32_t ao_usb_epr_sw_buf_rx(uint32_t epr) { * Set current device address and mark the * interface as active */ -void +static void ao_usb_set_address(uint8_t address) { debug("ao_usb_set_address %02x\n", address); @@ -957,7 +957,7 @@ ao_usb_ep0_handle(uint8_t receive) } #if AO_POWER_MANAGEMENT -void +static void ao_usb_suspend(void) { stm_usb.cntr |= (1 << STM_USB_CNTR_FSUSP); @@ -966,7 +966,7 @@ ao_usb_suspend(void) ao_clock_suspend(); } -void +static void ao_usb_wakeup(void) { ao_clock_resume(); @@ -1371,7 +1371,7 @@ _ao_usb_out_recv(void) _rx_dbg1("out_recv count", ao_usb_rx_count); } -int +static int _ao_usb_pollchar(void) { uint8_t c; @@ -1626,7 +1626,7 @@ ao_usb_irq(void) control_count, out_count, in_count, int_count, reset_count); } -__code struct ao_cmds ao_usb_cmds[] = { +const struct ao_cmds ao_usb_cmds[] = { { ao_usb_irq, "I\0Show USB interrupt counts" }, { 0, NULL } }; @@ -1689,9 +1689,9 @@ struct ao_usb_dbg { #endif }; -#define NUM_USB_DBG 128 +#define NUM_USB_DBG 16 -struct ao_usb_dbg dbg[128]; +struct ao_usb_dbg dbg[NUM_USB_DBG]; int dbg_i; static void _dbg(int line, char *msg, uint32_t value) @@ -1703,11 +1703,11 @@ static void _dbg(int line, char *msg, uint32_t value) asm("mrs %0,primask" : "=&r" (primask)); dbg[dbg_i].primask = primask; #if TX_DBG - dbg[dbg_i].in_count = in_count; - dbg[dbg_i].in_epr = stm_usb.epr[AO_USB_IN_EPR]; - dbg[dbg_i].in_pending = ao_usb_in_pending; - dbg[dbg_i].tx_count = ao_usb_tx_count; - dbg[dbg_i].in_flushed = ao_usb_in_flushed; + dbg[dbg_i].in_count = in3_count; + dbg[dbg_i].in_epr = stm_usb.epr[AO_USB_IN3_EPR].r; + dbg[dbg_i].in_pending = ao_usb_in3_pending; + dbg[dbg_i].tx_count = ao_usb_tx3_count; + dbg[dbg_i].in_flushed = ao_usb_in3_flushed; #endif #if RX_DBG dbg[dbg_i].rx_count = ao_usb_rx_count;