clean up example
This commit is contained in:
		@@ -86,7 +86,7 @@
 | 
			
		||||
						</toolChain>
 | 
			
		||||
					</folderInfo>
 | 
			
		||||
					<sourceEntries>
 | 
			
		||||
						<entry excluding="mcu/lpc11uxx|boards/embedded_artists/ea4357|mcu/lpc43xx|hw/mcu/nxp/lpc11uxx|hw/bsp/lpcxpresso1769|hw/bsp/lpcxpresso1769/startup|hw/mcu/nxp/lpc43xx|hw/bsp/ea4357|hw/bsp/lpcxpresso11u68/startup/xpresso/cr_startup_lpc11u.c|hw/bsp/lpcxpresso11u68/startup|mcu/lpc175x_6x|hw/mcu/nxp/lpc13uxx/keil|boards/embedded_artists/oem_base_board|hw/mcu/nxp/lpc175x_6x|hw/bsp/lpcxpresso11u68" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
 | 
			
		||||
						<entry excluding="hw/mcu/nordic|hw/bsp/pca10056|hw/bsp/ngx|hw/bsp/lpcxpresso|hw/bsp/keil|hw/bsp/hitex|mcu/lpc11uxx|boards/embedded_artists/ea4357|mcu/lpc43xx|hw/mcu/nxp/lpc11uxx|hw/bsp/lpcxpresso1769|hw/bsp/lpcxpresso1769/startup|hw/mcu/nxp/lpc43xx|hw/bsp/ea4357|hw/bsp/lpcxpresso11u68/startup/xpresso/cr_startup_lpc11u.c|hw/bsp/lpcxpresso11u68/startup|mcu/lpc175x_6x|hw/mcu/nxp/lpc13uxx/keil|boards/embedded_artists/oem_base_board|hw/mcu/nxp/lpc175x_6x|hw/bsp/lpcxpresso11u68" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
 | 
			
		||||
					</sourceEntries>
 | 
			
		||||
				</configuration>
 | 
			
		||||
			</storageModule>
 | 
			
		||||
@@ -180,7 +180,7 @@
 | 
			
		||||
						</toolChain>
 | 
			
		||||
					</folderInfo>
 | 
			
		||||
					<sourceEntries>
 | 
			
		||||
						<entry excluding="hw/mcu/nxp/lpc11uxx/keil|hw/bsp/lpcxpresso1347/startup|boards/embedded_artists/ea4357|mcu/lpc43xx|hw/bsp/lpcxpresso1347|hw/bsp/lpcxpresso1769|hw/bsp/lpcxpresso1769/startup|hw/mcu/nxp/lpc43xx|hw/bsp/ea4357|mcu/lpc13uxx|hw/mcu/nxp/lpc13uxx|mcu/lpc175x_6x|boards/embedded_artists/oem_base_board|hw/mcu/nxp/lpc175x_6x" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
 | 
			
		||||
						<entry excluding="hw/mcu/nordic|hw/bsp/pca10056|hw/bsp/ngx|hw/bsp/lpcxpresso|hw/bsp/keil|hw/bsp/hitex|hw/mcu/nxp/lpc11uxx/keil|hw/bsp/lpcxpresso1347/startup|boards/embedded_artists/ea4357|mcu/lpc43xx|hw/bsp/lpcxpresso1347|hw/bsp/lpcxpresso1769|hw/bsp/lpcxpresso1769/startup|hw/mcu/nxp/lpc43xx|hw/bsp/ea4357|mcu/lpc13uxx|hw/mcu/nxp/lpc13uxx|mcu/lpc175x_6x|boards/embedded_artists/oem_base_board|hw/mcu/nxp/lpc175x_6x" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
 | 
			
		||||
					</sourceEntries>
 | 
			
		||||
				</configuration>
 | 
			
		||||
			</storageModule>
 | 
			
		||||
