- SPI_SendByte(Write_Memory_Params.ProgrammingCommands[1]);
- SPI_SendByte(StartAddress >> 8);
- SPI_SendByte(StartAddress & 0xFF);
- SPI_SendByte(0x00);
-
- /* Check if polling is possible, if not switch to timed delay mode */
- if (!(PollAddress))
+ ISPTarget_SendByte(Write_Memory_Params.ProgrammingCommands[1]);
+ ISPTarget_SendByte(StartAddress >> 8);
+ ISPTarget_SendByte(StartAddress & 0xFF);
+ ISPTarget_SendByte(0x00);
+
+ /* Check if polling is possible and enabled, if not switch to timed delay mode */
+ if (!(PollAddress) && (Write_Memory_Params.ProgrammingMode & PROG_MODE_PAGED_VALUE_MASK))