More speed and quality improvements to the software USART in the AVRISP project.
[pub/USBasp.git] / Projects / AVRISP / Lib / NVMTarget.h
index e9acd43..803ec3c 100644 (file)
                #define NVM_CMD_ERASEWRITEEEPROMPAGE   0x35\r
                #define NVM_CMD_READEEPROM             0x06\r
 \r
+       /* Inline Functions: */\r
+               /** Sends the given 32-bit absolute address to the target.\r
+                *\r
+                *  \param[in] AbsoluteAddress  Absolute address to send to the target\r
+                */\r
+               static inline void NVMTarget_SendAddress(uint32_t AbsoluteAddress)\r
+               {\r
+                       /* Send the given 32-bit address to the target, LSB first */\r
+                       PDITarget_SendByte(AbsoluteAddress &  0xFF);\r
+                       PDITarget_SendByte(AbsoluteAddress >> 8);\r
+                       PDITarget_SendByte(AbsoluteAddress >> 16);\r
+                       PDITarget_SendByte(AbsoluteAddress >> 24);\r
+               }\r
+\r
        /* Function Prototypes: */\r
                void NVMTarget_SendNVMRegAddress(uint8_t Register);\r
                void NVMTarget_SendAddress(uint32_t AbsoluteAddress);\r