@@ -284,7 +284,7 @@
 | 
			
		||||
						</toolChain>
 | 
			
		||||
					</folderInfo>
 | 
			
		||||
					<sourceEntries>
 | 
			
		||||
						<entry excluding="mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_lcd.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_rtc.c|hw/bsp/lpcxpresso1347/startup|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/Font5x7.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_sdmmc.c|hw/bsp/lpcxpresso11u68/startup/xpresso/cr_startup_lpc11u.c|hw/mcu/nxp/lpc43xx/keil|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_evrt.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_ssp.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/Font5x7.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_ssp.c|mcu/lpc13uxx|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_sdif.c|mcu/lpc175x_6x|mcu/lpc11uxx|hw/bsp/lpcxpresso1347|hw/mcu/nxp/lpc11uxx|hw/bsp/lpcxpresso1769/startup|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_i2s.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_wwdt.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_can.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_mcpwm.c|hw/mcu/nxp/lpc13uxx|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_atimer.c|hw/bsp/lpcxpresso11u68/startup|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_can.c|hw/mcu/nxp/lpc43xx/CMSIS_LPC43xx_DriverLib/src/sdio.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_mcpwm.c|hw/mcu/nxp/lpc175x_6x|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_atimer.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_sct.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_emc.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/debug_frmwrk.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_gpdma.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_adc.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_i2s.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_wwdt.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/LCDTerm.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_rgu.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/LCDTerm.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_sct.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/debug_frmwrk.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_rtc.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/sdio.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_evrt.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_gpdma.c|hw/bsp/lpcxpresso1769|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_adc.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_timer.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_dac.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_qei.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_rit.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_pwr.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_dac.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_qei.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_rit.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_emc.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_lcd.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/sdio.c|hw/bsp/lpcxpresso11u68" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
 | 
			
		||||
						<entry excluding="hw/bsp/pca10056|hw/bsp/ngx|hw/bsp/lpcxpresso|hw/bsp/keil|hw/bsp/hitex|hw/mcu/nordic|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_lcd.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_rtc.c|hw/bsp/lpcxpresso1347/startup|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/Font5x7.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_sdmmc.c|hw/bsp/lpcxpresso11u68/startup/xpresso/cr_startup_lpc11u.c|hw/mcu/nxp/lpc43xx/keil|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_evrt.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_ssp.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/Font5x7.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_ssp.c|mcu/lpc13uxx|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_sdif.c|mcu/lpc175x_6x|mcu/lpc11uxx|hw/bsp/lpcxpresso1347|hw/mcu/nxp/lpc11uxx|hw/bsp/lpcxpresso1769/startup|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_i2s.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_wwdt.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_can.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_mcpwm.c|hw/mcu/nxp/lpc13uxx|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_atimer.c|hw/bsp/lpcxpresso11u68/startup|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_can.c|hw/mcu/nxp/lpc43xx/CMSIS_LPC43xx_DriverLib/src/sdio.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_mcpwm.c|hw/mcu/nxp/lpc175x_6x|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_atimer.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_sct.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_emc.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/debug_frmwrk.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_gpdma.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_adc.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_i2s.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_wwdt.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/LCDTerm.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_rgu.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/LCDTerm.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_sct.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/debug_frmwrk.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_rtc.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/sdio.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_evrt.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_gpdma.c|hw/bsp/lpcxpresso1769|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_adc.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_timer.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_dac.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_qei.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_rit.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_pwr.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_dac.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_qei.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_rit.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_emc.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_lcd.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/sdio.c|hw/bsp/lpcxpresso11u68" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
 | 
			
		||||
					</sourceEntries>
 | 
			
		||||
				</configuration>
 | 
			
		||||
			</storageModule>
 | 
			
		||||
@@ -379,7 +379,7 @@
 | 
			
		||||
						</toolChain>
 | 
			
		||||
					</folderInfo>
 | 
			
		||||
					<sourceEntries>
 | 
			
		||||
						<entry excluding="mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_rtc.c|hw/bsp/lpcxpresso1347/startup|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_pwm.c|hw/bsp/lpcxpresso11u68/startup/xpresso/cr_startup_lpc11u.c|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_gpdma.c|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_exti.c|mcu/lpc13uxx|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_timer.c|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_dac.c|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_qei.c|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_can.c|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_rit.c|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_spi.c|hw/mcu/nxp/lpc175x_6x/keil|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_iap.c|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_mcpwm.c|mcu/lpc11uxx|boards/embedded_artists/ea4357|mcu/lpc43xx|hw/bsp/lpcxpresso1347|hw/mcu/nxp/lpc11uxx|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_libcfg_default.c|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_i2c.c|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_adc.c|hw/mcu/nxp/lpc43xx|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_i2s.c|hw/bsp/ea4357|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_ssp.c|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_emac.c|hw/mcu/nxp/lpc13uxx|hw/bsp/lpcxpresso11u68/startup|boards/embedded_artists/oem_base_board|mcu/lpc175x_6x/LPC17xx_DriverLib/source/debug_frmwrk.c|hw/bsp/lpcxpresso11u68|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_wdt.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
 | 
			
		||||
						<entry excluding="hw/mcu/nordic|hw/bsp/pca10056|hw/bsp/ngx|hw/bsp/lpcxpresso|hw/bsp/keil|hw/bsp/hitex|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_rtc.c|hw/bsp/lpcxpresso1347/startup|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_pwm.c|hw/bsp/lpcxpresso11u68/startup/xpresso/cr_startup_lpc11u.c|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_gpdma.c|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_exti.c|mcu/lpc13uxx|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_timer.c|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_dac.c|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_qei.c|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_can.c|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_rit.c|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_spi.c|hw/mcu/nxp/lpc175x_6x/keil|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_iap.c|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_mcpwm.c|mcu/lpc11uxx|boards/embedded_artists/ea4357|mcu/lpc43xx|hw/bsp/lpcxpresso1347|hw/mcu/nxp/lpc11uxx|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_libcfg_default.c|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_i2c.c|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_adc.c|hw/mcu/nxp/lpc43xx|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_i2s.c|hw/bsp/ea4357|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_ssp.c|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_emac.c|hw/mcu/nxp/lpc13uxx|hw/bsp/lpcxpresso11u68/startup|boards/embedded_artists/oem_base_board|mcu/lpc175x_6x/LPC17xx_DriverLib/source/debug_frmwrk.c|hw/bsp/lpcxpresso11u68|mcu/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_wdt.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
 | 
			
		||||
					</sourceEntries>
 | 
			
		||||
				</configuration>
 | 
			
		||||
			</storageModule>
 | 
			
		||||
