Fixed upgrade tool to build against current libusb-win32.

This commit is contained in:
Gareth McMullin 2013-08-19 12:26:05 +12:00
parent a30ef31018
commit fce43bcd98
5 changed files with 18 additions and 5 deletions

View File

@ -24,5 +24,5 @@ _bindata:
.incbin "../src/blackmagic.bin" .incbin "../src/blackmagic.bin"
_bindatalen: _bindatalen:
.word . - _bindata .long (. - _bindata)

View File

@ -18,7 +18,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <usb.h> #ifdef WIN32
# include <lusb0_usb.h>
#else
# include <usb.h>
#endif
#include "dfu.h" #include "dfu.h"

View File

@ -18,8 +18,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <stdio.h> #include <stdio.h>
#include <usb.h>
#include <string.h> #include <string.h>
#ifdef WIN32
# include <lusb0_usb.h>
#else
# include <usb.h>
#endif
#include <assert.h> #include <assert.h>

View File

@ -17,13 +17,14 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <usb.h>
#include <string.h> #include <string.h>
#ifdef WIN32 #ifdef WIN32
# include <windows.h> # include <windows.h>
# include <lusb0_usb.h>
#else #else
# include <unistd.h> # include <unistd.h>
# include <usb.h>
#endif #endif
#include "dfu.h" #include "dfu.h"

View File

@ -20,7 +20,11 @@
#ifndef __STM32MEM_H #ifndef __STM32MEM_H
#define __STM32MEM_H #define __STM32MEM_H
#include <usb.h> #ifdef WIN32
# include <lusb0_usb.h>
#else
# include <usb.h>
#endif
int stm32_mem_erase(usb_dev_handle *dev, uint16_t iface, uint32_t addr); int stm32_mem_erase(usb_dev_handle *dev, uint16_t iface, uint32_t addr);
int stm32_mem_write(usb_dev_handle *dev, uint16_t iface, void *data, int size); int stm32_mem_write(usb_dev_handle *dev, uint16_t iface, void *data, int size);