uint8_t CurrDFPageByteDiv16 = (CurrDFPageByte >> 4);\r
bool UsingSecondBuffer = false;\r
\r
- /* Copy selected dataflash's current page contents to the dataflash buffer */\r
+ /* Select the correct starting Dataflash IC for the block requested */\r
Dataflash_SelectChipFromPage(CurrDFPage);\r
+\r
#if (DATAFLASH_PAGE_SIZE > VIRTUAL_MEMORY_BLOCK_SIZE)\r
+ /* Copy selected dataflash's current page contents to the dataflash buffer */\r
Dataflash_SendByte(DF_CMD_MAINMEMTOBUFF1);\r
Dataflash_SendAddressBytes(CurrDFPage, 0);\r
-#endif\r
Dataflash_WaitWhileBusy();\r
+#endif\r
\r
/* Send the dataflash buffer write command */\r
- Dataflash_ToggleSelectedChipCS();\r
Dataflash_SendByte(DF_CMD_BUFF1WRITE);\r
Dataflash_SendAddressBytes(0, CurrDFPageByte);\r
\r
uint16_t CurrDFPageByte = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);\r
uint8_t CurrDFPageByteDiv16 = (CurrDFPageByte >> 4);\r
\r
- /* Send the dataflash main memory page read command */\r
+ /* Select the correct starting Dataflash IC for the block requested */\r
Dataflash_SelectChipFromPage(CurrDFPage);\r
+\r
+ /* Send the dataflash main memory page read command */\r
Dataflash_SendByte(DF_CMD_MAINMEMPAGEREAD);\r
Dataflash_SendAddressBytes(CurrDFPage, CurrDFPageByte);\r
Dataflash_SendByte(0x00);\r
uint8_t CurrDFPageByteDiv16 = (CurrDFPageByte >> 4);\r
bool UsingSecondBuffer = false;\r
\r
- /* Copy selected dataflash's current page contents to the dataflash buffer */\r
+ /* Select the correct starting Dataflash IC for the block requested */\r
Dataflash_SelectChipFromPage(CurrDFPage);\r
+\r
#if (DATAFLASH_PAGE_SIZE > VIRTUAL_MEMORY_BLOCK_SIZE)\r
+ /* Copy selected dataflash's current page contents to the dataflash buffer */\r
Dataflash_SendByte(DF_CMD_MAINMEMTOBUFF1);\r
Dataflash_SendAddressBytes(CurrDFPage, 0);\r
-#endif\r
Dataflash_WaitWhileBusy();\r
+#endif\r
\r
/* Send the dataflash buffer write command */\r
- Dataflash_ToggleSelectedChipCS();\r
Dataflash_SendByte(DF_CMD_BUFF1WRITE);\r
Dataflash_SendAddressBytes(0, CurrDFPageByte);\r
-\r
+ \r
while (TotalBlocks)\r
{\r
uint8_t BytesInBlockDiv16 = 0;\r
uint16_t CurrDFPageByte = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);\r
uint8_t CurrDFPageByteDiv16 = (CurrDFPageByte >> 4);\r
\r
- /* Send the dataflash main memory page read command */\r
+ /* Select the correct starting Dataflash IC for the block requested */\r
Dataflash_SelectChipFromPage(CurrDFPage);\r
+\r
+ /* Send the dataflash main memory page read command */\r
Dataflash_SendByte(DF_CMD_MAINMEMPAGEREAD);\r
Dataflash_SendAddressBytes(CurrDFPage, CurrDFPageByte);\r
Dataflash_SendByte(0x00);\r
uint8_t CurrDFPageByteDiv16 = (CurrDFPageByte >> 4);\r
bool UsingSecondBuffer = false;\r
\r
- /* Copy selected dataflash's current page contents to the dataflash buffer */\r
+ /* Select the correct starting Dataflash IC for the block requested */\r
Dataflash_SelectChipFromPage(CurrDFPage);\r
+\r
#if (DATAFLASH_PAGE_SIZE > VIRTUAL_MEMORY_BLOCK_SIZE)\r
+ /* Copy selected dataflash's current page contents to the dataflash buffer */\r
Dataflash_SendByte(DF_CMD_MAINMEMTOBUFF1);\r
Dataflash_SendAddressBytes(CurrDFPage, 0);\r
-#endif\r
Dataflash_WaitWhileBusy();\r
+#endif\r
\r
/* Send the dataflash buffer write command */\r
- Dataflash_ToggleSelectedChipCS();\r
Dataflash_SendByte(DF_CMD_BUFF1WRITE);\r
Dataflash_SendAddressBytes(0, CurrDFPageByte);\r
\r
uint16_t CurrDFPageByte = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);\r
uint8_t CurrDFPageByteDiv16 = (CurrDFPageByte >> 4);\r
\r
- /* Send the dataflash main memory page read command */\r
+ /* Select the correct starting Dataflash IC for the block requested */\r
Dataflash_SelectChipFromPage(CurrDFPage);\r
+\r
+ /* Send the dataflash main memory page read command */\r
Dataflash_SendByte(DF_CMD_MAINMEMPAGEREAD);\r
Dataflash_SendAddressBytes(CurrDFPage, CurrDFPageByte);\r
Dataflash_SendByte(0x00);\r
uint8_t CurrDFPageByteDiv16 = (CurrDFPageByte >> 4);\r
bool UsingSecondBuffer = false;\r
\r
- /* Copy selected dataflash's current page contents to the dataflash buffer */\r
+ /* Select the correct starting Dataflash IC for the block requested */\r
Dataflash_SelectChipFromPage(CurrDFPage);\r
+\r
#if (DATAFLASH_PAGE_SIZE > VIRTUAL_MEMORY_BLOCK_SIZE)\r
+ /* Copy selected dataflash's current page contents to the dataflash buffer */\r
Dataflash_SendByte(DF_CMD_MAINMEMTOBUFF1);\r
Dataflash_SendAddressBytes(CurrDFPage, 0);\r
-#endif\r
Dataflash_WaitWhileBusy();\r
+#endif\r
\r
/* Send the dataflash buffer write command */\r
- Dataflash_ToggleSelectedChipCS();\r
Dataflash_SendByte(DF_CMD_BUFF1WRITE);\r
Dataflash_SendAddressBytes(0, CurrDFPageByte);\r
\r
uint16_t CurrDFPageByte = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);\r
uint8_t CurrDFPageByteDiv16 = (CurrDFPageByte >> 4);\r
\r
- /* Send the dataflash main memory page read command */\r
+ /* Select the correct starting Dataflash IC for the block requested */\r
Dataflash_SelectChipFromPage(CurrDFPage);\r
+\r
+ /* Send the dataflash main memory page read command */\r
Dataflash_SendByte(DF_CMD_MAINMEMPAGEREAD);\r
Dataflash_SendAddressBytes(CurrDFPage, CurrDFPageByte);\r
Dataflash_SendByte(0x00);\r
*\r
* \return Number of bytes in the created report\r
*/\r
-uint16_t CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* HIDInterfaceInfo, uint8_t* ReportID, void* ReportData)\r
+uint16_t CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID, void* ReportData)\r
{\r
static bool IsKeyReleaseReport;\r
static bool IsNewlineReport;\r
\r
BitBuffer_t* Buffer = NULL;\r
USB_KeyboardReport_Data_t* KeyboardReport = (USB_KeyboardReport_Data_t*)ReportData;\r
- \r
+ \r
/* Key reports must be interleaved with 0 Key Code reports to release the keys, or repeated keys will be ignored */\r
IsKeyReleaseReport = !IsKeyReleaseReport; \r
\r
* \param[in] ReportData Pointer to the report buffer where the received report is stored\r
* \param[in] ReportSize Size in bytes of the report received from the host\r
*/\r
-void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* HIDInterfaceInfo, uint8_t ReportID,\r
- void* ReportData, uint16_t ReportSize)\r
+void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, const uint8_t ReportID,\r
+ const void* ReportData, const uint16_t ReportSize)\r
{\r
// Unused (but mandatory for the HID class driver) in this demo, since there are no Host->Device reports\r
}\r
void EVENT_USB_ConfigurationChanged(void);\r
void EVENT_USB_UnhandledControlPacket(void);\r
\r
- uint16_t CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* HIDInterfaceInfo, uint8_t* ReportID,\r
+ uint16_t CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID,\r
void* ReportData);\r
- void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* HIDInterfaceInfo, uint8_t ReportID,\r
- void* ReportData, uint16_t ReportSize);\r
+ void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, const uint8_t ReportID,\r
+ const void* ReportData, const uint16_t ReportSize);\r
\r
#endif\r