@@ -476,7 +476,7 @@
 | 
			
		||||
						</toolChain>
 | 
			
		||||
					</folderInfo>
 | 
			
		||||
					<sourceEntries>
 | 
			
		||||
						<entry excluding="mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_lcd.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_rtc.c|hw/bsp/lpcxpresso1347/startup|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/Font5x7.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_sdmmc.c|hw/bsp/lpcxpresso11u68/startup/xpresso/cr_startup_lpc11u.c|hw/mcu/nxp/lpc43xx/keil|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_evrt.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_ssp.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/Font5x7.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_ssp.c|mcu/lpc13uxx|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_sdif.c|mcu/lpc175x_6x|mcu/lpc11uxx|hw/bsp/lpcxpresso1347|hw/mcu/nxp/lpc11uxx|hw/bsp/lpcxpresso1769/startup|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_i2s.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_wwdt.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_can.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_mcpwm.c|hw/mcu/nxp/lpc13uxx|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_atimer.c|hw/bsp/lpcxpresso11u68/startup|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_can.c|hw/mcu/nxp/lpc43xx/CMSIS_LPC43xx_DriverLib/src/sdio.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_mcpwm.c|hw/mcu/nxp/lpc175x_6x|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_atimer.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_sct.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_emc.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/debug_frmwrk.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_gpdma.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_adc.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_i2s.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_wwdt.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/LCDTerm.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_rgu.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/LCDTerm.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_sct.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/debug_frmwrk.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_rtc.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/sdio.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_evrt.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_gpdma.c|hw/bsp/lpcxpresso1769|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_adc.c|hw/bsp/ea4357|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_timer.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_dac.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_qei.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_rit.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_pwr.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_dac.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_qei.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_rit.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_emc.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_lcd.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/sdio.c|hw/bsp/lpcxpresso11u68" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
 | 
			
		||||
						<entry excluding="hw/mcu/nordic|hw/bsp/pca10056|hw/bsp/ngx|hw/bsp/lpcxpresso|hw/bsp/keil|hw/bsp/hitex|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_lcd.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_rtc.c|hw/bsp/lpcxpresso1347/startup|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/Font5x7.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_sdmmc.c|hw/bsp/lpcxpresso11u68/startup/xpresso/cr_startup_lpc11u.c|hw/mcu/nxp/lpc43xx/keil|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_evrt.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_ssp.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/Font5x7.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_ssp.c|mcu/lpc13uxx|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_sdif.c|mcu/lpc175x_6x|mcu/lpc11uxx|hw/bsp/lpcxpresso1347|hw/mcu/nxp/lpc11uxx|hw/bsp/lpcxpresso1769/startup|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_i2s.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_wwdt.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_can.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_mcpwm.c|hw/mcu/nxp/lpc13uxx|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_atimer.c|hw/bsp/lpcxpresso11u68/startup|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_can.c|hw/mcu/nxp/lpc43xx/CMSIS_LPC43xx_DriverLib/src/sdio.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_mcpwm.c|hw/mcu/nxp/lpc175x_6x|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_atimer.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_sct.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_emc.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/debug_frmwrk.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_gpdma.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_adc.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_i2s.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_wwdt.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/LCDTerm.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_rgu.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/LCDTerm.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_sct.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/debug_frmwrk.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_rtc.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/sdio.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_evrt.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_gpdma.c|hw/bsp/lpcxpresso1769|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_adc.c|hw/bsp/ea4357|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_timer.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_dac.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_qei.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_rit.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_pwr.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_dac.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_qei.c|mcu/lpc43xx/CMSISv2p10_LPC43xx_DriverLib/src/lpc43xx_rit.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_emc.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/lpc43xx_lcd.c|mcu/lpc43xx/CMSIS_LPC43xx_DriverLib/src/sdio.c|hw/bsp/lpcxpresso11u68" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
 | 
			
		||||
					</sourceEntries>
 | 
			
		||||
				</configuration>
 | 
			
		||||
			</storageModule>
 | 
			
		||||
