Fixed upgrade tool to build against current libusb-win32.
This commit is contained in:
parent
a30ef31018
commit
fce43bcd98
|
@ -24,5 +24,5 @@ _bindata:
|
||||||
.incbin "../src/blackmagic.bin"
|
.incbin "../src/blackmagic.bin"
|
||||||
|
|
||||||
_bindatalen:
|
_bindatalen:
|
||||||
.word . - _bindata
|
.long (. - _bindata)
|
||||||
|
|
||||||
|
|
|
@ -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/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
# include <lusb0_usb.h>
|
||||||
|
#else
|
||||||
# include <usb.h>
|
# include <usb.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "dfu.h"
|
#include "dfu.h"
|
||||||
|
|
||||||
|
|
|
@ -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>
|
||||||
|
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -20,7 +20,11 @@
|
||||||
#ifndef __STM32MEM_H
|
#ifndef __STM32MEM_H
|
||||||
#define __STM32MEM_H
|
#define __STM32MEM_H
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
# include <lusb0_usb.h>
|
||||||
|
#else
|
||||||
# include <usb.h>
|
# 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);
|
||||||
|
|
Loading…
Reference in New Issue