X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fstm%2Fao_usb_stm.c;h=9d72844e0c1a6710c06700f9725c13aae9d622a7;hb=89ecc32b90565ace078c4a84d4406a4d1f86821a;hp=3d26466b4deee8c607d440a61e372f9e09139a5b;hpb=7d21ff641a7bc35318f0f637589eabb5bb6c5152;p=fw%2Faltos diff --git a/src/stm/ao_usb_stm.c b/src/stm/ao_usb_stm.c index 3d26466b..9d72844e 100644 --- a/src/stm/ao_usb_stm.c +++ b/src/stm/ao_usb_stm.c @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of @@ -138,7 +139,7 @@ static inline uint32_t set_toggle(uint32_t current_value, static inline uint32_t *ao_usb_packet_buffer_addr(uint16_t sram_addr) { - return (uint32_t *) (stm_usb_sram + 2 * sram_addr); + return (uint32_t *) (((void *) ((uint8_t *) stm_usb_sram + 2 * sram_addr))); } static inline uint32_t ao_usb_epr_stat_rx(uint32_t epr) { @@ -173,7 +174,7 @@ static inline uint32_t ao_usb_epr_dtog_tx(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);