@@ -569,7 +569,7 @@
 | 
			
		||||
						</toolChain>
 | 
			
		||||
					</folderInfo>
 | 
			
		||||
					<sourceEntries>
 | 
			
		||||
						<entry excluding="hw/bsp/lpcxpresso1347/startup|boards/embedded_artists/ea4357|mcu/lpc43xx|hw/bsp/lpcxpresso1347|hw/mcu/nxp/lpc11uxx|hw/bsp/lpcxpresso1769|hw/bsp/lpcxpresso1769/startup|hw/mcu/nxp/lpc43xx|hw/bsp/ea4357|hw/bsp/lpcxpresso11u68/startup/xpresso/cr_startup_lpc11u.c|mcu/lpc13uxx|hw/mcu/nxp/lpc13uxx|hw/bsp/lpcxpresso11u68/startup|mcu/lpc175x_6x|boards/embedded_artists/oem_base_board|hw/mcu/nxp/lpc175x_6x|hw/bsp/lpcxpresso11u68" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
 | 
			
		||||
						<entry excluding="hw/mcu/nordic|hw/bsp/pca10056|hw/bsp/ngx|hw/bsp/lpcxpresso|hw/bsp/keil|hw/bsp/hitex|hw/bsp/lpcxpresso1347/startup|boards/embedded_artists/ea4357|mcu/lpc43xx|hw/bsp/lpcxpresso1347|hw/mcu/nxp/lpc11uxx|hw/bsp/lpcxpresso1769|hw/bsp/lpcxpresso1769/startup|hw/mcu/nxp/lpc43xx|hw/bsp/ea4357|hw/bsp/lpcxpresso11u68/startup/xpresso/cr_startup_lpc11u.c|mcu/lpc13uxx|hw/mcu/nxp/lpc13uxx|hw/bsp/lpcxpresso11u68/startup|mcu/lpc175x_6x|boards/embedded_artists/oem_base_board|hw/mcu/nxp/lpc175x_6x|hw/bsp/lpcxpresso11u68" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
 | 
			
		||||
					</sourceEntries>
 | 
			
		||||
				</configuration>
 | 
			
		||||
			</storageModule>
 | 
			
		||||
@@ -584,7 +584,7 @@
 | 
			
		||||
	<storageModule moduleId="com.crt.config">
 | 
			
		||||
		<projectStorage><?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<TargetConfig>
 | 
			
		||||
<Properties property_0="None" property_2="LPC18x7_43x7_2x512_BootA.cfx" property_3="NXP" property_4="LPC4357" property_count="5" version="70200"/>
 | 
			
		||||
<Properties property_2="LPC18x7_43x7_2x512_BootA.cfx" property_3="NXP" property_4="LPC4357" property_count="5" version="70200"/>
 | 
			
		||||
<infoList vendor="NXP"><info chip="LPC4357" flash_driver="LPC18x7_43x7_2x512_BootA.cfx" match_id="0x0" name="LPC4357" resetscript="LPC18LPC43InternalFLASHBootResetscript.scp" stub="crt_emu_lpc18_43_nxp"><chip><name>LPC4357</name>
 | 
			
		||||
<family>LPC43xx</family>
 | 
			
		||||
<vendor>NXP (formerly Philips)</vendor>
 | 
			
		||||
 
 | 
			
		||||
@@ -56,63 +56,22 @@ static osal_semaphore_t sem_hdl;
 | 
			
		||||
//--------------------------------------------------------------------+
 | 
			
		||||
// INTERNAL OBJECT & FUNCTION DECLARATION
 | 
			
		||||
//--------------------------------------------------------------------+
 | 
			
		||||
TUSB_CFG_ATTR_USBRAM static uint8_t serial_rx_buffer[SERIAL_BUFFER_SIZE];
 | 
			
		||||
TUSB_CFG_ATTR_USBRAM static uint8_t serial_tx_buffer[SERIAL_BUFFER_SIZE];
 | 
			
		||||
 | 
			
		||||
FIFO_DEF(fifo_serial, SERIAL_BUFFER_SIZE, uint8_t, true);
 | 
			
		||||
 | 
			
		||||
//--------------------------------------------------------------------+
 | 
			
		||||
// tinyusb callbacks
 | 
			
		||||
//--------------------------------------------------------------------+
 | 
			
		||||
void cdc_serial_app_mount(uint8_t coreid)
 | 
			
		||||
