Update UC3 platform driver support to use the bitmasks defined in the header files...
[pub/USBasp.git] / Projects / AVRISP-MKII / Lib / XPROG / XMEGANVM.c
index b1fea59..e4f1186 100644 (file)
 static void XMEGANVM_SendAddress(const uint32_t AbsoluteAddress)
 {
        /* Send the given 32-bit address to the target, LSB first */
 static void XMEGANVM_SendAddress(const uint32_t AbsoluteAddress)
 {
        /* Send the given 32-bit address to the target, LSB first */
-       XPROGTarget_SendByte(((uint8_t*)&AbsoluteAddress)[0]);
-       XPROGTarget_SendByte(((uint8_t*)&AbsoluteAddress)[1]);
-       XPROGTarget_SendByte(((uint8_t*)&AbsoluteAddress)[2]);
-       XPROGTarget_SendByte(((uint8_t*)&AbsoluteAddress)[3]);
+       XPROGTarget_SendByte(AbsoluteAddress &  0xFF);
+       XPROGTarget_SendByte(AbsoluteAddress >> 8);
+       XPROGTarget_SendByte(AbsoluteAddress >> 16);
+       XPROGTarget_SendByte(AbsoluteAddress >> 24);
 }
 
 /** Sends the given NVM register address to the target.
 }
 
 /** Sends the given NVM register address to the target.