mirror of
				https://github.com/mfulz/qmk_firmware.git
				synced 2025-10-31 05:12:33 +01:00 
			
		
		
		
	Remove debug code from the incomplete Mass Storage class bootloader, rename main source files.
This commit is contained in:
		
							parent
							
								
									0f0f9638a3
								
							
						
					
					
						commit
						d5d9ff73e5
					
				| @ -34,7 +34,7 @@ | ||||
|  *  the demo and is responsible for the initial application hardware configuration. | ||||
|  */ | ||||
| 
 | ||||
| #include "MassStorage.h" | ||||
| #include "BootloaderMassStorage.h" | ||||
| 
 | ||||
| /** LUFA Mass Storage Class driver interface configuration and state information. This structure is
 | ||||
|  *  passed to all Mass Storage Class driver functions, so that multiple instances of the same class | ||||
| @ -95,8 +95,6 @@ void SetupHardware(void) | ||||
| 
 | ||||
| 	/* Hardware Initialization */ | ||||
| 	LEDs_Init(); | ||||
| 	Serial_Init(9600, false); | ||||
| 	Serial_CreateStream(NULL); | ||||
| 	USB_Init(); | ||||
| } | ||||
| 
 | ||||
| @ -48,7 +48,6 @@ | ||||
| 		#include "Lib/SCSI.h" | ||||
| 
 | ||||
| 		#include <LUFA/Drivers/Board/LEDs.h> | ||||
| 		#include <LUFA/Drivers/Peripheral/Serial.h> | ||||
| 		#include <LUFA/Drivers/USB/USB.h> | ||||
| 
 | ||||
| 	/* Macros: */ | ||||
| @ -42,7 +42,7 @@ | ||||
| 
 | ||||
| 		#include <LUFA/Drivers/USB/USB.h> | ||||
| 
 | ||||
| 		#include "../MassStorage.h" | ||||
| 		#include "../BootloaderMassStorage.h" | ||||
| 		#include "../Descriptors.h" | ||||
| 		#include "VirtualFAT.h" | ||||
| 
 | ||||
|  | ||||
| @ -101,7 +101,6 @@ static void WriteBlock(const uint16_t BlockNumber) | ||||
| 	Endpoint_Read_Stream_LE(BlockBuffer, sizeof(BlockBuffer), NULL); | ||||
| 	Endpoint_ClearOUT(); | ||||
| 
 | ||||
| 	printf("WRITE %d\r\n", BlockNumber); | ||||
| 	// TODO: Write to FLASH
 | ||||
| } | ||||
| 
 | ||||
| @ -139,15 +138,9 @@ static void ReadBlock(const uint16_t BlockNumber) | ||||
| 		default: | ||||
| 			if ((BlockNumber >= 4) && (BlockNumber < (4 + (FIRMWARE_FILE_SIZE / SECTOR_SIZE_BYTES)))) | ||||
| 			{ | ||||
| //				printf("<D>\r\n");
 | ||||
| 
 | ||||
| 				for (uint16_t i = 0; i < 512; i++) | ||||
| 				  BlockBuffer[i] = 'A' + (i % 26); | ||||
| 			} | ||||
| 			else | ||||
| 			{ | ||||
| 				printf("INVALID %d\r\n", BlockNumber); | ||||
| 			} | ||||
| 
 | ||||
| 			break; | ||||
| 	} | ||||
|  | ||||
| @ -17,8 +17,8 @@ BOARD        = USBKEY | ||||
| F_CPU        = 16000000 | ||||
| F_USB        = $(F_CPU) | ||||
| OPTIMIZATION = s | ||||
| TARGET       = MassStorage | ||||
| SRC          = $(TARGET).c Descriptors.c Lib/SCSI.c Lib/VirtualFAT.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) $(LUFA_SRC_SERIAL) | ||||
| TARGET       = BootloaderMassStorage | ||||
| SRC          = $(TARGET).c Descriptors.c Lib/SCSI.c Lib/VirtualFAT.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) | ||||
| LUFA_PATH    = ../../../LUFA | ||||
| CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/ -DBOOT_START_ADDR=$(BOOT_START_OFFSET) | ||||
| LD_FLAGS     = -Wl,--section-start=.text=$(BOOT_START_OFFSET) $(BOOT_API_LD_FLAGS) | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Dean Camera
						Dean Camera