void cdc_serial_app_mount(uint8_t port)
 | 
			
		||||
{
 | 
			
		||||
  osal_semaphore_reset(sem_hdl);
 | 
			
		||||
 | 
			
		||||
  tud_cdc_receive(coreid, serial_rx_buffer, SERIAL_BUFFER_SIZE, true);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void cdc_serial_app_umount(uint8_t coreid)
 | 
			
		||||
void cdc_serial_app_umount(uint8_t port)
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void tud_cdc_rx_cb(uint8_t coreid, uint32_t xferred_bytes)
 | 
			
		||||
void tud_cdc_rx_cb(uint8_t port)
 | 
			
		||||
{
 | 
			
		||||
  fifo_write_n(&fifo_serial, serial_rx_buffer, xferred_bytes);
 | 
			
		||||
  osal_semaphore_post(sem_hdl);  // notify main task
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void tud_cdc_xfer_cb(uint8_t coreid, tusb_event_t event, cdc_pipeid_t pipe_id, uint32_t xferred_bytes)
 | 
			
		||||
{
 | 
			
		||||
  switch ( pipe_id )
 | 
			
		||||
  {
 | 
			
		||||
    case CDC_PIPE_DATA_OUT:
 | 
			
		||||
      switch(event)
 | 
			
		||||
      {
 | 
			
		||||
        case TUSB_EVENT_XFER_COMPLETE:
 | 
			
		||||
          for(uint8_t i=0; i<xferred_bytes; i++)
 | 
			
		||||
          {
 | 
			
		||||
            fifo_write(&fifo_serial, serial_rx_buffer+i);
 | 
			
		||||
          }
 | 
			
		||||
          osal_semaphore_post(sem_hdl);  // notify main task
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
        case TUSB_EVENT_XFER_ERROR:
 | 
			
		||||
          tud_cdc_receive(0, serial_rx_buffer, SERIAL_BUFFER_SIZE, true); // ignore, queue transfer again
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
        case TUSB_EVENT_XFER_STALLED:
 | 
			
		||||
        default :
 | 
			
		||||
        break;
 | 
			
		||||
      }
 | 
			
		||||
    break;
 | 
			
		||||
 | 
			
		||||
    case CDC_PIPE_DATA_IN:
 | 
			
		||||
    case CDC_PIPE_NOTIFICATION:
 | 
			
		||||
    default:
 | 
			
		||||
    break;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//--------------------------------------------------------------------+
 | 
			
		||||
@@ -120,10 +79,6 @@ void tud_cdc_xfer_cb(uint8_t coreid, tusb_event_t event, cdc_pipeid_t pipe_id, u
 | 
			
		||||
//--------------------------------------------------------------------+
 | 
			
		||||
void cdc_serial_app_init(void)
 | 
			
		||||
{
 | 
			
		||||
  sem_hdl = osal_semaphore_create(1, 0);
 | 
			
		||||
  VERIFY(sem_hdl, );
 | 
			
		||||
 | 
			
		||||
  osal_task_create(cdc_serial_app_task, "cdc", 128, NULL, CDC_SERIAL_APP_TASK_PRIO);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
tusb_error_t cdc_serial_subtask(void);
 | 
			
		||||
@@ -141,30 +96,14 @@ tusb_error_t cdc_serial_subtask(void)
 | 
			
		||||
{
 | 
			
		||||
  OSAL_SUBTASK_BEGIN
 | 
			
		||||
 | 
			
		||||
  tusb_error_t error;
 | 
			
		||||
 | 
			
		||||
  osal_semaphore_wait(sem_hdl, OSAL_TIMEOUT_WAIT_FOREVER, &error);
 | 
			
		||||
  (void) error; // suppress compiler's warnings
 | 
			
		||||
 | 
			
		||||
  if ( tud_mounted(0) )
 | 
			
		||||
  if ( tud_mounted(0) && tud_cdc_available(0) )
 | 
			
		||||
  {
 | 
			
		||||
    // echo back data in the fifo
 | 
			
		||||
    if ( !tud_cdc_busy(0, CDC_PIPE_DATA_IN) )
 | 
			
		||||
    {
 | 
			
		||||
      uint16_t count=0;
 | 
			
		||||
      while( fifo_read(&fifo_serial, &serial_tx_buffer[count]) )
 | 
			
		||||
      {
 | 
			
		||||
        count++;
 | 
			
		||||
      }
 | 
			
		||||
    uint8_t buf[64];
 | 
			
		||||
 | 
			
		||||
      if (count)
 | 
			
		||||
      {
 | 
			
		||||
        tud_cdc_send(0, serial_tx_buffer, count, false);
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
    // read and echo back
 | 
			
		||||
    uint32_t count = tud_cdc_read(0, buf, sizeof(buf));
 | 
			
		||||
 | 
			
		||||
    // getting more data from host
 | 
			
		||||
    tud_cdc_receive(0, serial_rx_buffer, SERIAL_BUFFER_SIZE, true);
 | 
			
		||||
    tud_cdc_write(0, buf, count);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  OSAL_SUBTASK_END
 | 
			
		||||
 
 | 
			
		||||
@@ -58,8 +58,8 @@
 | 
			
		||||
void cdc_serial_app_init(void);
 | 
			
		||||
void cdc_serial_app_task(void* param);
 | 
			
		||||
 | 
			
		||||
void cdc_serial_app_mount(uint8_t coreid);
 | 
			
		||||
void cdc_serial_app_umount(uint8_t coreid);
 | 
			
		||||
void cdc_serial_app_mount(uint8_t port);
 | 
			
		||||
void cdc_serial_app_umount(uint8_t port);
 | 
			
		||||
 | 
			
		||||
#else
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -56,17 +56,17 @@ TUSB_CFG_ATTR_USBRAM hid_keyboard_report_t keyboard_report;
 | 
			
		||||
//--------------------------------------------------------------------+
 | 
			
		||||
// tinyusb callbacks
 | 
			
		||||
//--------------------------------------------------------------------+
 | 
			
		||||
void keyboard_app_mount(uint8_t coreid)
 | 
			
		||||
void keyboard_app_mount(uint8_t port)
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void keyboard_app_umount(uint8_t coreid)
 | 
			
		||||
void keyboard_app_umount(uint8_t port)
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void tud_hid_keyboard_cb(uint8_t coreid, tusb_event_t event, uint32_t xferred_bytes)
 | 
			
		||||
void tud_hid_keyboard_cb(uint8_t port, tusb_event_t event, uint32_t xferred_bytes)
 | 
			
		||||
{
 | 
			
		||||
  switch(event)
 | 
			
		||||
  {
 | 
			
		||||
@@ -77,7 +77,7 @@ void tud_hid_keyboard_cb(uint8_t coreid, tusb_event_t event, uint32_t xferred_by
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
uint16_t tud_hid_keyboard_get_report_cb(uint8_t coreid, hid_request_report_type_t report_type, void** pp_report, uint16_t requested_length)
 | 
			
		||||
uint16_t tud_hid_keyboard_get_report_cb(uint8_t port, hid_request_report_type_t report_type, void** pp_report, uint16_t requested_length)
 | 
			
		||||
{
 | 
			
		||||
  // get other than input report is not supported by this keyboard demo
 | 
			
		||||
  if ( report_type != HID_REQUEST_REPORT_INPUT ) return 0;
 | 
			
		||||
@@ -86,7 +86,7 @@ uint16_t tud_hid_keyboard_get_report_cb(uint8_t coreid, hid_request_report_type_
 | 
			
		||||
  return requested_length;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void tud_hid_keyboard_set_report_cb(uint8_t coreid, hid_request_report_type_t report_type, uint8_t p_report_data[], uint16_t length)
 | 
			
		||||
void tud_hid_keyboard_set_report_cb(uint8_t port, hid_request_report_type_t report_type, uint8_t p_report_data[], uint16_t length)
 | 
			
		||||
{
 | 
			
		||||
  // set other than output report is not supported by this keyboard demo
 | 
			
		||||
  if ( report_type != HID_REQUEST_REPORT_OUTPUT ) return;
 | 
			
		||||
@@ -98,6 +98,8 @@ void tud_hid_keyboard_set_report_cb(uint8_t coreid, hid_request_report_type_t re
 | 
			
		||||
  if (kbd_led & KEYBOARD_LED_CAPSLOCK  ) interval_divider *= 2;
 | 
			
		||||
  if (kbd_led & KEYBOARD_LED_SCROLLLOCK) interval_divider *= 2;
 | 
			
		||||
 | 
			
		||||
  // TODO remove
 | 
			
		||||
  extern void led_blinking_set_interval(uint32_t ms);
 | 
			
		||||
  led_blinking_set_interval( 1000 / interval_divider);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -58,8 +58,8 @@
 | 
			
		||||
void keyboard_app_init(void);
 | 
			
		||||
void keyboard_app_task(void* param);
 | 
			
		||||
 | 
			
		||||
void keyboard_app_mount(uint8_t coreid);
 | 
			
		||||
void keyboard_app_umount(uint8_t coreid);
 | 
			
		||||
void keyboard_app_mount(uint8_t port);
 | 
			
		||||
void keyboard_app_umount(uint8_t port);
 | 
			
		||||
 | 
			
		||||
#else
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -44,6 +44,7 @@
 | 
			
		||||
#include <string.h>
 | 
			
		||||
 | 
			
		||||
#include "bsp/board.h"
 | 
			
		||||
#include "app_os_prio.h"
 | 
			
		||||
#include "tusb.h"
 | 
			
		||||
 | 
			
		||||
#include "msc_device_app.h"
 | 
			
		||||
@@ -59,6 +60,9 @@
 | 
			
		||||
// INTERNAL OBJECT & FUNCTION DECLARATION
 | 
			
		||||
//--------------------------------------------------------------------+
 | 
			
		||||
void print_greeting(void);
 | 
			
		||||
void led_blinking_init(void);
 | 
			
		||||
void led_blinking_task(void* param);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if TUSB_CFG_OS == TUSB_OS_NONE
 | 
			
		||||
// like a real RTOS, this function is a main loop invoking each task in application and never return
 | 
			
		||||
@@ -107,18 +111,66 @@ int main(void)
 | 
			
		||||
//--------------------------------------------------------------------+
 | 
			
		||||
// tinyusb callbacks
 | 
			
		||||
//--------------------------------------------------------------------+
 | 
			
		||||
void tud_mount_cb(uint8_t coreid)
 | 
			
		||||
void tud_mount_cb(uint8_t port)
 | 
			
		||||
{
 | 
			
		||||
  cdc_serial_app_mount(coreid);
 | 
			
		||||
  keyboard_app_mount(coreid);
 | 
			
		||||
  msc_app_mount(coreid);
 | 
			
		||||
  cdc_serial_app_mount(port);
 | 
			
		||||
  keyboard_app_mount(port);
 | 
			
		||||
  msc_app_mount(port);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void tud_umount_cb(uint8_t coreid)
 | 
			
		||||
void tud_umount_cb(uint8_t port)
 | 
			
		||||
{
 | 
			
		||||
  cdc_serial_app_umount(coreid);
 | 
			
		||||
  keyboard_app_umount(coreid);
 | 
			
		||||
  msc_app_umount(coreid);
 | 
			
		||||
  cdc_serial_app_umount(port);
 | 
			
		||||
  keyboard_app_umount(port);
 | 
			
		||||
  msc_app_umount(port);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//--------------------------------------------------------------------+
 | 
			
		||||
// BLINKING TASK
 | 
			
		||||
//--------------------------------------------------------------------+
 | 
			
		||||
static uint32_t led_blink_interval_ms = 1000; // default is 1 second
 | 
			
		||||
 | 
			
		||||
void led_blinking_init(void)
 | 
			
		||||
{
 | 
			
		||||
  led_blink_interval_ms = 1000;
 | 
			
		||||
  osal_task_create(led_blinking_task, "blinky", 128, NULL, LED_BLINKING_APP_TASK_PRIO);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void led_blinking_set_interval(uint32_t ms)
 | 
			
		||||
{
 | 
			
		||||
  led_blink_interval_ms = ms;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
tusb_error_t led_blinking_subtask(void);
 | 
			
		||||
void led_blinking_task(void* param)
 | 
			
		||||
{
 | 
			
		||||
  (void) param;
 | 
			
		||||
 | 
			
		||||
  OSAL_TASK_BEGIN
 | 
			
		||||
  led_blinking_subtask();
 | 
			
		||||
  OSAL_TASK_END
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
tusb_error_t led_blinking_subtask(void)
 | 
			
		||||
{
 | 
			
		||||
  OSAL_SUBTASK_BEGIN
 | 
			
		||||
 | 
			
		||||
  static uint32_t led_on_mask = 0;
 | 
			
		||||
 | 
			
		||||
  osal_task_delay(led_blink_interval_ms);
 | 
			
		||||
 | 
			
		||||
  board_leds(led_on_mask, 1 - led_on_mask);
 | 
			
		||||
  led_on_mask = 1 - led_on_mask; // toggle
 | 
			
		||||
 | 
			
		||||
//  uint32_t btn_mask;
 | 
			
		||||
//  btn_mask = board_buttons();
 | 
			
		||||
//
 | 
			
		||||
//  for(uint8_t i=0; i<32; i++)
 | 
			
		||||
//  {
 | 
			
		||||
//    if ( BIT_TEST_(btn_mask, i) ) printf("button %d is pressed\n", i);
 | 
			
		||||
//  }
 | 
			
		||||
 | 
			
		||||
  OSAL_SUBTASK_END
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//--------------------------------------------------------------------+
 | 
			
		||||
 
 | 
			
		||||
@@ -56,17 +56,17 @@ TUSB_CFG_ATTR_USBRAM hid_mouse_report_t mouse_report;
 | 
			
		||||
//--------------------------------------------------------------------+
 | 
			
		||||
// tinyusb callbacks
 | 
			
		||||
//--------------------------------------------------------------------+
 | 
			
		||||
void mouse_app_mount(uint8_t coreid)
 | 
			
		||||
void mouse_app_mount(uint8_t port)
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void mouse_app_umount(uint8_t coreid)
 | 
			
		||||
void mouse_app_umount(uint8_t port)
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void tusbd_hid_mouse_cb(uint8_t coreid, tusb_event_t event, uint32_t xferred_bytes)
 | 
			
		||||
void tusbd_hid_mouse_cb(uint8_t port, tusb_event_t event, uint32_t xferred_bytes)
 | 
			
		||||
{
 | 
			
		||||
  switch(event)
 | 
			
		||||
  {
 | 
			
		||||
@@ -77,7 +77,7 @@ void tusbd_hid_mouse_cb(uint8_t coreid, tusb_event_t event, uint32_t xferred_byt
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
uint16_t tusbd_hid_mouse_get_report_cb(uint8_t coreid, hid_request_report_type_t report_type, void** pp_report, uint16_t requested_length)
 | 
			
		||||
uint16_t tusbd_hid_mouse_get_report_cb(uint8_t port, hid_request_report_type_t report_type, void** pp_report, uint16_t requested_length)
 | 
			
		||||
{
 | 
			
		||||
  if ( report_type != HID_REQUEST_REPORT_INPUT ) return 0; // not support other report type for this mouse demo
 | 
			
		||||
 | 
			
		||||
@@ -85,7 +85,7 @@ uint16_t tusbd_hid_mouse_get_report_cb(uint8_t coreid, hid_request_report_type_t
 | 
			
		||||
  return requested_length;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void tusbd_hid_mouse_set_report_cb(uint8_t coreid, hid_request_report_type_t report_type, uint8_t report_data[], uint16_t length)
 | 
			
		||||
void tusbd_hid_mouse_set_report_cb(uint8_t port, hid_request_report_type_t report_type, uint8_t report_data[], uint16_t length)
 | 
			
		||||
{
 | 
			
		||||
  // mouse demo does not support set report --> do nothing
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -57,8 +57,8 @@
 | 
			
		||||
 | 
			
		||||
void mouse_app_init(void);
 | 
			
		||||
void mouse_app_task(void * param);
 | 
			
		||||
void mouse_app_mount(uint8_t coreid);
 | 
			
		||||
void mouse_app_umount(uint8_t coreid);
 | 
			
		||||
void mouse_app_mount(uint8_t port);
 | 
			
		||||
void mouse_app_umount(uint8_t port);
 | 
			
		||||
 | 
			
		||||
#else
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -89,17 +89,17 @@ static scsi_mode_parameters_t const msc_dev_mode_para =
 | 
			
		||||
//--------------------------------------------------------------------+
 | 
			
		||||
// tinyusb callbacks
 | 
			
		||||
//--------------------------------------------------------------------+
 | 
			
		||||
void msc_app_mount(uint8_t coreid)
 | 
			
		||||
void msc_app_mount(uint8_t port)
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void msc_app_umount(uint8_t coreid)
 | 
			
		||||
void msc_app_umount(uint8_t port)
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
msc_csw_status_t tud_msc_scsi_cb (uint8_t coreid, uint8_t lun, uint8_t scsi_cmd[16], void const ** pp_buffer, uint16_t* p_length)
 | 
			
		||||
msc_csw_status_t tud_msc_scsi_cb (uint8_t port, uint8_t lun, uint8_t scsi_cmd[16], void const ** pp_buffer, uint16_t* p_length)
 | 
			
		||||
{
 | 
			
		||||
  // read10 & write10 has their own callback and MUST not be handled here
 | 
			
		||||
  switch (scsi_cmd[0])
 | 
			
		||||
 
 | 
			
		||||
@@ -72,8 +72,8 @@ issue at github.com/hathach/tinyusb"
 | 
			
		||||
void msc_app_init(void);
 | 
			
		||||
void msc_app_task(void* param);
 | 
			
		||||
 | 
			
		||||
void msc_app_mount(uint8_t coreid);
 | 
			
		||||
void msc_app_umount(uint8_t coreid);
 | 
			
		||||
void msc_app_mount(uint8_t port);
 | 
			
		||||
void msc_app_umount(uint8_t port);
 | 
			
		||||
 | 
			
		||||
extern scsi_sense_fixed_data_t mscd_sense_data;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -91,13 +91,13 @@ uint8_t msc_device_ramdisk[DISK_BLOCK_NUM][DISK_BLOCK_SIZE] =
 | 
			
		||||
//--------------------------------------------------------------------+
 | 
			
		||||
// IMPLEMENTATION
 | 
			
		||||
//--------------------------------------------------------------------+
 | 
			
		||||
uint16_t tud_msc_read10_cb (uint8_t coreid, uint8_t lun, void** pp_buffer, uint32_t lba, uint16_t block_count)
 | 
			
		||||
uint16_t tud_msc_read10_cb (uint8_t port, uint8_t lun, void** pp_buffer, uint32_t lba, uint16_t block_count)
 | 
			
		||||
{
 | 
			
		||||
  (*pp_buffer) = msc_device_ramdisk[lba];
 | 
			
		||||
 | 
			
		||||
  return min16_of(block_count, DISK_BLOCK_NUM);
 | 
			
		||||
}
 | 
			
		||||
uint16_t tud_msc_write10_cb(uint8_t coreid, uint8_t lun, void** pp_buffer, uint32_t lba, uint16_t block_count)
 | 
			
		||||
uint16_t tud_msc_write10_cb(uint8_t port, uint8_t lun, void** pp_buffer, uint32_t lba, uint16_t block_count)
 | 
			
		||||
{
 | 
			
		||||
  (*pp_buffer) = msc_device_ramdisk[lba];
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -97,7 +97,7 @@ static uint8_t sector_buffer[DISK_BLOCK_SIZE];
 | 
			
		||||
//--------------------------------------------------------------------+
 | 
			
		||||
// IMPLEMENTATION
 | 
			
		||||
//--------------------------------------------------------------------+
 | 
			
		||||
uint16_t tusbd_msc_read10_cb (uint8_t coreid, uint8_t lun, void** pp_buffer, uint32_t lba, uint16_t block_count)
 | 
			
		||||
uint16_t tusbd_msc_read10_cb (uint8_t port, uint8_t lun, void** pp_buffer, uint32_t lba, uint16_t block_count)
 | 
			
		||||
{
 | 
			
		||||
  memcpy(sector_buffer, msc_device_app_rommdisk[lba], DISK_BLOCK_SIZE);
 | 
			
		||||
  (*pp_buffer) = sector_buffer;
 | 
			
		||||
@@ -106,7 +106,7 @@ uint16_t tusbd_msc_read10_cb (uint8_t coreid, uint8_t lun, void** pp_buffer, uin
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Stall write10 by return 0, as this is readonly disk
 | 
			
		||||
uint16_t tusbd_msc_write10_cb(uint8_t coreid, uint8_t lun, void** pp_buffer, uint32_t lba, uint16_t block_count)
 | 
			
		||||
uint16_t tusbd_msc_write10_cb(uint8_t port, uint8_t lun, void** pp_buffer, uint32_t lba, uint16_t block_count)
 | 
			
		||||
{
 | 
			
		||||
  (*pp_buffer) = NULL;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user