forked from PAWPAW-Mirror/lib_xua
Added DFUDelay helper fund (endpoint 0 now in c so no timers... )
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
#include "devicedefines.h"
|
#include "devicedefines.h"
|
||||||
|
|
||||||
#include "xud.h"
|
#include "xud.h"
|
||||||
#include "usb.h"
|
#include "usb_std_requests.h"
|
||||||
|
|
||||||
#include "dfu_types.h"
|
#include "dfu_types.h"
|
||||||
#include "flash_interface.h"
|
#include "flash_interface.h"
|
||||||
@@ -22,6 +22,15 @@ extern int DFU_reset_override;
|
|||||||
extern void DFUCustomFlashEnable();
|
extern void DFUCustomFlashEnable();
|
||||||
extern void DFUCustomFlashDisable();
|
extern void DFUCustomFlashDisable();
|
||||||
|
|
||||||
|
void DFUDelay(unsigned d)
|
||||||
|
{
|
||||||
|
timer tmr;
|
||||||
|
unsigned s;
|
||||||
|
tmr :> s;
|
||||||
|
tmr when timerafter(s + d) :> void;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void temp()
|
void temp()
|
||||||
{
|
{
|
||||||
asm(".linkset DFU_reset_override, _edp.bss");
|
asm(".linkset DFU_reset_override, _edp.bss");
|
||||||
|
|||||||
Reference in New Issue
Block a user