X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Flib%2Fnet%2FDeluge%2Fextra%2Fm16c62p%2FHplM16c62pFlashC.nc;h=bc8255d0f47ae9c49d3ae90203de241247894f9b;hb=3a993e16707c4fde0d1df1f2826205563ca980e1;hp=49d6ffd58f7e50769cbc43a3ae7646d11845cac5;hpb=e3b86016fda95d4e54e2909f05dba41ca8461e16;p=tinyos-2.x.git diff --git a/tos/lib/net/Deluge/extra/m16c62p/HplM16c62pFlashC.nc b/tos/lib/net/Deluge/extra/m16c62p/HplM16c62pFlashC.nc index 49d6ffd5..bc8255d0 100644 --- a/tos/lib/net/Deluge/extra/m16c62p/HplM16c62pFlashC.nc +++ b/tos/lib/net/Deluge/extra/m16c62p/HplM16c62pFlashC.nc @@ -187,14 +187,14 @@ command uint8_t HplM16c62pFlash.FlashWrite( unsigned long flash_addr, "mov.w %[low], a0\n\t" "mov.w %[high], a1\n\t" - "mov.w #0x0040, r0\n\t" // Send write command - "ste.w r0, [a1a0]\n\t" + "mov.w #0x0040, r1\n\t" // Send write command + "ste.w r1, [a1a0]\n\t" - "mov.w %[data], r0\n\t" // Write data - "ste.w r0, [a1a0]\n\t" + "mov.w %[data], r1\n\t" // Write data + "ste.w r1, [a1a0]\n\t" : :[low] "r" (low), [high] "r" (high), [data] "r" (*buffer_addr) - : "memory", "r0", "a1", "a0"); + : "memory", "a1", "a0", "r1"); // Note: In EW1 Mode, the MCU is suspended until the operation completed @@ -238,4 +238,4 @@ command uint8_t HplM16c62pFlash.FlashRead(unsigned long address) { : "memory", "a0", "a1"); return data; } -} \ No newline at end of file +}