X-Git-Url: https://git.cryptolib.org/?p=labortage2013badge.git;a=blobdiff_plain;f=firmware%2Fspecial_functions.S;h=d3c9c51d9b453c9571cf213aa5fdc86c7246e80d;hp=88ae6dcba8393a330bda2cce8c036c6c9fc7c488;hb=d6003d9a8f792c6e7198039e43693c36bf5f4550;hpb=3fab3abc63b0bed22742265a0998a3b3381da980 diff --git a/firmware/special_functions.S b/firmware/special_functions.S index 88ae6dc..d3c9c51 100644 --- a/firmware/special_functions.S +++ b/firmware/special_functions.S @@ -20,38 +20,6 @@ #include #include "usbconfig.h" -.global exec_spm -/* void exec_spm(uint16_t z, uint16_t r0r1, void* dest, void* src, uint8_t len); */ -exec_spm: - push r28 - push r29 - movw r30, r24 - movw r0, r22 - movw r28, r20 - movw r26, r18 - movw r24, r16 - in r23, _SFR_IO_ADDR(SREG) - cli - tst r24 - breq spm_cmd - dec r24 - breq last_store -copy_loop: - ld r22, X+ - st Y+, r22 - dec r24 - brne copy_loop -last_store: - ld r22, X+ - st Y+, r22 -spm_cmd: - spm - out _SFR_IO_ADDR(SREG), r23 - clr r1 - pop r29 - pop r28 - ret - .global soft_reset soft_reset: cli